Post by mophielle » Tue Dec 08, 2015 4:36 am

Hello, i was trying to get a small thumb image at checkout page. Found something in the forum but i think it was another version of Opencart . The problem is, that i get an extra field in front of the product link, but it just shows the name of the product with link to it and not the picture, although i tried to copy the image thumb code of the cart page. At the cart page the code works but i think it won´t work at checkout because the thumb is too big ?
Does anybody know how to add the product picture at OC 1.5.6.4 at checkout page `?
I know there are a few extension to buy , but i just had problems with extensions i bought before, because my theme is not 100% compatible, so it would be great if i can do it on my own.
This is the code i tried at checkout.tpl, which showed just a text of the product

<td class="name"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo
$product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
<td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
<?php foreach ($product['option'] as $option) { ?>
<br />
&nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?></td>
<td class="model"><?php echo $product['model']; ?></td>
<td class="quantity"><?php echo $product['quantity']; ?></td>
<td class="price"><?php echo $product['price']; ?></td>
<td class="total"><?php echo $product['total']; ?></td>
</tr>


As well i tried to put this code from cart.tpl in front of it, which didn´t worked, although i changed <td class="image"> to "name" or even tried other things.
<td class="image"><?php if ($product['thumb']) { ?>
<a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>

Thank you in advance, i hope somebody can help me..

New member

Posts

Joined
Wed Jun 03, 2015 2:33 am

Post by IP_CAM » Tue Dec 08, 2015 12:06 pm

you are trying to use VARIABLES, declared/definded to be used in the Product-Page, but not existing as such, in/for the Checkout Section. Ou would have therefore to define/declare such VARIABLES in the matching Files withing the controller Section, in the Language Section, and possibly some stuff in the Model Section, as well, to make it work, after you redo the checkout Theme files accordingly.
But this is hard work. If therefore nothing matching exists, in the OC Extensions, I assume, you have to get it made, because, depending on your OC Code-knowledge, it could turn into a nightmare for someone, trying to assist. :o
Just, to give you some input..., nothing personal, just information. ;)
Ernie
hitline.info/shop/
Last edited by IP_CAM on Wed Dec 09, 2015 12:44 am, edited 2 times in total.

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by mophielle » Wed Dec 09, 2015 12:26 am

Yes maybe it would be a desaster.
So it´s not that easy to just say to OC, please show a link with thumbnail ? :D Instead of just a link to the product.
I read that you have to change something in controller/checkout.php as well, but didn´t worked.
I´m not a programmer so if you would say it´s too difficult and not as easy as written (changing 4 lines to get a thumb)
then i have to try someone´s module...
Maybe someone has an idea or a module working for each theme ?
Thank you for explaining.

New member

Posts

Joined
Wed Jun 03, 2015 2:33 am
Who is online

Users browsing this forum: No registered users and 5 guests