Hello
I would like to add several selects on the product page and retrieve the select items on the basket page the checkoxes are displayed on the product page but I cannot retrieve their values
Thanks
Hello
I would like to add several selects on the product page and retrieve the select items on the basket page the checkoxes are displayed on the product page but I cannot retrieve their values
Thanks
hello there
To add several select options on the product page and retrieve the selected items on the cart page in your Shopify store, you can use some JavaScript and liquid code to achieve this.
Here are the steps you can follow:
In your Shopify theme editor, navigate to the “Templates” folder and open the “product.liquid” file.
Add the following code where you want the select options to appear on the product page:
{% for item in cart.items %}
{% for property in item.properties %}
{% if property.first == 'Option 1' %}
Option 1: {{ property.last }}
{% elsif property.first == 'Option 2' %}
Option 2: {{ property.last }}
{% endif %}
{% endfor %}
{% endfor %}
Note that you should replace “Option 1” and “Option 2” with the names of your specific options.
Save the changes to the “cart.liquid” file.