- In the “Sections” folder, locate the
cart-template.liquid file. This file controls the layout and display of the cart page.
- Open the
cart-template.liquid file and search for the section or code responsible for rendering the individual items in the cart. It may look like {% for item in cart.items %} or similar.
- Within the loop that iterates over the cart items, you’ll need to add code to display the SKU. Locate the code that renders the item’s name or title, and add the following code below it to display the SKU:
{% if item.variant.sku %}
SKU: {{ item.variant.sku }}
{% endif %}