Seamless facebook integration with nopcommerce at www.pocomaru.com!!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Any tips on the upgrade to Nop 2.4 and up? I move mycustomer base but don´t know how to associate old facebooklogin to the new system. And more the new system do not let facebook users login into existing accounts. I found no way to associate existing account to facebook login.
11 years ago
Hi my problem is i couldnt see "login with facebook" button, i can only text "Facebook Login", first two time when i executed i was able to see the facebook login button, then suddently i couldnt see the "login with facebook". I tested in all browsers(IE, Firefox and chrome)

The following is my CustomerLoginwithFacebook.ascx code.


<div class="login-page">
     <div id="fb-root">
    </div>
    <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
    <script>
        FB.init({ appId: '<%: Facebook.FacebookApplication.Current.AppId %>', status: true, cookie: true, xfbml: true
        });
    </script>
    <div class="page-title">
        <h1><%=GetLocaleResourceString("Login.Welcome")%></h1>
    </div>
    <div class="clear">
    </div>
    <div class="wrapper">
        <%if (!CheckoutAsGuestQuestion)
          { %>
        <div class="new-wrapper">
            <span class="register-title">
                <%=GetLocaleResourceString("Login.NewCustomer")%></span>
            <div class="register-block" runat="server" id="pnlRegisterBlock">
                <table>
                    <tbody>
                        <tr>
                            <td>
                                <%=GetLocaleResourceString("Login.NewCustomerText")%>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="padding-right: 20px; padding-top: 20px;">
                             <fb:login-button perms="email,user_checkins" onlogin="Facebook._CheckLogin(getQuerystring('returnurl'));">Facebook Login</fb:login-button>
                                <asp:Button runat="server" ID="btnRegister" Text="<% $NopResources:Account.Register %>"
                                    OnClick="btnRegister_Click" CssClass="registerbutton" />                              
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <%}
          else
          { %>
        <div class="new-wrapper">
            <span class="register-title">
                <%=GetLocaleResourceString("Checkout.CheckoutAsGuestOrRegister")%></span>
            <div class="checkout-as-guest-or-register-block">
                <table>
                    <tbody>
                        <tr>
                            <td>
                                <nopCommerce:Topic ID="topicCheckoutAsGuestOrRegister" runat="server" TopicName="CheckoutAsGuestOrRegister"
                                    OverrideSEO="false"></nopCommerce:Topic>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="padding-right: 20px; padding-top: 20px;">
                              <fb:login-button perms="email,user_checkins" onlogin="Facebook._CheckLogin(getQuerystring('returnurl'));">Facebook Login</fb:login-button>
                                <asp:Button runat="server" ID="btnCheckoutAsGuest" Text="<% $NopResources:Checkout.CheckoutAsGuest %>"
                                    OnClick="btnCheckoutAsGuest_Click" CssClass="checkoutasguestbutton" />
                                <asp:Button runat="server" ID="btnRegister2" Text="<% $NopResources:Account.Register %>"
                                    OnClick="btnRegister_Click" CssClass="registerbutton" />
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <%} %>
        <div class="returning-wrapper">
            <span class="login-title">
                <%=GetLocaleResourceString("Login.ReturningCustomer")%></span>
            <asp:Panel ID="pnlLogin" runat="server" DefaultButton="LoginForm$LoginButton" CssClass="login-block">
                <asp:Login ID="LoginForm" TitleText="" OnLoggedIn="OnLoggedIn" OnLoggingIn="OnLoggingIn"
                    runat="server" CreateUserUrl="~/register.aspx" DestinationPageUrl="~/Default.aspx"
                    OnLoginError="OnLoginError" RememberMeSet="True" FailureText="<% $NopResources:Login.FailureText %>">
                    <LayoutTemplate>
                        <table class="login-table-container">
                            <tbody>
                                <tr class="row">
                                    <td class="item-name">
                                        <asp:Label runat="server" ID="lblUsernameOrEmail" Text="E-Mail" AssociatedControlID="UserName" />:
                                    </td>
                                    <td class="item-value">
                                        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="UserNameOrEmailRequired" runat="server" ControlToValidate="UserName"
                                            ErrorMessage="Username is required." ToolTip="Username is required." ValidationGroup="LoginForm">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td class="item-name">
                                        <asp:Label runat="server" ID="lblPassword" Text="<% $NopResources:Login.Password %>"
                                            AssociatedControlID="Password" />:
                                    </td>
                                    <td class="item-value">
                                        <asp:TextBox ID="Password" TextMode="Password" runat="server" MaxLength="50"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                            ErrorMessage="<% $NopResources:Login.PasswordRequired %>" ToolTip="<% $NopResources:Login.PasswordRequired %>"
                                            ValidationGroup="LoginForm">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td class="item-value" colspan="2">
                                        <asp:CheckBox ID="RememberMe" runat="server" Text="<% $NopResources:Login.RememberMe %>">
                                        </asp:CheckBox>
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td class="message-error" colspan="2">
                                        <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td class="forgot-password" colspan="2">
                                        <asp:HyperLink ID="hlForgotPassword" runat="server" NavigateUrl="~/passwordrecovery.aspx"
                                            Text="<% $NopResources:Login.ForgotPassword %>"></asp:HyperLink>
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td colspan="2">
                                        <nopCommerce:Captcha ID="CaptchaCtrl" runat="server" />
                                    </td>
                                </tr>
                                <tr class="row">
                                    <td colspan="2">
                                        <div class="buttons">
                                            <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="<% $NopResources:Login.LoginButton %>"
                                                ValidationGroup="LoginForm" CssClass="loginbutton" />
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </LayoutTemplate>
                </asp:Login>
            </asp:Panel>
        </div>
    </div>
    <div class="clear">
    </div>
    <nopCommerce:Topic ID="topicLoginRegistrationInfoText" runat="server" TopicName="LoginRegistrationInfo"
        OverrideSEO="false"></nopCommerce:Topic>
</div>


And i have added following code in CustomerLoginwithFacebook.ascx

protected override void OnPreRender(EventArgs e)
        {
            //java-script
            string facebookJS = CommonHelper.GetStoreLocation() + "Scripts/facebook.js";
            Page.ClientScript.RegisterClientScriptInclude(facebookJS, facebookJS);

            base.OnPreRender(e);
        }

Also i have added facebook.js file in scripts folder and pasted your the javascript code..

Reply me asap
8 years ago
rajysh wrote:
Hi my problem is i couldnt see "login with facebook" button, i can only text "Facebook Login", first two time when i executed i was able to see the facebook login button, then suddently i couldnt see the "login with facebook". I tested in all browsers(IE, Firefox and chrome)

Also i have added facebook.js file in scripts folder and pasted your the javascript code..

Reply me asap


I have similar problem and I am not sure where to look for. I think I have tested with Chrome and it was showing but not on all machines (Tested with Windows 7, Windows 8 and others) it was visible one or other, And similiar behaviour in other browers as well.

Can anyone has any better solution for consistant UI for rendering FB button correctly on NopCommerce??

Much appreciated for the help.

RL
8 years ago
Found the problem. It was with one of Ad Blocker Plus Plug in the Firefox, which was blocking the facebook login button and social plugins.

Add exception to it and voila. done.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.