View Single Post
  #7  
Old 07-30-2008, 10:29 PM
 
retrtrtrytrutru retrtrtrytrutru is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 101
 

Default Re: Invoice mailable for envelope with window

I can post the layout I creared from scratch for you here. The layout of the "shipping address" area fits our envelopes nicely. I will only paste the relevant part since the complete invoice is custom, I didn't like the X-Cart layout at all and with our invoice custom texts are included, depending on which payment method the customer has selected (e.g. bank transfer will include a custom footer with our bank account details).

In mail/html/order_invoice.tpl paste the following at the top. You should remove the old invoice and shipping address table but I cannot advise you how to do that since I don't know what your template looks like. The code below will add the invoice address and to the right of it the shipping address.

Code:
<table cellspacing="0" cellpadding="0" width="600" border="0"> <tr> <td width="285">&nbsp;</td> <td width="75">&nbsp;</td> <td width="240" height="25"><b>{$lng.lbl_shipping_address}</b></td> </tr> <tr> <td><img height="2" src="{$ImagesDir}/spacer.gif" width="1" alt="" /></td> <td><img height="2" src="{$ImagesDir}/spacer.gif" width="1" alt="" /></td> <td bgcolor="#000000" height="2"><img height="2" src="{$ImagesDir}/spacer_black.gif" width="100%" alt="" /></td> </tr> <tr> <td colspan="3"><img height="2" src="{$ImagesDir}/spacer.gif" width="1" alt="" /></td> </tr> <tr> <td valign="top"> <table cellspacing="0" cellpadding="0" width="100%" border="0"> {if $_userinfo.default_fields.firstname}<tr><td>{$order.firstname}</td></tr>{/if} {if $_userinfo.default_fields.lastname}<tr><td>{$order.lastname}</td></tr>{/if} {if $_userinfo.default_fields.b_address}<tr><td>{$order.b_address}</td></tr>{/if} {if $_userinfo.default_fields.b_address_2}<tr><td>{$order.b_address_2}</td></tr>{/if} {if $_userinfo.default_fields.b_zipcode}<tr><td>{$order.b_zipcode}{if $_userinfo.default_fields.b_city}, {$order.b_city}{/if}</td></tr>{/if} {if $_userinfo.default_fields.b_country}<tr><td>{$order.b_countryname}</td></tr>{/if} </table> </td> <td>&nbsp;</td> <td valign="top"> <table cellspacing="0" cellpadding="0" width="100%" border="0"> {if $_userinfo.default_fields.s_firstname}<tr><td>{$order.s_firstname}</td></tr>{/if} {if $_userinfo.default_fields.s_lastname}<tr><td>{$order.s_lastname}</td></tr>{/if} {if $_userinfo.default_fields.s_address}<tr><td>{$order.s_address}</td></tr>{/if} {if $_userinfo.default_fields.s_address_2}<tr><td>{$order.s_address_2}</td></tr>{/if} {if $_userinfo.default_fields.s_zipcode}<tr><td>{$order.s_zipcode}{if $_userinfo.default_fields.s_city}, {$order.s_city}{/if}</td></tr>{/if} {if $_userinfo.default_fields.s_country}<tr><td>{$order.s_countryname}</td></tr>{/if} </table> </td> </tr> </table>

If you need to change the widths of the invoice address you can change the width values of the top rows:

Code:
<td width="285">&nbsp;</td> <td width="75">&nbsp;</td> <td width="240" height="25"><b>{$lng.lbl_shipping_address}</b></td>

But note, if you increase one width you have to decrease another width with the same amount, else the total width will become too big and won't fit when you print it on paper. I hope you know basic HTML because else you will have a lot of difficulty figuring this out. Good luck!
__________________
www.qualitylamps.eu
X-Cart Gold 4.1.8, PHP 5.2.6, MySQL 5.0.51a, Apache 2.2.9

www.vervangjelamp.nl
X-Cart Gold 4.2.0, PHP 5.2.6, MySQL 5.0.37-standard, Apache/2

Sorry for the weird user name, I registered it by mistake
Reply With Quote