Variant Selection Not Updating Correctly on Product Page

Hello together, I have already coded that if you click on the variants, you will be taken to a separate product page. But I have the following challenge. For example, if I click on the choclate variant then it comes to the Choclate product page, but the selection remains with Carott. I would like the selection to remain with Choclate, in other words the second one. (In fact if you try it twice then the selection stays with choclate, but I want it to work directly the second time) see picture

I will gladly send you the snipperts/product-variant-picker.liquid

{% comment %}> Renders product variant-picker> Accepts:> - product: {Object} product object.> - block: {Object} passing the block information.> - update_url: {Boolean} whether or not to update url when changing variants. If false, the url isn’t updated. Default: true (optional).> Usage:> {% render ‘product-variant-picker’, block: block, product: product %}> {% endcomment %}> {%- unless product.has_only_default_variant -%}> {%- if block.settings.picker_type == ‘button’ -%}> > {%- else -%}> > {%- endif -%}> {%- endunless -%}> >

Hi @Mino ,

Could you share URL? I will help to check it.

Hey, thank you for your answer. Here is the preview URL https://xf1rkc4lzjq2hdnq-83509150036.shopifypreview.com

Hi,

After I click option it redirect to https://bettercakez.com/password. But I click go back I saw screenshot below:

That is strange. I don’t know why that is. I have sent you a request code via email, so you can send me a request in the store if you want. Is that okay?

Hi @Mino ,

I helped update code on [Eboost]bettercakez-draft 28.08.24 ( snippets/product-variant-picker.liquid).