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

Modifing the main/order_invoice_print.tpl Template

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-20-2004, 10:59 PM
  painfulpleasures's Avatar 
painfulpleasures painfulpleasures is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: baltimore MD
Posts: 37
 

Default Modifing the main/order_invoice_print.tpl Template

Im trying to modify the Invoices that we print from xcart. I want to add my companies name and address on each invoice so we don't have to stamp the invoices by hand.

http://www.painfulpleasures.com/body_jewelry/images/invoice_image.gif

this is the information or image im trying to put in the template

This is the Order Invoice Print Template below


<html><body><pre>
{section name=oi loop=$orders_data}
{ include file="mail/order_invoice.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts}http://www.painfulpleasures.com/body_jewelry/images/invoice_image.gif

{if $config.Appearance.print_orders_separated eq "Y"}
{assign var="separator" value="<DIV style='page-break-after:always'></DIV>"}
{else}
{assign var="separator" value="=========================================== ===================================="}
{/if}
{if not %oi.last%}
{$separator}

{/if}
{/section}
</pre></body></html>


I can insert the image and when i do a test print the image appears at the top which is ok, but i need to put the image off to the right in the dead space.

On the left we have the default invoice set up, with the order Id, Customer name, Customer billing and shipping address and on the right is about half a page of nothing. If i can put my companies info over there that will save us paper and stamping.

please advise how i would modify the template to do this?

Thanks again

marc
__________________
Xcart gold 3.5.4
Reply With Quote
  #2  
Old 09-21-2004, 12:21 AM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

I would try using tables to place the text and images where you want. Perhaps you can take

Code:
{ include file="mail/order_invoice.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts}[img]http://www.painfulpleasures.com/body_jewelry/images/invoice_image.gif[/img]

and replace with this:

Code:
<table border=0 cellpadding=2 cellspacing=0> <tr valign="top"> <td> { include file="mail/order_invoice.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts} </td> <td align="right"> [img]http://www.painfulpleasures.com/body_jewelry/images/invoice_image.gif[/img] </td> </tr> </table>

That might work but I can't test it cause my server is having problems

Hope it works
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #3  
Old 09-21-2004, 06:40 AM
  painfulpleasures's Avatar 
painfulpleasures painfulpleasures is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: baltimore MD
Posts: 37
 

Default

Thanks for the tip

unfortunatly it didn't work exactly

Order id: #10638 Order date: 21-09-2004 08:59:38 Order status: P Customer info: --------------------- First Name: Melinda Last Name: Hicks Phone: 785-762-3799 Fax: E-Mail: frogtoe1967@yahoo.com URL: Billing Address: ---------------- First Name: Melinda Last Name: Hicks Address: 1935 Northwind Dr Lot 13 City: Junction City State: Kansas Country: United States Zip code: 66441 Shipping Address: ----------------- First Name: Melinda Last Name: Hicks Address: 1935 Northwind Dr Lot 13 City: Junction City State: Kansas Country: United States Zip code: 66441 Credit card information: ------------------------ Customer notes: --- Advanced info --- Reason: Approved: Approval Code: 599181 AVS info: Address (Street) and 5 digit ZIP match CVV info: not set / Products ordered: ----------------- SKU: MN844 Product: 14g-12g-10g SINGLE 8MM GEM WITH DANGLE CROSS AND GEM Quantity: 1 Selected options: Gauge: 14g Length: 7/16"~11mm Color: Red Customer Notes: Item price: $ 8.99 SKU: MN875 Product: 14g-12g-10g SINGLE 8MM GEM WITH HOLLOW HEART AND GEM DANGLE NAVEL BELLY BUTTON RING Quantity: 1 Selected options: Gauge: 14g Length: 7/16"~11mm Jewel Color: Lt. Sapphire Customer Notes: Item price: $ 8.99 SKU: MN851 Product: 14g-12g-10g 8MM SINGLE GEM WITH 3 HANGING HEARTS Quantity: 1 Selected options: Gauge: 14g Length: 7/16"~11mm Color: Red Customer Notes: Item price: $ 9.99 SKU: MN856 Product: 14G 3/8" KISSING TRIPLE LIPS AND HEART NAVEL BELLY RING Quantity: 1 Selected options: Gauge: 14g Length: 3/8"~10mm Color: Pink Customer Notes: Item price: $ 13.99 Total: ------- Payment method: Credit Card (US, CANADA, UK, AUSTRALIA Residents Only) (Authoriz Delivery: Post Office Priority Mail (Retail 2-5 days NOT guaranteed) Subtotal: $ 41.96 Discount: $ 0.00 Coupon saving: $ 0.00 () Shipping cost: $ 5.99 Tax: $ 0.00 Total: $ 47.95



it jumbled the entire invoice, but it did put the image to the far right.

let me know if you have any suggestions on how to unjumble?

thanks

marc
__________________
Xcart gold 3.5.4
Reply With Quote
  #4  
Old 09-21-2004, 06:55 AM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

If that's the case, you'll probably have to put html breaks throughout the entire invoice. My site is back up today, perhaps I'll give it a try.
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #5  
Old 09-21-2004, 06:58 AM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

From my 3.5

/mail/html/order_invoice.tpl

Code:
<html>{* $Id: order_invoice_html.tpl,v 1.9.1ADP 2004/07/07 12:40:11 ADPBoss Exp $ *} <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="8" align="center" valign="top"></td> <td align="left" valign="top"> <font size="3" face="Verdana, Arial, Helvetica, sans-serif"> {$lng.lbl_invoice_sdinfo1}</font></p> </td> <td width="250" valign="top"><p align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> {$lng.lbl_invoice}: # {$lng.lbl_order_prefix}{$order.orderid} {$lng.lbl_order_id}: #{$order.orderid} {$order.date|date_format:"%d.%m.%Y"} {$lng.lbl_gst} #: 85550 0732 </font></p></td> </tr> </table> <hr size="1" noshade> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr valign="top"> <td nowrap><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{$lng.lbl_bill_to}:</font></td> <td width="50%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> {$order.b_firstname} {$order.b_lastname} {$order.b_address} {$order.b_city}, {$order.b_statename} {$order.b_countryname} {$order.b_zipcode}</font><font size="2"> <font face="Verdana, Arial, Helvetica, sans-serif">{$lng.lbl_phone}: {$order.phone}</font> <font face="Verdana, Arial, Helvetica, sans-serif">{$lng.lbl_email}: {$order.email}</font></font> <font size="2"> </font></p></td> <td nowrap><font size="2" face="Verdana, Arial, Helvetica, sans-serif">{$lng.lbl_ship_to}:</font></td> <td width="50%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> {$order.s_firstname} {$order.s_lastname} {if $order.company ne ""}{$order.company} {/if} {$order.s_address} {$order.s_city}, {$order.s_statename} {$order.s_countryname} {$order.s_zipcode} {$lng.lbl_phone}: {$order.phone}</font></font> </td> </tr> </table> {include file="mail/html/order_data.tpl"} </html>

Keep in mind I have Custom Language variables in there.

/main/order_invoice_print.tpl

Code:
{* $Id: order_invoice_print.tpl,v 1.4.6.3ADP 2004/07/14 18:32:01 ADPBoss Exp $ *} {if $config.Appearance.print_orders_separated eq "Y"} {assign var="separator" value="<DIV style='page-break-after:always'></DIV>"} {* else *} {* assign var="separator" value="===============================================================================" *} {/if} <html> {section name=oi loop=$orders_data} { include file="mail/html/order_invoice.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts} {if not %oi.last%} {$separator} {/if} {/section} </html>

this should give you a starting point. Note, I have HTML mail enabled.
Reply With Quote
  #6  
Old 09-21-2004, 12:06 PM
  painfulpleasures's Avatar 
painfulpleasures painfulpleasures is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: baltimore MD
Posts: 37
 

Default

Thanks for the tips

I am very unfamilar with php. So everything you posted looks like greek.

I don't understand the two different boxes that were submitted?
i copied the top one and pasted it in the template but recieved an error.

then i tried the next one and received an error as well.

thanks

marc
__________________
Xcart gold 3.5.4
Reply With Quote
  #7  
Old 09-21-2004, 02:26 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Marc,

Posting more code would be a waste of time.

PM me. When I get a chance I'll hook up with you and lend a hand.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 12:05 PM.

   

 
X-Cart forums © 2001-2020