Hello,
I have the following code (it’s both a size selector and add to cart button) in a custom liquid block in my product page.
However the problem is with the add to cart button, when you click the add to cart button it directs you to the cart page, but I want it to open the cart drawer when it’s clicked on.
My product page: https://r1vex.myshopify.com/products/lindberg-antarctic-vinteroverall-black?_pos=2&_sid=fa65803e6&_ss=r
The add to cart button code is in the bottom after:
“”
{% if product.variants.size > 1 %}
Storlek:
{% assign selected_variant = product.selected_or_first_available_variant %}
{{ selected_variant.title }}
[Storleksguide](https://kidos.se/pages/storleksguide)
{% for variant in product.variants %}
{{ variant.title }}
{% endfor %}
{% else %}
{% assign selected_variant = product.variants.first %}
{% endif %}
Thanks for helping!