Options on cart page

If you want to list the selected options on the cart page, follow the steps below.

All entered option values are stored on the line_item.properties.

Automatic

Most themes will automatically list all the line item properties on the cart page.

Manual

If your theme does not show the options automatically, you can use the following code to show them on your cart page.

In your cart template, look for the part where each line item is iterated:

{%- for item in cart.items -%}

Inside the loop, add the following code at the location where you want to show the options:

{%- for p in item.properties -%}
       {%- if p.first.first == '_' -%}{% continue %}{%- endif -%}
        <div><b>{{ p.first }}: </b><span>{{ p.last }}</span></div>
{%- endfor -%}

This code will show each option on a new line.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.