Shopify themes, liquid, logos, and UX
Hello, is there a way to show how many units are in stock left on the cart page? Same as I have next to the product? When customers want to add units in the cart and they don't know it was the last piece they added. It pops up confusing messages and it isn't clear to customers the last units they have in the cart.
Solved! Go to the solution
This is an accepted solution.
Hello @chefsimecek ,
Goto Online Store -> Edit Theme
Search File 'main-cart-items.liquid'
Add this code after line '<td class="cart-item__quantity'
<p
class="product__inventory no-js-hidden caption-with-letter-spacing"
role="status"
>
{%- if item.product.selected_or_first_available_variant.inventory_management == 'shopify' -%}
{%- if item.product.selected_or_first_available_variant.inventory_quantity > 0 -%}
{%- if item.product.selected_or_first_available_variant.inventory_quantity <= 10 -%}
{{-
'products.product.inventory_in_stock_show_count'
| t: quantity: item.product.selected_or_first_available_variant.inventory_quantity
-}}
{%- endif -%}
{%- endif -%}
{%- endif -%}
</p>
Change this number for Max stock limit
Hello @chefsimecek ,
Yes it is possible, could you share store url, password and cart code.
This is an accepted solution.
Hello @chefsimecek ,
Goto Online Store -> Edit Theme
Search File 'main-cart-items.liquid'
Add this code after line '<td class="cart-item__quantity'
<p
class="product__inventory no-js-hidden caption-with-letter-spacing"
role="status"
>
{%- if item.product.selected_or_first_available_variant.inventory_management == 'shopify' -%}
{%- if item.product.selected_or_first_available_variant.inventory_quantity > 0 -%}
{%- if item.product.selected_or_first_available_variant.inventory_quantity <= 10 -%}
{{-
'products.product.inventory_in_stock_show_count'
| t: quantity: item.product.selected_or_first_available_variant.inventory_quantity
-}}
{%- endif -%}
{%- endif -%}
{%- endif -%}
</p>
Change this number for Max stock limit
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024