add multiple Checkbox In Product Page in Dawn Theme 8.0.1

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:

  1. In your Shopify theme editor, navigate to the “Templates” folder and open the “product.liquid” file.

  2. Add the following code where you want the select options to appear on the product page:


  1. Save the changes to the “product.liquid” file.
  2. In your Shopify theme editor, navigate to the “Templates” folder and open the “cart.liquid” file.
  3. Add the following code where you want to display the selected options on the cart 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.