Working with routing
When you display a product in the front-end application you want to show a navigation breadcrumb and other sitemap information, both for the user and for machines to improve SEO.
In Norce solutions, this can be challenging because Norce lacks information on how products should be displayed on the front end. Each application decides themselves how their sitemap and routes should look.
A client sells mobile phones from different manufacturers.
In Norce they are all handled by one category — Cell phones. But in the eCommerce application the customers navigate to the phones by first choosing "Phones", then "Smartphones" and lastly "iPhone" or "Samsung" or some other manufacturer.
This is done by creating navigation listings in the CMS layer, using a combination of filters to the listing. For iPhone, this is a filter on Cell phones and the manufacturer Apple.
To create the routes and sitemap for this you need to translate the information from Norce's product catalog to the navigation routes known only from the rules in the CMS layer.
Pre-generated routes
Generate the sitemap file and the routes for the product catalog proactively by setting up a Product Feed export from Norce (Channel export). Fetch the whole product catalog and create the routing for each product from the information in the feed, together with the rules from the CMS service.
CMS has the following navigation rules:
- Phones
- Smartphones
- iPhone (Norce category:
Cell phonesand Norce Manufacturer:Apple) - Samsung (Norce category:
Cell phonesand Norce Manufacturer:Samsung) ...
- iPhone (Norce category:
- Smartphones
Norce Product feed has the following products:
- Apple iPhone 15 Plus (category:
Cell phones, Manufacturer:Apple) - Samsung Galaxy S24 5G (category:
Cell phones, Manufacturer:Samsung) - Pocketbook InkPad 4 32GB (category:
eReader, Manufacturer:Pocketbook)
Product 1 matches Rule 1.1.1 and gets the path from it. Product 2 matches Rule 1.1.2. Product 3 matches no rule and is left out.
Dynamically created routes
When products are displayed, the routes are resolved based on the information returned from Norce and the navigation rules from the CMS.
CMS has the following navigation rules:
- Phones
- Smartphones
- iPhone (Norce category:
Cell phonesand Norce Manufacturer:Apple) - Samsung (Norce category:
Cell phonesand Norce Manufacturer:Samsung) ...
- iPhone (Norce category:
- Smartphones
A visitor searches for Samsung mobile phones and chooses the Samsung Galaxy S24 5G.
The breadcrumb is resolved from information on the product in Norce, that matches rule 1.1.2 from the CMS.