Jump to content

defining which image size to use


Recommended Posts

hi,

 

I have defined 2 new product image sizes in my prestashop

 

bottle = 60x135

clothing = 100x135

 

in my product-list.tlp page I have the following line for: bottles

 

<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'bottle')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($bottleSize)} width="{$bottleSize.width}" height="{$bottleSize.height}"{/if}  /></a>

 

I need to wrap a conditional statement around this for Clothing and say something like....

 

IF $product.id_image, 'clothing' THEN give it teh clothing height and width

 

Thanks

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