View Single Post
  #10  
Old 12-16-2014, 05:06 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Adding Images to the Invoice

Hi Michael!

Let us add a product image for product table for order invoice that displayed in admin area first. It will be an example of you, so you could grasp an idea.

I assume, you create a mod with developer ID DevId and module ID ModuleId

1) Create the skins/admin/en/modules/DevId/ModuleId/head.tpl template with the content:
Code:
{* vim: set ts=2 sw=2 sts=2 et: *} {** * @ListChild (list="invoice.items.head", weight="5") *} <th class="item">Image</th>

2) Create the skins/admin/en/modules/DevId/ModuleId/image.tpl template with the content:
Code:
{* vim: set ts=2 sw=2 sts=2 et: *} {** * @ListChild (list="invoice.item", weight="5") *} <widget class="\XLite\View\Image" image="{item.getImage()}" alt="{item.getName()}" maxWidth="80" maxHeight="80" />

After you do this, your order invoices in admin area will start displaying product images.

Try this and let me know if it works for you.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!

Last edited by tony_sologubov : 12-24-2014 at 05:15 AM.
Reply With Quote