how to - Lead time message displayed based on variant quantaties?

Highlighted
Tourist
4 0 1

I track quanaites and allow purchase if quanity is 0 or less. If quanity is 0 or less text displays with our lead-time. But on some products I would like it to show "Item will ship in 1-3 business days." if variant quanity is 1 or more. Then "Item is out of stock. Please allow up to two weeks for us to make and ship this item."  if variant quantity is 0 or less.

Right now I have this:

      <div class="description">
        {{ product.description }}
        {% assign variant = product.variants.first %}
{% if variant.inventory_quantity <= 0 and variant.available and variant.inventory_management != '' %}
<p style="color:#CD4F39">Item is out of stock. Please allow up to two weeks for us to make and ship this item.</p> 
{% endif %}
      </div>

BUT if one variant has a quanity of 1 or more the text doesn't show up at all for the other variants. So I would like to either have the out of stock message show up only for variants that are out of stock. Or ideally have an in stock message show up for the variant that is in stock, and an out of stock message show up for the variant that is out stock. How would I do that? 

Thanks!

 

Highlighted
New Member
1 0 0

Any chance you figured this out?

0 Likes