Jump to content
lucju04

Display a specefic product image in template

Recommended Posts

Hi Everybody, 

I started my first theming experience in prestashop. 

I would like to display a specific product image.

Today I have something like thaht in my template: 

<img src="{$product.cover.bySize.large_default.url}" alt="{$product.cover.legend}" title="{$product.cover.legend}" style="width:100%;" itemprop="image">

But I would like to always display only the second image product and put the url in the src attribute. 

How I can access to this ? I didn't find a doc about the $product object yet.  

Share this post


Link to post
Share on other sites

Hello:

With {debug} sentence anywhere inside your TPL you will have a popup screen with all the vars inside smarty. There you can find anything $product contains.

Regards

Share this post


Link to post
Share on other sites

Ho, my answer didn't work last time... 

This is exactly what I was looking for, special thanks for you ;) 

Share this post


Link to post
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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More