Registering Routes in nopCommerce

nopCommerce is based on ASP.NET (MVC) and it follows the IRouteProvider interface for registering the routes during the application start event. All the routes are registered in the “Route Provider” class in the Nop.Web project.

In order to view the “Route Provider” class, go to: Nop.Web/Infrastructure/RouteProvider.cs.


You will see the route registration of the pages like homepage, login & shopping cart etc:

using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Localization;
using Nop.Web.Framework.Mvc.Routes;

namespace Nop.Web.Infrastructure
    public partial class RouteProvider : IRouteProvider
        public void RegisterRoutes(RouteCollection routes)
            //We reordered our routes so the most used ones are on top. It can improve performance.

            //home page
                            new { controller = "Home", action = "Index" },
                            new[] { "Nop.Web.Controllers" });

            //we have this route for performance optimization because named routes are MUCH faster than usual Html.Action(...)
            //and this route is highly used
                            new { controller = "Widget", action = "WidgetsByZone" },
                            new[] { "Nop.Web.Controllers" });

                            new { controller = "MyNewPage", action = "Index" },
                            new[] { "Nop.Web.Controllers" });

                            new { controller = "Customer", action = "Login" },
                            new[] { "Nop.Web.Controllers" });
                            new { controller = "Customer", action = "Register" },
                            new[] { "Nop.Web.Controllers" });
                            new { controller = "Customer", action = "Logout" },
                            new[] { "Nop.Web.Controllers" });

            //shopping cart
                            new { controller = "ShoppingCart", action = "Cart" },
                            new[] { "Nop.Web.Controllers" });
                            new { controller = "ShoppingCart", action = "Wishlist", customerGuid = UrlParameter.Optional },
                            new[] { "Nop.Web.Controllers" });


You can use this “Route Provider” class for the following:

  • Plugins custom routes
  • New custom pages


Example of registering route for Contact us page in nopCommerce:

 //contact us
                            new { controller = "Common", action = "ContactUs" },
                            new[] { "Nop.Web.Controllers" });

Hope it helps!


 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | Leave a comment

Configuring Access Control List for products in nopCommerce

Sometimes, online businesses (e-Commerce stores) sell certain types of product to specific customers only. In those cases, it is quite important for e-Commerce stores to make use of feature like ACL (Access Control List) so that the front-end experience for the online shoppers will be seamless.

Today, we will go over the process of configuring Access Control List (ACL) for products in nopCommerce.

To configure ACL:

From the Catalog menu, select Products > Manage Products.


The Manage Products window is displayed.

Click Edit beside the product to edit. The Edit product details window is displayed – Select the Access Control List tab, as follows:


Select the Subject to ACL checkbox, to enable configuring the access control at the product level (showing specific products based on customer roles).The window is expanded, as follows:

Select the required customer roles having access to this product.

  • Administration
  • Forum Moderators
  • Guests
  • Registered
  • Vendors

Note: These customer roles are not hard-coded and can be configured in the Administration area, by selecting Customer Roles from the Customers menu.

 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | 3 Comments

How to add a topic page to sitemap in nopCommerce

A sitemap acts as a phone directory for your website that gives information about all the pages of your website. In order to have a successfully online business, a website’s ranking is quite important when it comes to search engines. A sitemap is mainly beneficial in two areas:

1) It allows users / online shoppers to easily find any page(s) that they are interested in viewing / browsing

2) It allows search engines (like Bing, Google & Yahoo etc) to index your website and tells them the location of the pages

So, when you add any new page to your site, it is important to add it in the sitemap.Today, we will go over the process of adding a topic page to sitemap in nopCommerce.

To access your sitemap, simple go to this URL:

OR, you can go to the footer of your nopCommerce website and find this link:


To add a new topic page to your sitemap, go to: Administration > Content Management > Topics


From the list of topic pages, select the page that you would like to add to sitemap. In this example, we will be adding “Conditions of use” page to sitemap (click “edit”).


On the topic details page, scroll down and ENABLE (or CHECK) the option to add the page to sitemap like this:


SAVE changes and let’s view the changes on the sitemap.


 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , | Posted under nopCommerce | Leave a comment