Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Commerce variation index but let url point to parent product


Hi Guys,

so i have commerce products and below i have several variations. On the page of the product there is a (html)table with these variation and some corresponding data of these variations (productnumber, title etc). 

These variation dont have their own page. But i want the data added in these variation be indexed to their parent product. So if i search for a productnumber of a variation i want :

  • for the variation to show up in the seachresult but the url is to its (parent) product.
  • or show the product page in the result to show up (because the data of the variation is on that page).

Which one is easier to implement. 

Which approach can i use here to achieve this?

Dec 12, 2018 16:00

You can add a new property or an extension method for VariationContent, named probably "ProductUrl", which you can easily get during index. Then on search page, you use that ProductUrl as the link of the variant. 

Dec 12, 2018 20:43
* 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.