My client wants to show the product availability in the list of products in the sub-pages and result page. Now I managed to place the product availability with the $aData[sAvailable] tag, but this only shows what the user has inserted in the admin.
I want to make this dynamic because I wish to add an icon to each particular description. For example, when the user inserts "Op voorraad" in admin, the front should show a particular icon.
What I did now, is I inserted a img tag in admin, but obviously, this is not the best solution. I want to create a function or method that changes the output depending on the input.
I managed to paste the $aData[aAvailable] tag into pages_defailt.tpl, but I can't use php to check the value. I wish to check the value, so I can decide what icon I want to add to it.
In file templates/pages_default.tpl in block PRODUCTS_LIST You can add variable $aData[sAvailableIcon]
Most important is statement in listProducts() function. It means if You set product's availablity to the same value which is in variable $lang['AvailableOption1'] script will add image code:
<img src="path_to_icon/icon.jpg" alt="" />
of course You have to change path and name of image. Is it clear for You?