multiple images in cart.php

  • Posts: 16
  • Thank you received: 0
11 years 10 months ago #82920

Hi,

I made it so that checkout/cart.php shows one image

echo '<img src="'.$this->image->uploadFolder_url.$image->file_path.'" alt="'.$image->file_name.'" id="hikashop_main_image" style="max-width: 250px;"/>';

But i want it to show all the images that i assign to that product.


Thanks in advance.

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

  • Posts: 82818
  • Thank you received: 13360
  • MODERATOR
11 years 10 months ago #82987

Hi,

instead of :
<?php echo $this->image->display($image->file_path,true,$image->file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"', '', $width, $height); ?>

use that code:
<?php foreach($row->images as $image) echo $this->image->display($image->file_path,true,$image->file_name,'style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"', '', $width, $height); ?>

in the file 'cart' of the view "checkout" via the menu Display->Views.

The following user(s) said Thank You: Fontijn

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

  • Posts: 16
  • Thank you received: 0
11 years 10 months ago #83087

thank's it is working now.

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

Time to create page: 0.051 seconds
Powered by Kunena Forum