0

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?

asked May 24, 2023 at 22:17

2 Answers 2

0

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

answered May 25, 2023 at 6:34
0

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

answered May 25, 2023 at 7:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.