Cart

Empty Cart Check

Shows different markup when the cart has zero items.

Copy or embed this snippet

{% if cart.item_count == 0 %}
  <p>Your cart is empty.</p>
  <a href="{{ routes.all_products_collection_url }}">Continue shopping</a>
{% else %}
  <!-- cart items -->
{% endif %}

Embed this snippet on your blog or docs — attribution link appreciated: HTMLToLiquid Converter · Convert to Shopify section →

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML