0

I'm setting up an online apparel store and would like to set up a conditional that will check the item count in a particular sku number and output something like this "Hurry, only 9 left!!" when the count is equal or less than say 10.

I tried

{if store_product_stock <= 10}
<p>Hurry, only <em><span class="store_product_stock"></span></em> left!</p>
{/if}

But that doesn't work. Any help would be great!

1

According to the store docs your can use total_stock for that.

Example:

{if total_stock > 0} In Stock {if:else} Out of Stock {/if}

https://www.exp-resso.com/docs/product_tag.html#total_stock

| improve this answer | |
  • Thank you, but that only applies to the item as a whole. I have different skus for a single product (tshirts with different sizes) – ninjaroll Apr 12 '15 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.