SB Lite Posted July 1, 2014 Share Posted July 1, 2014 (edited) 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 July 4, 2014 by SB Lite (see edit history) Link to comment Share on other sites More sharing options...
SB Lite Posted July 2, 2014 Author Share Posted July 2, 2014 {$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 More sharing options...
vekia Posted July 2, 2014 Share Posted July 2, 2014 sadly while im trying to view your website page is just blank Link to comment Share on other sites More sharing options...
SB Lite Posted July 4, 2014 Author Share Posted July 4, 2014 I managed to sort it {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 More sharing options...
Recommended Posts