thumbs in gkAjaxCart wrong aspect ratio

GK User
Thu Mar 08, 2012 9:19 am
i'm having an issue with the store when adding items and pressing the store gkAjaxCart - the thumbs become forced to 90x90px... before it wasn't like that.. something changed with the template update.

can you help me find that fix?


Screen Shot 2012-03-08 at 12.16.59 AM.png

here is a shot - the left is the correct aspect ration and the right gets forced into a 90x90px..

i did change the
Thumbnail Image Width 100px
Thumbnail Image Height 56px

in VM configureation.. but why is it forcing 90x90px.. can i set that to be max witdth instead of forced.
User avatar
Expert Boarder

GK User
Thu Mar 08, 2012 9:31 am
i figured that if i change

<img src="/images/stories/virtuemart/product/resized/alex7_100x56.jpg" alt="" width="90" height="90">

to

<img src="/images/stories/virtuemart/product/resized/alex7_100x56.jpg" alt="" >

it's perfect..where can i find that in the code to remove it.. hopefully using an override.. thanks.
User avatar
Expert Boarder

GK User
Wed Mar 14, 2012 7:49 am
can you help me find the code where can i override the 90px height and width?
User avatar
Expert Boarder

GK User
Wed Mar 14, 2012 7:54 am
I cannot see the page where it is forcing 90px, can you post a link please.

See you around...
User avatar
Platinum Boarder

GK User
Wed Mar 14, 2012 8:28 am
actually.. i just figured it out.. it was in the popup cart when there is an item in it.

here is my fix.


File: /templates/gk_esport/html/mod_virtuemart_cart/default.php
Find line 72:
Code: Select all
<img src="<?php echo $images[$product['product_sku']]; ?>" alt="" width="90" height="90" />


remove: width and height
Code: Select all
<img src="<?php echo $images[$product['product_sku']]; ?>" alt=""/>



I believe the reason this was like this is because in VM - my thumbnail width and height were set to NOT-square aspect ration - instead to 100px X 56px.

However, now the show cart is being cut of in the ajax popup module. :(
User avatar
Expert Boarder

GK User
Wed Mar 14, 2012 8:34 am
Actually.. i figured it out - the file needs the height and width. otherwise things get messed up.

File: /templates/gk_esport/html/mod_virtuemart_cart/default.php
Find line 72:
Code: Select all
   <img src="<?php echo $images[$product['product_sku']]; ?>" alt="" width="90" height="90" />


change: width and height
Code: Select all
<img src="<?php echo $images[$product['product_sku']]; ?>" alt="" width="100" height="56"/>


This is the solution if you don't want square thumbs as the main product image.

Screen Shot 2012-03-14 at 12.33.48 AM.png
User avatar
Expert Boarder


cron