Jump to content

Having a special image


Recommended Posts

Hi,

 

I wanted to know, if there is a way of adding a special image. Basically what I want is having an image which is different for the home page.

 

The only thing I could think about is to add a new image to the product and then get this image. But I don't know how I can access this image specially. The only example where I saw the other images of a product being used is in the product.tpl and is using foreach. I would like for example to specifically access the second image !

 

Do you know if there is a way to do this ? Or maybe to add a title to the image and retrieve the image through the title ?

 

Thanks a lot :)

Link to comment
Share on other sites

Can you be more specific?

 

Do you want to automatically select the second picture - if it is available - for display on your homepage? Or do you want the introduction into your Prestashop of a new flag that indicates that a specific image should be used on the homepage (like the "cover" field in the product_image table of the database)? The first is rather simple to implement but the latter will involve quite some work.

Link to comment
Share on other sites

Well,

 

The first would be perfect,

I want to use it in the home featured block.

 

The problem, is that i'm quite a beginner, I've tried to search a way of retrieving all the images of the variable $product but I don't get to anything, I just find the "cover" image.

 

If you can lead me on the right way, it would be really cool :)

 

Thanks

Link to comment
Share on other sites

×
×
  • Create New...