Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Stock level incon display.


Recommended Posts



Is i possible to get this code to work with letters and not only numbers?

Am i trying to display a icon that says "Available on request" Then the product quantity is sett to "b".

I have changed the sql so that products_quantity can contain varchar, I also changed my products quantity to b on one test product

But it does not seem like the code recognize "b"

Anybody have a suggestion for this??

	$prod_quantity = tep_get_products_stock($products_id); 
	switch ($prod_quantity) { 

	case 0: // change this to a quantity you want - it's the for "available on request"
		print '<img src="images/stock_soldout.gif" border="3" title="" alt="Ut Solgt">'; 	

	case b: // change this to a quantity you want - it's the number for "available within 10 workdays"
		print '<img src="images/stock_limitedstock.gif" border="3" title="" alt="På Bestilling">'; 

	default: //if the quantity is not 1 or 0, this text will be shown.
	print '<img src="images/stock_instock.gif" border="1" title="" alt="På lager">'; 

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...