May I know how to implement this custom route in spartacus ?
product/:productCode/:name/order-form
I tried implementing this in my custom order-form-routes.module.ts
But it doesn't seem to recognize this config as it throws a Page Not Found error.
ConfigModule.withConfig({
routing: {
routes: {
orderForm: {
paths: ['product/:code/:name/order-form'],
paramsMapping: { code: 'code', name: 'name' },
},
},
},
}),
:productCode
instead of:code
(because PDP are recognized only by the existence of the:prodcutCode
param - by convention). Then drop yourparamsMapping
forcode
. By the way...paramsMapping
forname
is redundant in your example and can be dropped anyway. – Krzysztof Platis/order-form/:productCode/:name
while I cannot seem to make the required/product/:productCode/:name/order-form
work. Is it because, the URL is expecting to load a Product Page, instead of a Content Page? I get a 404 Page Not Found error for the latter. – NAR