View Single Post
  #12  
Old 12-24-2014, 05:32 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 topspin6711!

You are totally right about my mistakes in the code. Sorry for that and corrected my initial code.

The thing about calling <widget> is you basically saying "OK, X-Cart, you have to display an image with source passed in image param, alt from alt param and dimensions defined in height/width params". Of course, you can do the same by specifying this code in template:

<img src="{item.getImage()}" alt="item.getName()" max-width="80" max-height="80">

but X-Cart will slice an image on fly if you call it via widget, so if you call <widget> your notification will have 80x80 image, while if you call <img src>, your notification will have big image resized by mail client.

Hopefully, it helps. Let me know if it is still unclear why <widget> is used.
__________________
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