Hello, I hope someone cam help. Im using the Debut theme and recently I discovered that only the first variant is being displayed in the cart. I’m pretty sure my java script got messed up sometime yesterday when i was adding the on site messaging for the klarna app. If someone could please help me I would be extremely grateful.
this is the script thats on the product page:
{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}
{% section ‘product-template’ %}
{% section ‘product-recommendations’ %}
{% if collection %}
{% endif %}{% assign current_variant = product.selected_or_first_available_variant %}
{ "@context": "[http://schema.org/](http://schema.org/)", "@type": "Product", "name": {{ product.title | json }}, "url": {{ shop.url | append: product.url | json }}, {%- if product.featured_media -%} {%- assign media_size = product.featured_media.preview_image.width | append: 'x' -%} "image": [ {{ product.featured_media | img_url: media_size | prepend: "https:" | json }} ], {%- endif -%} "description": {{ product.description | strip_html | json }}, {%- if current_variant.sku != blank -%} "sku": {{ current_variant.sku | json }}, {%- endif -%} "brand": { "@type": "Thing", "name": {{ product.vendor | json }} }, "offers": [ {%- for variant in product.variants -%} { "@type" : "Offer", {%- if variant.sku != blank -%} "sku": {{ variant.sku | json }}, {%- endif -%} "availability" : "[http://schema.org/{%](http://schema.org/{%) if variant.available %}InStock{% else %}OutOfStock{% endif %}", "price" : {{ variant.price | divided_by: 100.00 | json }}, "priceCurrency" : {{ cart.currency.iso_code | json }}, "url" : {{ shop.url | append: variant.url | json }} }{% unless forloop.last %},{% endunless %} {%- endfor -%} Thanks Steph