Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi all. I am looking to add remaining quantity to my products and variants in my Shopify site. We are currently using the Refresh theme and whilst I can find instructions on Google to add code to the product-template.liquid, I can't find this in the code list for Refresh theme.
Can anyone guide on a way to add stock remaining quantity number in this theme?
Solved! Go to the solution
This is an accepted solution.
Hi @WDM_Samuel
Refresh theme has Inventory status function by default. You just need to add this block from your theme customize
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
This is an accepted solution.
Hi @WDM_Samuel
Refresh theme has Inventory status function by default. You just need to add this block from your theme customize
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
Thank so much! I didn't see this at all! I really appreciate it.
I’m not finding this. Could the updated Refresh theme be different? If so, could you provide a work around for this?
Could you take screenshot of your product page template?
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
I was able to find in the theme to add the Inventory Status. But I would like to have it where the customer is only able to select the amount of inventory we have in stock for that item from the quantity dropdown. Is there a way I could do that within the Refresh Theme? And also have the cart reflect the same. Example: if we only have 2 in stock, the cart will only allow 2 to be added.
Hi @WDM_Samuel
This is Noah from PageFly - Shopify Page Builder App
Because each theme will have different structures. In the Refresh theme they handled the product in another file name: main-product.liquid.
You can try to add the code here, where you want it to show the stock and code to handle update the stock
Hope this can help you solve the issue
Best regards,
Noah | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hello @WDM_Samuel ,
You can try to follow these steps:
Go to Online Store -> Themes -> Actions -> Edit code
Go to Sections -> product-template.liquid file
Locate the loop that iterates through the product variants. It typically starts with something like {% for variant in product.variants %}. Modify it like this:
{% for variant in product.variants %}
{% assign remaining_quantity = product.inventory_quantity - variant.inventory_quantity %}
<p>{{ remaining_quantity }} units available</p>
{% endfor %}
Save and preview
Hope this can help.
Transcy