Hello everyone, I am trying to construct a page on my Shopify instance A where I have a custom product section with two variants and I want to add a dynamic CTA button that generates a check-out on a second Shopify instance B (it’s a very specific set-up). For this, I am using cart permalinks and variant meta fields in my Shopify instance A where I store the right variant id from my Shopify instance B.
I am trying to implement it with a javascript that checks the variant selection, pulls the right variant id from the meta field and generates the href url accordingly ("https://www.shopB.com/cart/'" + “variant-id:1”)
After making all edits, the CTA button is not clickable. Any hints why could go wrong? See the code below.
JS within section liquid:
product-variant-picker liquid:
{%- unless product.has_only_default_variant -%}
{%- if block.settings.picker_type == 'button' -%}
{%- else -%}
{%- endif -%}
{%- endunless -%}