Single URL or one per variation?

Hi, we have a single Litium setup with multiple sites each with a different domains but they share products database with some products overlapping. have one URL per variation
but should only have one URL per product.

So they can’t have different product templates since thy are the same.

The single/multiple “url switch” on the product template what does that actually do behind the scene?
If we want to set (Override) that based on a site setting instead, Is this possible? Where would be the best place for this logic? And do you see any problems with doing so?

Litium version: 7.1

It is not supported out of the box to easy do this but it is possible, we use dependency injection all over the places and that’s the reason that it is possible to replace the inbuilt service with own logic. If the project is replacing the inbuilt service it is important that information about that is included in bug reports.

Now over to what the UseVariantUrl property is doing.

In the Litium.Web.UrlService it exists a check if the current base product or variant should use the base product or variant url. If we should use variant url and we try to get an url for the base product the Litium.Web.UrlService will find the first published variant on the channel and create an url for that instead and the other way around if we try to get the url for a variant and it should be base product urls.

The routing that will find the correct baseproduct/variant depend on the url is already today checking both the base product and variant urls and then comparing the current url with the one that Litium.Web.UrlService is generating, if they not is matching the routing will make an redirect to the generated url.

1 Like