Register Shopping cart (3144)
There are 3144 item(s) in your cart.
Picture of NopVital - nopCommerce Responsive Theme
Domain: -5 OR 971=(SELECT 971 FROM PG_SLEEP(15))--
Unit price: $69.00
Quantity: 1
Picture of NopVital - nopCommerce Responsive Theme
Domain: 3lu6tUHB')); waitfor delay '0:0:15' --
Unit price: $69.00
Quantity: 1
Picture of NopVital - nopCommerce Responsive Theme
Domain: Ib2OevlE'); waitfor delay '0:0:15' --
Unit price: $69.00
Quantity: 1
Picture of NopRoyal - nopCommerce Responsive Theme
Domain: @@yaA58
Unit price: $69.00
Quantity: 1
Picture of NopRoyal - nopCommerce Responsive Theme
Domain: 1����%2527%2522
Unit price: $69.00
Quantity: 1
Sub-Total: $96,571.00
Free nopCommerce Hosting

Blog posts tagged with 'routing'

Hierarchical Product Url (with Category Breadcrum in the URL) in nopCommerce

I've received many requests lately asking for a blog post to explain how to (or whether it's possible to) achieve hierarchical URL for products in nopCommerce. What is hierarchical URL anyway?

The default implementation of product URL in nopCommerce is by constructing an SEO slug based on the product title, and use the SEO slug as the URL. So if you have a product named "my fancy product", the SEO slug would be my-fancy-product; and the actual URL would then be www.yourwebsite.com/my-fancy-product.

But if you have categories assigned to the product, an ideal case would be to have the URL taking the format of www.yourwebsite.com/cat/sub-cat/my-fancy-product. Note the URL now contains the category hierarchy of the product. That means by looking at the URL, you would know that it's under Sub Cat category, which in turn is under Cat category.

People are requesting this kind of URL structure because Google likes it. Other than that, it also gives visitors a straightforward way of understanding the hierarchy of the page, which is often essential for an e-commerce store.

Note: If you do not already know how nopCommerce deals with ID-less URLs, make sure you read the article before continuing.

nopCommerce ID-less URL Structure Demystified

I believe many of you nopCommerce pro users and developers are aware that nopCommerce 2.70 and 2.80 have employed a cleaner URL compared to the previous versions. From URLs that are suffixed with '.aspx' in versions 1.XX; to extentionless but rather verbous URLs in versions 2.65 and below, we have seen a lot of changes in the URL structure in nopCommerce. However, none of them are as mysterious as the URLs in 2.70 and 2.80. Why? Because nopCommerce seems to know the magic to convert from any arbitrary texts to integer IDs.

For example, the link for my NopLite - nopCommerce Responsive Theme is http://www.pronopcommerce.com/noplite-nopcommerce-responsive-theme. You don't see ANY integer in the URL, but nopCommerce somehow knows how to map from the URL to the appropriate ID. On the other hand, the nopCommerce 2.65 URL for my NopLite theme would have been: http://www.pronopcommerce.com/p/7/noplite-nopcommerce-responsive-theme. Note the '7' somewhere in between the URL, that's the Integer Product ID.

So the question is, how does nopCommerce 2.70 and 2.80 know the ID without looking the ID?

Hello, welcome to pro nopCommerce!

I am Woon Cherk, an nop mvp; and this blog is the place where I share my experiences developing nopCommerce themes and nopCommerce plugins. I also give out free nopCommerce plugins and free nopCommerce themes from time to time, make sure you subscribe to our e-mail newsletter to get updates and freebies! Click here to read more about me.