Change size of image on cart page

  • Posts: 28
  • Thank you received: 0
12 years 9 months ago #37576

I have looked at the code on the cart view for my theme but for the life of me i cant see how to change the thumbnail height and width i dont want to change the main thumbnail height and width as i use those dimensions for different areas of the shop where can i change the image that is displayed beside the cart qty etc i tried adding height and width to the style but it had no effect why does the cart module miss the thumbnail width and height

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 9 months ago #37697

You should edit the file "cart" of the view "checkout" of your frontend template via the menu Display->views and change the code:

echo $this->image->display($image->file_path,true,$image->file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"');
to:
echo $this->image->display($image->file_path,true,$image->file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','',XXX,YYY);
Where XXX and YYY are the width and height for your thumbnails

The following user(s) said Thank You: pina, santhis

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

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
12 years 4 months ago #58797

Is there a Typo in the code??

I tried:

vertical-align:middle"','',58,70); ?>

and
vertical-align:middle"','',58px,70px); ?>

Both not working


I'll keep on trying!

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 3 months ago #58849

The second one is definitely not ok. The first one should work.
If you don't see any difference, it's probably because you're editing the file for another template that the template you're using on your front end.

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

  • Posts: 246
  • Thank you received: 9
  • Hikashop Business Hikashop Essential
12 years 3 months ago #58900

nicolas wrote: The second one is definitely not ok. The first one should work.
If you don't see any difference, it's probably because you're editing the file for another template that the template you're using on your front end.



Ah, you'r right. It's working now.

Thanks.


I'll keep on trying!
The following user(s) said Thank You: santhis

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

  • Posts: 84
  • Thank you received: 0
10 years 7 months ago #151150

Hi,

sorry to scotch onto this post, however it seems appropriate....

I am trying to achieve the same (reduced image size in cart) and am in the checkout/cart.php on the right template however things seem to have evolved since this post was created and the code edit suggested doesn't seem relevant anymore - gone responsive :). Any clues as to how to achieve this?

kindly

Luke

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

  • Posts: 12953
  • Thank you received: 1778
10 years 7 months ago #151180

Hello Luke,
A solution can be to use some CSS code to reduce the product images through your checkout cart.

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

  • Posts: 846
  • Thank you received: 92
10 years 7 months ago #151956

Hi
have you got an url to the web page issue ?

Regard's

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

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
10 years 3 weeks ago #177233

I have this same issue for version 2.3.4. Where would I need to put new css? and what would the css look like to do this?

Regards

Martyn

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
10 years 3 weeks ago #177253

Hi,

On which area do you want to change the images size ?
The cart display page ? The checkout cart view ? The HikaShop cart module ?
On the checkout, it's that CSS you can add:
.hikashop_product_checkout_cart_image{ width: 50px !important; height: 50px !important; }

Mohamed already posted a link of the documentation explaining how to add such CSS in HikaShop:
www.hikashop.com/support/153-customize-the-display.html

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

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
10 years 3 weeks ago #177356

Hi Nicolas,

Thank you for the reply, I had managed to answer my own question after posting. I am fairly new to CSS etc so didn't understand the datails of Mohamed's link but have now worked it out. It was the checkout cart view that I needed to change.

Many Thanks

Martyn

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

Time to create page: 0.118 seconds
Powered by Kunena Forum