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
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024