How do I show only the available quantity on the product page? (Brooklyn Theme)

Highlighted
New Member
2 0 2

How do I show only the available quantity on the product page? (Brooklyn Theme) (ex: If there's only 1 available art print, I want the shown quantity allowed to be added 1. Right now you can add as many and it sums up the price when you go to the cart. Thanks whoever can help out with this issue! 

 

Best,

Manny

1 Like
Highlighted
Shopify Partner
7687 1058 2674

Hello, @manzmac 

Welcome to the Shopify community!
and Thanks for your Good question.

please add this code product-template file whenever do you have display 

<div id="variant-inventory">
       {% if product.variants.first.inventory_management == "shopify" %}
          {% if product.variants.first.inventory_quantity > 0 %}
              <span class="green"> We currently have {{ product.variants.first.inventory_quantity }} in stock.</span>
          {% else %}
           <span class="ofstock">  The product is out of stock</span>
          {% endif %}
       {% else %}
          <span class="green">This product is available</span>
       {% endif %}
      </div>

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
1 Like
Highlighted
New Member
2 0 2

Hi! 

Thank you and thanks for your help. I tried to add that code to the "product.liquid". Copied and pasted it at the end of the code, but it's still having the issue of showing unlimited quanities. Did I place it in the correct spot? Thanks for you help!

1 Like
Highlighted
Shopify Partner
7687 1058 2674

@manzmac 

Thanks for update

can you please provide code so i will update,

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes