Show Image In Manage.tpl

Im trying to show product images on manage.tpl admin side with no luck. Anyone can point me on the rigth direction pls?

here is my code on the hook

{include file="common/image.tpl" image=$oi.main_pair.icon|default:$oi.main_pair.detailed image_id=$oi.main_pair.image_id image_width=$addons.cp_extended_order.image_width|default:"50" image_height=$addons.cp_extended_order.image_height href="products.update?product_id=`$oi.product_id`"|fn_url}

But just get a blank thumb.

I appreciate any help

Best !

What version do you use? Product images are displayed on the Manage products page in 4.x. versions.

Hi again eComLabs, thanks for your help man.

Yes i have 4.x but im modifying the manage.tpl with some hooks, I want to show image and payment method on every order with an accordion dropdown.

I add this to my hook

     {include file="common/image.tpl" image=$oi.main_pair.icon|default:$oi.main_pair.detailed image_id=$oi.main_pair.image_id image_width=50 href="products.update?product_id=`$oi.product_id`"|fn_url}

Best Regards!

JEMA

Hi again eComLabs, thanks for your help man.

Yes i have 4.x but im modifying the manage.tpl with some hooks, I want to show image and payment method on every order with an accordion dropdown.

I add this to my hook

     {include file="common/image.tpl" image=$oi.main_pair.icon|default:$oi.main_pair.detailed image_id=$oi.main_pair.image_id image_width=50 href="products.update?product_id=`$oi.product_id`"|fn_url}

Best Regards!

JEMA

As far as I am concerned, you shouldn't get blank images there..

This will be a silly question but have you assigned a photo to the product?

Hi ExeLorien, yes product have images :?

Tnx for your awnser :)

JEMA

The main issue here is that the images data is not retrieved from the database on the Manage orders page. The new code should be similar to

{$main_pair = $oi.product_id|fn_get_image_pairs:'product':'M':true:true}
{include file="common/image.tpl" image=$main_pair.icon|default:$main_pair.detailed image_id=$main_pair.image_id image_width=50 href="products.update?product_id=`$product.product_id`"|fn_url:'A'}

(!) Not tested

The main issue here is that the images data is not retrieved from the database on the Manage orders page. The new code should be similar to

{$main_pair = $oi.product_id|fn_get_image_pairs:'product':'M':true:true}
{include file="common/image.tpl" image=$main_pair.icon|default:$main_pair.detailed image_id=$main_pair.image_id image_width=50 href="products.update?product_id=`$product.product_id`"|fn_url:'A'}

(!) Not tested

Hey there eComLabs, work like a charm at the first try, Superb dude! Now i figure out why, and this tip is very usefull to the rest of modifications i need.

Thanks A LOT !!

JEMA

We are glad to help you.

This no longer works

This no longer works

Clear cache after the changes are applied

Clear cache after the changes are applied

I did, it's still showing no image on the order manage page for admin and vendors and customer

How do you get $oi variable?

How can i get the $oi variable? {assign var="oi" value="...."}

How can i get the $oi variable? {assign var="oi" value="...."}

You should check documentation for developers to understand how to debug variables in templates

Please can you give me the snippet to get the io variable on the order manage.tpl on the vendor and customer order manage pages? i have searched everywhere i couldn't find anything

I am afraid this information even is not retrieved from database on the manage orders page.

yeah, there's a patch to get if from database on other source, you have do something like that before boss, please help