Jump to content

[SOLVED] image on product page for specific product


sickshot

Recommended Posts

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 by sickshot (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...