Shopify: Minimum Theme Requirements
For Shopify merchants using Purple Dot with Liquid your theme must meet the 3 criteria below. We have Headless Support here. If you need help, please contact support.
Any button that is used to add products to the cart should have the type attribute set to
submit
and should also be inside the <form> HTML element.<button type="submit">Add to Cart</button>
Each of these buttons must be wrapped in a
<form>
element, with the action attribute set to /cart/add
.<form action="/cart/add" method="post">
<!-- Your Product form content goes here -->
</form>
Within the form, there should be an
input
or select
element with the name attribute set to id. The value of this input element must be updated dynamically based on the current variant selected in the form. This ensures that Purple Dot can correctly identify the selected product variant.<input type="hidden" name="id" value="{{ variant.id }}"/>
Additional requirement for a
select
based implementation is that only the option
of the variant the shopper had actually selected is selected
.<select name="id">
{% for variant in product.variants %}
{% if variant.available %}
<option
{% if product.selected_variant.id == variant.id %}
selected
{% endif %}
value="{{ variant.id }}">
<...>
</option>
{% else %}
<option
{% if product.selected_variant.id == variant.id %}
selected
{% endif %}
disabled="disabled"
value="{{ variant.id }}">
<...>
</option>
{% endif %}
{% endfor %}
</select>
Last modified 1mo ago