Hikashop Cart Module Product Image Thumbnail scales from 50x50

  • Posts: 5
  • Thank you received: 0
2 years 3 months ago #271600

Hey guyz,

Is my first time on this forum so I should apologize if I make any mistakes from start.

I am using the cart as a module and the size of the thumbnail is 50x50. After I click "proceed to checkout" button the size of the picture changes to 240x180 like I want it.

I have used the command: .hikashop_product_checkout_cart_image{ width: 240px !important; height: 180px !important; } and it scales the already 50x50 thumbnail to 240x180 :( and you can imagine that the quality of the so scaled picture is very low

How can I properly use the 240x180 thumbnail ?

Thank you for your suggestions.

Please Log in or Create an account to join the conversation.

  • Posts: 66882
  • Thank you received: 9885
  • MODERATOR
2 years 3 months ago #271627

Hi,

You can't do that in CSS.
You'll have to edit the view file which displays the cart in order to change the size of the images there, via the menu Display>Views.
If it's the cart module where you want to change the images, then it's the file "cart" of the view "product" that you want to edit.
You'll find that code:

$img = $this->imageHelper->getThumbnail(@$product->images[0]->file_path, array('width' => $width, 'height' => $height), $image_options);
where you can change $width and $height by the number of pixels that you want.
If it's the cart display on the checkout, then it's the file "show_block_cart" that you want to edit.
There, the code to change is:
'width' => $thumbnail_x,
					'height' => $thumbnail_y

The following user(s) said Thank You: gm417i

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 3
  • Hikashop Business
1 month 2 weeks ago #309461

I am having a similar issue where I would like the quality of images in cart module to be better (like it is on checkout page). For some reason the quality of cart page is really bad. I tried to find the code as listed above in file 'cart' page on view 'product' but could not find it. Did I miss it or has the location changed? Or do I need to do something else now?

website: www.pixelsandstrokes.com.au

Please advise. Kind regards,

Swapnil

Last edit: 1 month 2 weeks ago by snevgi. Reason: spelling error

Please Log in or Create an account to join the conversation.

  • Posts: 12136
  • Thank you received: 1673
  • MODERATOR
1 month 2 weeks ago #309467

Hello Swapnil,

If you want to edit the cart module the you'll just have to edit the code of the "Cart" file of the "Product" view of your front-end template via "Hikashop->Display->Views", and change the following line which is still in that file :

$img = $this->imageHelper->getThumbnail(@$product->images[0]->file_path, array('width' => $width, 'height' => $height), $image_options);

We wish you a nice day,
Kind regards,
Mohamed Thelji.

The following user(s) said Thank You: snevgi

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum