Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Show Image In Manage.tpl Rate Topic   - - - - -

 
  • jema1970
  • Member
  • Members
  • Join Date: 04-May 08
  • 60 posts

Posted 03 January 2017 - 01:51 AM #1

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 !


JeMa // Using Cs-Cart since 2008 ;)


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 04 January 2017 - 07:53 AM #2

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • jema1970
  • Member
  • Members
  • Join Date: 04-May 08
  • 60 posts

Posted 04 January 2017 - 01:55 PM #3

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. 

 

 

CS-CART-Product-hook2.jpg

 

 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


JeMa // Using Cs-Cart since 2008 ;)


 
  • exelorien
  • Senior Member
  • Trial users
  • Join Date: 08-Dec 16
  • 157 posts

Posted 04 January 2017 - 02:03 PM #4

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. 

 

 

CS-CART-Product-hook2.jpg

 

 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?



 
  • jema1970
  • Member
  • Members
  • Join Date: 04-May 08
  • 60 posts

Posted 04 January 2017 - 02:40 PM #5

Hi ExeLorien, yes product have images  :?

 

Tnx for your awnser :)

 

JEMA


JeMa // Using Cs-Cart since 2008 ;)


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 05 January 2017 - 07:35 AM #6

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • jema1970
  • Member
  • Members
  • Join Date: 04-May 08
  • 60 posts

Posted 05 January 2017 - 02:38 PM #7

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


JeMa // Using Cs-Cart since 2008 ;)


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 06 January 2017 - 06:32 AM #8

We are glad to help you.


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 282 posts

Posted 05 January 2021 - 11:00 PM #9

This no longer works



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 06 January 2021 - 06:39 AM #10

This no longer works

 

Clear cache after the changes are applied


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 282 posts

Posted 06 January 2021 - 02:52 PM #11

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 10 January 2021 - 06:49 AM #12

How do you get $oi variable?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 282 posts

Posted 10 January 2021 - 07:19 PM #13

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 11 January 2021 - 05:10 AM #14

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 282 posts

Posted 11 January 2021 - 11:04 AM #15

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 21562 posts

Posted 11 January 2021 - 01:28 PM #16

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 282 posts

Posted 11 January 2021 - 08:42 PM #17

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