nopCommerce is a top-notch e-commerce system, one of the best open-source .Net-based e-commerce applications available. However, it can be a bit less than straightforward to add additional content to a nopCommerce implementation. Clients may request additional content such as informational pages on the background and history of their products, or a gallery to display previous designs or products. Here’s two ways to accomplish that with nopCommerce.
The first method is the most straightforward; creating a topic, and linking to the topic in your menu. You will be limited to HTML-based content, which will be fine for most purposes, but won’t include widget support. Here are the steps for this method:
1. Log into your nopCommerce instance as an administrator, and access the Admin area
2. Under Content Management, click on “Topics”
3. Click “Add New”, to create your new topic instance
4. Add your information in the screen that follows, and then click “Save & Continue Edit”
5. Now you’ll notice you have a few more options on the screen
The most important is the new URL that’s been added – this is a direct link to your topic, which will be rendered as a page. Click on the link for your preview to see how it’ll display.
6. Now you’ll want to add that link to your menu. For this instance, we’ll open the Nop.Web/Views/Common/Menu.cshtml
You’ll notice that there’s a series of <li> elements, like this:
<li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
You’ll want to add another <li> element for your new link. However, your link will look a bit more like this:
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "CustomOrders" })">@T("CustomOrders")</a></li>
nopCommerce uses a specific route method for topics; you’ll want to add your topic’s system name, and you’ll also need to add a resource name and value under your Languages resources.
Save your updated Menu.cshtml, clear your cache, and re-start your application. After these steps, you should see the new link in your menu.
Next time, we’ll cover how to add a page that contains more advanced content, such as a widget and topic combined.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking for quality nopCommerce Hosting? Look no further than Arvixe Web Hosting!