Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding Images to the Invoice

 
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-25-2014, 09:55 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Adding Images to the Invoice

How would I go about adding images to the email invoice and the online Invoice?
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #2  
Old 11-26-2014, 06:21 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

You should edit the notification template according to:
http://kb.x-cart.com/display/XDD/Basic+guide+to+theme+creation#Basicguidetothemecre ation-UsingCustomSkinmodule

As for pulling product image, you can do this like this in template:
{product.getImage()}
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 11-30-2014, 05:23 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Adding Images to the Invoice

So how do I determine which tpl to look for...There are hundreds of them. I'd like the picture to show up everywhere it shows information about the order, on the admin, the front end, and in the email notification. How do I figure all that out without spending hours poking through tpls?
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #4  
Old 12-01-2014, 04:57 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

You can use Webmaster Kit module on the Order invoice page in admin area.

If you find that you need to put your image into, let's say, admin/en/order/invoice/body.tpl template, it means that you need to actually insert an image into skins/mail/en/order/invoice/body.tpl template in order to add image to an email notification.

Anyway, if you tell me where exactly you want to show an image in the notification, I will be able to tell you a specific template.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #5  
Old 12-04-2014, 05:06 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Adding Images to the Invoice

I want to insert a Column next to Item in the Order Details in the Admin area and the end user view. It's also import that when the emails get generate that go to the user and various departments that the Column with the image be there as well.
http://i21.photobucket.com/albums/b298/fasterthanyours/Invoiceinemail.jpg
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #6  
Old 12-05-2014, 01:21 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

Does it mean that your product image should be displayed in an area marked by red on my snapshot?
http://awesomescreenshot.com/0453z4fac3
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #7  
Old 12-05-2014, 01:58 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Adding Images to the Invoice

No on the left of the Item Column in a new Column.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #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
  #9  
Old 12-11-2014, 04:43 PM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Adding Images to the Invoice

It makes sense, but I'm still lost. I used the webmaster tools, but I don't understand how to figure out which tpl the columns are in. I'ts not clear to me whether or not this is a Module or if I'm modding the files on the server.
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote
  #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

The following user thanks tony_sologubov for this useful post:
topspin6711 (12-21-2014)
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:58 PM.

   

 
X-Cart forums © 2001-2020