sickshot Posted May 10, 2014 Share Posted May 10, 2014 (edited) hello i need to insert image on product page for products which have specific reference code. so guess i need IF statement.. for example if 5 products have reference #123 then load image... can anyone show me how this code should look? TIA PS version 1.4 Edited May 13, 2014 by sickshot (see edit history) Link to comment Share on other sites More sharing options...
sickshot Posted May 13, 2014 Author Share Posted May 13, 2014 anyone can give me a hint please? Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted May 13, 2014 Share Posted May 13, 2014 Modify your theme file product.tpl {$product->reference == $your_condition}<img src="LINK_TO_YOUR_IMAGE_FILE" alt="img" />{/if} variable $your_condition can be defined in ProductController.php (override) or in your custom module file Link to comment Share on other sites More sharing options...
sickshot Posted May 13, 2014 Author Share Posted May 13, 2014 Modify your theme file product.tpl {$product->reference == $your_condition}<img src="LINK_TO_YOUR_IMAGE_FILE" alt="img" />{/if} variable $your_condition can be defined in ProductController.php (override) or in your custom module file thank you your code works great, even without adding code to ProductController.php Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now