Jump to content

Show stock level for combinations


Recommended Posts

I've been using the following code for showing the stock level with icons. Unfortunately it doesn't work when ever I use combinations.


		{if $product->quantity > 5} I lager <div class="space5"> </div>  <img src="{$img_dir}icon/stockfull.gif" />{/if}
		{if $product->quantity == 4} I lager <div class="space5"> </div>  <img src="{$img_dir}icon/stockfull2.gif" />{/if}
		{if $product->quantity == 3} I lager <div class="space5"> </div>  <img src="{$img_dir}icon/stockfull2.gif" />{/if}
		{if $product->quantity == 2} I lager <div class="space5"> </div>  <img src="{$img_dir}icon/stockfull3.gif" />{/if}
		{if $product->quantity == 1} Sista ex. <div class="space5"> </div>  <img src="{$img_dir}icon/lastinstock.gif" />{/if}
		{if $product->quantity == 0} Ej i lager <div class="space5"> </div>  <img src="{$img_dir}icon/stockout.png" />{/if}
		{if $product->quantity < 0} Beställningsvara <div class="space5"> </div>  <img src="{$img_dir}icon/stockbackorder.gif" />{/if}


Does anyone have a suggestion for how to modify this code to work when using combinations?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...