We have a problem with a client who wants some variants to only be included and the sub category and not main and vice versa.
To have a variant only in the main category is not a problem.
But when it’s only included in the sub category it wont be clickable in product listings and the buy button will be disabled cause of the URL as well.
If you have a URL directly to the product with the sub category, it’s there but the buy button is disabled here too (cause of the URL).
How do we solve this? What’s the best practice and recommendations?
The client has variants of a product that can be discontinued by the producer, they still want them to be displayed on the site under another category.
If you assign the “sub category” as main category instead the product will be displayed as before and the link will point the product into the sub category.
@anusha.ganegoda@patric.forsgard So I can’t have a variant only belong to a sub category?
Is there any way to solve the problem to have some variants only belong to a sub category?
You can put the variant in a category, if this category is in the top or multiple levels down in the category tree does not matter. To be able to generate links i.e. you need to mark one of the categories where the variant is placed as main category on the categories that is published on the website.
Do you have some logic in your pages, where you check whats the “Main Category” is?
That is, does the display logic or something else changes when it is main category?
The main category conceptually is the anchor point to know this is the “Master”, or defines the single definitive url. When a product is included in multiple categories, If we do not have a marked category as “Main”, the url for the product may become random, which we wants to avoid.