In most e-commerce platforms, when a user selects a specific variant, the URL reflects that variant with a search parameter like in this case -> Shopify store URLyou can see ?variant=39817439379514 appended to the URL. If I use this specific URL, I will land on the page with the ‘Peppercorn’ and ‘L’ variants selected.
In magento, the URL remains static despite the variants that are selected as shown in the photos attached. Whenever I land on this magento product, no variant options will be selected. In the application I’m building, we want each variant to be searchable through specific URLs. enter image description here enter image description here
I know you can change the product configurations to be visible by URL, but this creates a separate page for the variant, which is not the UI experience I want.
Does Magento support this functionality? If not, is there another way I can configure the store to make this happen?
2 Answers 2
Yes, Magento offers the same functionality. Append a hash to the url to preselect values and switch image to the selected variant.
For more details, see: https://blog.chapagain.com.np/magent-2-load-configurable-product-with-options-pre-selected/
HTH, Tom
You can achieve this according to the below format
https://example.com/configurable-product.html#202=230&105=123
Format : #Attribute_ID=Value_ID
202 = Attribute ID 230 = Option value ID of the above attribute
105 = Attribute ID 123 = Option value ID of the above attribute
Explore related questions
See similar questions with these tags.