Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Stock alert in shopify cart

Solved

Stock alert in shopify cart

chefsimecek
Excursionist
25 0 8

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.

 

 

Accepted Solution (1)
EvinceDev
Shopify Partner
121 13 13

This is an accepted solution.

Hello @chefsimecek ,
Goto Online Store -> Edit Theme

EvinceDev_3-1728562146660.png

Search File 'main-cart-items.liquid'

EvinceDev_4-1728562196618.png

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>

EvinceDev_0-1728562028880.png

Change this number for Max stock limit

EvinceDev_1-1728562037677.png

 

 

 

Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing

View solution in original post

Replies 4 (4)

chefsimecek
Excursionist
25 0 8

Screenshot 2024-10-10 at 13.24.46.jpg

 

EvinceDev
Shopify Partner
121 13 13

Hello @chefsimecek ,
Yes it is possible, could you share store url, password and cart code.

Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing
chefsimecek
Excursionist
25 0 8

Sure, www.littlesicily.cz Thank you.

EvinceDev
Shopify Partner
121 13 13

This is an accepted solution.

Hello @chefsimecek ,
Goto Online Store -> Edit Theme

EvinceDev_3-1728562146660.png

Search File 'main-cart-items.liquid'

EvinceDev_4-1728562196618.png

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>

EvinceDev_0-1728562028880.png

Change this number for Max stock limit

EvinceDev_1-1728562037677.png

 

 

 

Shopify Theme Advanced Backend Developer and Debugger
Want to modify or develop new app, Hire us.
If our Answer is helpful then please Like and Accept Solution!
I am an eCommerce and Marketing Technology consultant based in India.
To inquire about consulting work availability, You can reach me on Skype by live: rahul.evince or mail on partners@evincedev.com.
Shopify Apps URL :- https://apps.shopify.com/partners/gemfind1
Customization on Shopify Theme | Shopify App Development | SEO & Digital Marketing