View Single Post
  #8  
Old 12-09-2014, 04:59 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

OK, in this case you mod will work as follows:

0) The product's table is rendered according to the skins/admin/en/order/invoice/parts/items/items.tpl template. Of course, I am talking about admin area right now, but let's solve the problem for invoice in admin area first, so you could get an idea of approach and then you will be able to simply re-apply change to mail notifications.

1) You need to insert a template that will define a new column of the table into the "invoice.items.head" view list. The process is described here: http://kb.x-cart.com/display/XDD/Step+2+-+applying+design+changes#Step2-applyingdesignchanges-Addingnewtemplatesandwidgets

The code of such template will be something really easy like:
Code:
{* vim: set ts=2 sw=2 sts=2 et: *} {** * @ListChild (list="invoice.items.head", weight="5") *} <th class="item">Image</th>

2) Then, you need to insert a template into "invoice.item" view list. This template code will be simple as well:
Code:
{* vim: set ts=2 sw=2 sts=2 et: *} {** * @ListChild (list="invoice.item", weight="5") *} <th class="item"><widget class="\XLite\View\Image" image="{item.getImage()}" alt="{item.getName()}" maxWidth="80" maxHeight="80" /></th>

Please, let me know if it makes sense to 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:16 AM.
Reply With Quote