Add product thumbnail in PRODUCTS IN YOUR ORDER block in check out page

hi,



I am trying to add a thumbnail just next to product name in product in your order block in checkout page,



I tried adding this



[color=#000000] {include file=“common_templates/image.tpl” image_width=‘50’ obj_id=$product.product_id image=$product.main_pair.icon object_type=“product”}[/color]



in

/skins/basic/customer/blocks/checkout/products_in_cart.tpl



file



But nothing happened… Can experts help me out in this.



Thanks

Untitled-1.png

Issue Solved guys.





I figured out the way.

It would be beneficial to post the solution here too. After all, this is a Community and you can only get out of it what you put back in.

The solution is on my first post itself. Just image.tpl call in that file location given above.





Done some silly mistake. (forgot to upload file back to server)



:neutral:

Hi Guys, does anyone have a suggestion for V4? I have;



design/themes/basic/templates/addons/my_changes/overrides/blocks/checkout/products_in_cart.tpl



and based on the above code, I included the file; image.tpl which in my case (custom template) I found in;



design/themes/basic/templates/addons/my_changes/overrides/common/image.tpl



I successfully included the file (no smarty errors) with this path; {include file=“common/image.tpl” image_width='40' obj_id=$product.product_id image=$product.main_pair.icon object_type=“product”}



But I get a “no image” icon showing instead. Obviously the path to the images themselves is wrong somehow, anyone have an idea?



Thanks in advance,



Scott.

Anyone? Vali? Stellar?

Hi Scott,



For v4.x (4.1.2)

Please add into the file [color=#ff0000]design/themes/basic/templates/addons/my_changes/hooks/block_checkout/cart_products.override.tpl[/color]```php


{if !$cart.products.$key.extra.parent}


  • {include file="common/image.tpl" image_width="40" image_height="40" images=$product.main_pair no_ids=true link_class="float-left"}{$product.product nofilter}{if !$product.exclude_from_calculate}{include file="buttons/button.tpl" but_href="checkout.delete?cart_id=`$key`&redirect_mode=`$runtime.mode`" but_meta="delete" but_target_id="cart_status*" but_role="delete" but_name="delete_cart_item"}{/if}
    {$product.amount} x {include file="common/price.tpl" value=$product.display_price}
    {include file="common/options_info.tpl" product_options=$product.product_options no_block=true}
    {hook name="block_checkout:product_extra"}{/hook}

  • {/if}
    <br />
    I use hook feature instead of override of changing the core file <img src="upload://ssa1U17ndImgNZSdwFNmOF2yUgM.png" class="bbc_emoticon" alt=";)"><br />
    <br />
    The difference:<br />
    <br />
    #before```php
    <br />
    <a href="{"products.view?product_id=`$product.product_id`"|fn_url}" class="product-name">{$product.product nofilter}</a><br />
    
    ```<br />
    #after```php
    <br />
    <a href="{"products.view?product_id=`$product.product_id`"|fn_url}" class="product-name">{include file="common/image.tpl" image_width="40" image_height="40" images=$product.main_pair no_ids=true link_class="float-left"}{$product.product nofilter}</a><br />
    
    ```<br />
    <br />
    Clear cache after adding the file of code.<br />
    <br />
    You can also find a demo on [url="http://bit.ly/1hONzTs"]hungryweb.net/demo[/url]<br />
    <br />
    I hope that helps,<br />
    <br />
    ---<br />
    Valentin<br />
    [color=#808080][size=2]part of hungryweb.net[/size][/color]

    Hi Valentin, thank you so much mate. I'm currently running 4.0.3 - do you think this code will work on that version, or should i update first?



    Thanks again,



    Scott.

    Confirmed it works in 4.0.3! :-)

    [quote name=‘Scott_C’ timestamp=‘1393478040’ post=‘178366’]

    Confirmed it works in 4.0.3! :-)

    [/quote]

    Great Mod, works perfect in 4.1.2



    Alan