How to add a threshold for high inventory showing in Warehouse theme

Highlighted
New Member
2 0 0

I am working on adding the Warehouse theme by https://support.maestrooo.com/category/176-warehouse, to replace our current theme. This Warehouse theme has the ability to show inventory quantity, but I want to limit the inventory showing in each product to 20 even if they have 500. They have a bar feature that allows to set a cap to that, but the actual number still shows the high quantity number. I care more about the number than having a bar that caps. I just want it to say in stock if the number of product available is over 20. 

I have the preview link that can hopefully help you answer my question:

https://bricksandminifigsslc.com/products/infinity-cube?_pos=1&_sid=4e4bbe41b&_ss=r

 

0 Likes
Highlighted
New Member
2 0 0

Hello There,

Hope you are doing well!

I can assist you with your requirement.

Kindly revert back at rachel@cisinlabs.com

Or you can also add me over skype: live:.cid.52caceaa56239236 for further discussion

Looking forward to your response.

Warm Regards,

Rachel

0 Likes
Highlighted
New Member
2 0 0

I just emailed you Rachel. Look for an email from sensuminc.com.

0 Likes
Highlighted
Shopify Partner
2472 129 406

If you know where in the template the number is being output you can use the at_most filter to set a cap on the inventory number shown.

https://shopify.dev/docs/themes/liquid/reference/filters/math-filters#at_most

 

For the message you'll want something similar to 

{%- assign stock_message_threshold = 20- %}
{%- if variant.inventory_quantity > stock_message_threshold  -%}
<p>In Stock<p>
{%- endif -%}

 

Though alot of themes also make use of javascript for inventory stock displays either when the page loads or when a different variant is selected.

If you want me to customized it I can be hired at paull.newton+shopifyforums@gmail.com 

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
Highlighted
Trailblazer
380 15 14

Hi @BricksnMinifigs 

I hope you're doing great!

I would be happy to work with you. Please give me a suitable time to discuss your requirements.

Also, add me over Skype id- live:jennifer.wcoast or Email- sales@wreximinfotech.com

I look forward to your response!

Stay Well

Thanks!

0 Likes
Highlighted

Hi ,

I can help you display inventory stock for products.

Please connect further to discuss 

 

 

Regards

Deep

Shopify Expert | S: deepvyas71 | E: deepvyas71@gmail.com
0 Likes
Highlighted
Excursionist
61 1 1

Hello @BricksnMinifigs 

Greetings!

Surely I would be glad to help.

Kindly reach me over Skype or email me: vishakha.nagdewani@zehntech.com

Regards,

Skype ID: zehntechindore

0 Likes
Highlighted
Excursionist
110 1 1

Hi there, 

We can help you. Please contact me at biz@webdesksolution.com or Skype sales.wds

0 Likes