Skip to main content

multiple images in cart.php

More
13 years 9 months ago #82920 by Fontijn
Hi,

I made it so that checkout/cart.php shows one image
Code:
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.

More
13 years 9 months ago #82987 by nicolas
Replied by nicolas on topic multiple images in cart.php
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.

More
13 years 9 months ago #83087 by Fontijn
Replied by Fontijn on topic multiple images in cart.php
thank's it is working now.

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

Time to create page: 0.152 seconds
Powered by Kunena Forum