Variant Product Link Redirecting To The Default URL

Hi Guys,

Hoping you can help me with this :slightly_smiling_face:

When I go to the variant’s URL, it always redirects to the default URL.
Example:
products/aidi-mocc-slip-on?variant=37936626008254 (Aidi Mocc Dark Wine)

this always redirect/goes back to the default color

products/aidi-mocc-slip-on?variant=37936625942718 (Aidi Mocc Black / default color)

Hey there.

Would the Aidi Mocc Dark Wine variant be unavailable?

Do you have a link to that product page?

Thanks

Yes, the product (Aidi Mocc Dark Wine) is available.
Even the variant size, always redirects to the first/default size.

Sorry, but the website is not yet live.

It may be, but I am just guessing here, that your product page is using the product.first_available_variant rather than product.selected_or_first_available_variant

https://shopify.dev/docs/themes/liquid/reference/objects/product#product-selected_or_first_available_variant

Thank you for the suggestion, but this is what I found out on the product liquid of the theme I’m using

{%- assign current_variant = product.selected_or_first_available_variant -%}

I am having this same issue, did you ever discover a solution?

Hi There, i m having the same exact issue with my theme. When refresh the variant’s URL, it always redirects to the default URL. Anyone have a solution for this?

We have a custom theme and we had to hire a developer to fix the issue so unfortunately I don’t know what the solution was.

Thank you for the reply. We wanted to see if there is a easy fix before hiring a developer.