In Active Commerce, products need to be handled a bit different than normal Sitecore items, since the same product can be added to multiple categories. The way this is handled is by using virtual product urls, which are configured at the product Catalog level with the "Display Product Modes" setting.
Out-of-the-box, Active Commerce has multiple options available, the default being Resolve Products By Item Name and Product Code and Variant. If you are utilizing product variants in your product catalog, then this is the recommended option. If you won't have variants, then you may choose one of the other options.
Each of these will result in a different product url. For example, given a product with item name of Katmandu Walker and product code of 201:
-
Resolve Products By Item Name produces:
<site>/en/Products/Snowshoes/Adult/Katmandu-Walker
-
Resolve Products By Item Name and Product Code and Variant produces:
<site>/en/Products/Snowshoes/Adult/201--Katmandu-Walker
You get the picture.
Obviously, you also have to consider duplicate urls when switching (e.g. the first option will not work if you have 2 products with the same name).
If you don't like any of the built-in options, you can always create your own. Have a look at the example on our Github site for details on how to do this.
Comments