Ibexa Commerce uses its own routing/URL matching solution to avoid conflicting with the Ibexa Platform routing system and to enable using Platform API in commerce routes.
If a product URL is not routed correctly (e.g. because of complex matching rules)
it is possible to set up a direct routing for products.
The first part of the URL (here
products) could be translated, and in this case, the following routing rules have to be set up for each translation.
1 2 3 4 5 6 7
The default router (
Silversolutions\Bundle\EshopBundle\Routing\StandardRouter) checks each requested URL.
This router is a derived class from a chained router implementation. It attempts to match the URL to its own specifications. If it cannot find a matching route, it passes the request back to the router chain in order to leave matching to another instance.
Route matching priority:
- If the request is in legacy mode, return and leave route matching to another instance.
- Assume the request of a catalog object and try to find a responsible route using the catalog data provider.
- Assume the request of a catalog object and try to find a route using the navigation service.
- Assume the request of a
silver.moduleobject and try to find a route using the navigation service.
- Assume the request of a PIM object and try to find a route using the catalog data provider.
- Assume the request of a PIM object and try to find a route using the navigation service.
- If no route can be found at all, the route matching is left to another instance.
The router is defined with the priority of 280, so you can still add your own chain router that is executed before it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Usage of the navigation service¶
Additionally, the router uses the navigation service in order to set the URL Mapping and set the proper URL.