NopCommerce Hosting Tips : Adding a Login Pop-Up

Leave a Comment
Recently on the nopCommerce user forums, a developer wanted to grasp how to implement a popup site-wide for users visiting the website for the first time. varied industries will create use of this; sites that offer adult novelty products, desire to confirm age, or any website that wants to inform site visitors of the advantages of registering with the site. nopCommerce team member haydie offered an imaginative solution; re-use the code for the EU cookie pop-up that’s presently implemented in nopCommerce. Let’s take a glance at how that would work.

NopCommerce Hosting Tips : Adding a Login Pop-Up

The EU cookie law affects websites that originate in any EU member country; recent changes in however the law is interpreted has rendered the requirement to get consent from site visitors to use cookies to be converted into “implied consent”. However, since the code is already enforced in nopCommerce, it’s a straightforward matter to copy the code, or if your site’s not impacted by this law, to easily modify the existing code.
You’ll find the relevant source code in Nop.Web/Views/Common/EuCookieLaw.cshtml, and Nop.Web/Views/Common/EuCookieLaw.Mobile.cshtml.

Let’s open up EuCookieLaw.cshtml and have a look. I’ll skip over the javascript functions for the moment, and focus on the content section:

<div id="dialog-eu-cookie-law" title="@T("EUCookieLaw.Title")" style="display:none;" class="eu-cookie-law">
<div>
@T("EUCookieLaw.Description") (<a id="eu-cookie-privacyinfo-tag" href="javascript:toggleEuCookiePrivacyInfo();" class="eu-cookie-privacyinfo-tag">@T("Common.Show")</a>)
</div>
<div class="clear">
</div>
<div id="eu-cookie-law-privacyinfo" style="display: none;">
@Html.Action("TopicBlock", "Topic", new { systemName = "privacyinfo" })
</div>
</div>

We can see that the titles “EUCookieLaw.Description” and “Common.Show”, and therefore the topic “privacyinfo” comprise the content that’s showed the site users; let’s log into our nopCommerce instance, and access that info. Edit the topic and titles to reflect the message you wish to point out your web site guests.

Now under Configuration/Settings/General and Miscellaneous Settings, check “Display EU cookie law warning: “, and click on “Save”. Restart your application, and visit your web site in a new browser window. You’ll currently see your new pop-up displayed – easy, and extremely effective!

NopCommerce Hosting Recommendation

HostForLIFEASP.NET receives Spotlight standing advantage award for providing recommended, cheap and fast ecommerce Hosting including the latest NopCommerce 3.60. From the leading technology company, Microsoft. All the servers are equipped with the newest Windows Server 2012 R2, SQL Server 2014, ASP.NET 4.5.2, ASP.NET MVC 6.0, Silverlight 5, WebMatrix and Visual Studio Lightswitch. Security and performance are at the core of their NopCommerce hosting operations to confirm every website and/or application hosted on their servers is highly secured and performs at optimum level. mutually of the European ASP.NET hosting suppliers, HostForLIFE guarantees 99.9% uptime and fast loading speed. From €3.00/month , HostForLIFE provides you with unlimited disk space, unlimited domains, unlimited bandwidth,etc, for your website hosting needs. 
http://hostforlifeasp.net/European-nopCommerce-Hosting
Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment