Jump to content

Using different pictures for Products lists and Product page


Recommended Posts

Hi!

 

I'm working on a tshirt shop and I'd like to use different images for the product list and main image on the product page. That is: a photo of the design for the mainpage and a photo of a model wearing the tshirt as the main picture in the product page. I've been searching forums, google and the prestashop backoffice itself for a solution or a module that can do the job but so far haven't found anything. I have the feeling that this must be quite simple, but I don't know how to proceed. Any clues?

 

Thanks in advance!

Link to comment
Share on other sites

You can use different image sizes, this is simple, but to use different image, well this is not so easy.

 

Images are called by ID , and it is displaying always the cover image, so you need to create function who define second image like cover 2, and to insert this new function into product-listing and then you can make every 2nd image to be in product listing for example.

 

See the code

 

<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_dm')}"

 

You have to change $product.id_image with your function where the ID is different from the main picture.

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...