Jump to content

(Solved) Custom Images based on Data Sheet


Recommended Posts

Is it possible to display an image based on the data sheet?

 

I do have some basic HTML knowledge so I'm happy to change the product.tpl file directly.

 

What I'm wanting to do is make the website show the little circular logos automatically rather than changing the HTML on every page:

http://www.sblite.co.uk/spot/572-phantom-25-led-spot.html

 

so if datasheet>DMX = "yes" then display one logo, if not, display something else, if empty, display nothing.

 

Any help would be appreciated

Thanks

Edited by SB Lite (see edit history)
Link to comment
Share on other sites

{$features[1]['value']}

 

When i use that it returns the value of the 7th in the list - What feature is at position 1 depends on the product.

 

EG: most pages have the first feature as size, if thats missed off the first feature becomes weight.

 

Is there anyway of keeping the features[1] to weight?

 

Thanks

Scott

Link to comment
Share on other sites

I managed to sort it :D

 

{foreach from=$features item=feature} {if $feature.name|escape:'htmlall':'UTF-8' == 'Sound to Light' &  $feature.value|escape:'htmlall':'UTF-8' == 'Yes'}<span> <img border="0" src="/img/buttons/s2l.jpg" alt="Sound to Light Mode" width="100" height="100">
</span>   {/if}{/foreach}
 
So now If a feature (such as sound to light in the above example) is 'Yes' in the data sheet a little logo/image appears on the product description.  
Link to comment
Share on other sites

×
×
  • Create New...