Shopify’s flexibility lies in its templating language Liquid. Instead of relying on bloated apps, mastering just a few snippets gives you the power to customize your store, improve speed, and control your user experience.
1. Show Product Inventory Only When Low
Let urgency drive action — but only when it matters.
{% if product.available and product.inventory_quantity < 10 %}
Only {{ product.inventory_quantity }} left in stock!
{% endif %}

2. Display Discounted Price & Savings
{% if product.compare_at_price > product.price %}
{{ product.price | money }}
Save {{ product.compare_at_price | minus: product.price | money }}
{% endif %}
This boosts perceived value while minimizing pricing confusion.
3. Show “New” Badge for Recent Products
{% assign now = 'now' | date: '%s' %}
{% assign published = product.published_at | date: '%s' %}
{% assign diff = now | minus: published %}
{% if diff < 604800 %}
New
{% endif %}
Showcases new arrivals automatically without manual tagging.
“One line of Liquid can save you from installing one app and hours of debugging.”
Where to Place Snippets
- Product loop?
product-card-grid.liquid
- PDP?
product-template.liquid
- Sitewide? Use global snippets and include with
{% render 'snippet-name' %}