Try our conversational search powered by Generative AI!

Multi site multi catalog urls

Vote:
 

We're building a multiple site solution with multiple catalogs, one for each site.
The problem is that when fetching the url for a product I sometimes get a url where the catalog is for the catalog that the other site uses. Can I somhow choose/get a url based on rights or based on a setting or something?

#113129
Nov 13, 2014 14:08
Vote:
 

Hi,

Does the issue happen with linked products? Please clarify the "sometimes" term - does it happen randomly or on specific products?

Regards.

/Q

#113140
Nov 14, 2014 5:26
Vote:
 

By sometimes I mean when that products also is part of another catalog. I guess I get the url for the first catalog in the list, but I want to get the url for the catalog that is setup for the site. 

#113192
Nov 14, 2014 14:01
Vote:
 

So it happens with linked products.

By default we get the "true" parent catalog content to construct the hierarchical url. So if you want the linked products to work, you will need to create your own partial router, which can inherit from HierarchicalCatalogPartialRouter, and overwrite the TryGetVirtualPath method to get the catalog contents belong to the context you're using.

Regards.

/Q

#113234
Nov 17, 2014 4:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.