Jump to content

[Solved] module blockviewed image aspect ratio


Recommended Posts

Dear all,

I am using a modified images.inc.php because I had to remove the white background of my photos. Everything works excellent except the following:

1. module Blockviewed (on homepage) does not show my pictures in the right aspect ratio. It is using the "home"-thumbnail (ex. 1-810-home.jpg) which is in the right ratio when I'm opening this file. In the viewed product block, these pictures are showing as a square thumb (stretched).

2. Features-products_block does not show my pictures in the right aspect ratio. same issue as 1. I think.


Who can help me to change the code which is causing this streching of my images?

featured-products.JPG

Link to comment
Share on other sites

Couple of hours of headbreaking, slamming to the wall, hitting my keyboard, I solved it and just want to share with you in case somebody faces the same issue.

just simple, removed the following:

before (homefeatured.tpl):

getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />



after (homefeatured.tpl):

getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.name|escape:html:'UTF-8'}" />




And the same for blockviewed.tpl:

before (blockviewed.tpl):

getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite, $viewedProduct->ean13)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" />



after (blockviewed.tpl):

getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite, $viewedProduct->ean13)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" />

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