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

New Custom Order Invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #81  
Old 06-08-2004, 02:50 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Actually, the encrypted order notification is in html also -I thought it was a copy of the plain text order notification. I'm obviously missing something here.

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #82  
Old 06-08-2004, 03:06 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

OK, had to make an amendement to order_notification_admin:

Code:
from {include file="mail/order_invoice.tpl" to_admin="Y"] to {include file="mail/order_invoice_email.tpl" to_admin="Y"}

The encrypted email comes out plain text now. BUT, the "Order Receipt" however is still in html! Ok, where do I tell the Receipt email to use the email template?

Update: OK, fixed it. I needed to change the order_customer.tpl to include the new email file:

{include file="mail/order_invoice_email.tpl"}

Also, mail templates like decline_notification will need to be updated for text based emails.

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #83  
Old 06-09-2004, 08:17 AM
 
gardel gardel is offline
 

Member
  
Join Date: May 2004
Location: San Francisco
Posts: 20
 

Default

I think the confusion (at least mine) here is related to the fact that order_invoice.tpl and order_data.tpl reside in two directories: /mail and /mail/html.

That makes a lot of sense if the only time you deal with invoices is by sending them to customers via email. If you use plain text email, then you use the templates in /mail; if you use html email, then you use the templates in /mail/html.

That part is clear.

Where it gets confusing is that invoicing is not exclusively an email thing.

I want a customized invoice (with company logo, formatted like a typical invoice) for only one purpose: To include inside the package that is shipped. When I process orders for shipping, I want to click on the "Print Invoice" button, and get a page with a customized invoice I can send to my printer. This has nothing to do with email, of course. But it seems that in order to accomplish this, I need to edit email templates I would much prefer to keep as they are.

I cannot figure out what needs to be done so that only when clicking on "Print Invoice" do I get a page with a customized invoice, and for everything else (including the order details a user sees upon completing a purchase) the default invoice is presented.

On a related note, once I can get the above done, I want to add another function to order processing: Print Packing Slip. A packing slip is like an invoice exept it does not include prices and is afixed to the outside of a shipping package. On the "Order Details" page, I want to add a button (much like "Print Invoice") that prints a Packing slip.

I can easily figure out how to take customized versions of order_invoice.tpl and order_data.tpl, copy them into new templates, and retrofit them for Packing Slip purposes.

The part I can't figure out is how to add a button to the "Order Details" page an admin accesses (what is this template?) and how I would actually invoke the "Print Packing Slip" routine.
Reply With Quote
  #84  
Old 07-02-2004, 06:06 AM
 
digisoftuk digisoftuk is offline
 

Advanced Member
  
Join Date: Apr 2004
Location: UK
Posts: 38
 

Default Address Details

Can any one tell me how i can add my companys name address and telphone number to the order invoice. The one you print from the admin panel and one that is sent to the customer. Also can any one advise where i can get a proffesional looking invoice to replace the one i curently have in 3.5.9

Thanks
Reply With Quote
  #85  
Old 07-02-2004, 06:08 AM
 
jeremye jeremye is offline
 

Senior Member
  
Join Date: Apr 2004
Location: Philadelphia, PA
Posts: 158
 

Default Re: Address Details

Quote:
Originally Posted by digisoftuk
Can any one tell me how i can add my companys name address and telphone number to the order invoice. The one you print from the admin panel and one that is sent to the customer. Also can any one advise where i can get a proffesional looking invoice to replace the one i curently have in 3.5.9

Thanks

Digisoftuk, take some time and read through this entire thread. It has step by step instructions on adding a custom invoice to X-Cart. In this invoice you will be able to add your company name and address as well.

Jeremy
__________________
Jeremy
X-Cart Gold v3.4.14 [Linux/Apache]
Heavily Modded
Reply With Quote
  #86  
Old 07-02-2004, 04:33 PM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

Quote:
I want a customized invoice (with company logo, formatted like a typical invoice) for only one purpose: To include inside the package that is shipped. When I process orders for shipping, I want to click on the "Print Invoice" button, and get a page with a customized invoice I can send to my printer.

this has worked for me to have plain text e-mails and allow admin to print out custom html invoice to put in shipment:

follow directions for invoice mod - but import the custom order invoice tpls to your skin1/mail/html folder

turn html e-mail off in general settings

modify skin1/main/order_invoice_print.tpl

change this:

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}

to this:

Code:
{ 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}

this will look to your mail/html file when it prints orders from admin, but won't affect e-mails

seems to work fine in 3.5.7, not sure about other versions

-mike
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #87  
Old 09-13-2004, 11:22 AM
 
qz6lwp qz6lwp is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 45
 

Default

Quote:
Originally Posted by inVINCEible
If you'd like someone to customize the invoice to fit your site and install it for you...
http://aheadgames.com/images/invoiceprint.gif
http://www.aheadgames.com/cart/customer/product.php?productid=16206&cat=284

To download the mod and install it yourself... http://aheadgames.com/xcart_invoice.zip


Does anybody have this download? His site does not seem to be online anymore? I liked his invoice better with the shipping label breakout in the upper right hand corner.
Reply With Quote
  #88  
Old 09-13-2004, 09:21 PM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

Im really glad everyone is finding this mod to be usefull

Thanks for the support guys and thanks for the downloads.

-Austin
Reply With Quote
  #89  
Old 09-16-2004, 10:11 PM
  DataViking's Avatar 
DataViking DataViking is offline
 

eXpert
  
Join Date: Jan 2003
Location: Las Vegas, NV
Posts: 361
 

Default

Quote:
Originally Posted by qz6lwp
Quote:
Originally Posted by inVINCEible
If you'd like someone to customize the invoice to fit your site and install it for you...
http://aheadgames.com/images/invoiceprint.gif
http://www.aheadgames.com/cart/customer/product.php?productid=16206&cat=284

To download the mod and install it yourself... http://aheadgames.com/xcart_invoice.zip


Does anybody have this download? His site does not seem to be online anymore? I liked his invoice better with the shipping label breakout in the upper right hand corner.


can you post the link again please
__________________
Web Design Web Design and Custom X-Cart Projects

http://www.dataviking.com

Mention the forums for discounts!
x-cart Version 4.1.8
Reply With Quote
  #90  
Old 02-10-2005, 05:58 PM
 
GermanSupplyKendrew GermanSupplyKendrew is offline
 

Newbie
  
Join Date: Feb 2005
Location: Toronto
Posts: 4
 

Default

I've made a few changes to this new Invoice code to create a printable Packing List. Works in 3.3.x Follow the steps below if you want to try it yourself.

Edit the xcart/include/history_order.php file and make the following changes:

At line 48:

Code:
if ($mode == "invoice" or $mode == "label") {

to:

Code:
if ($mode == "invoice" or $mode == "label" or $mode == "packing") {

And in the same file, make this small change at line 69:

Code:
if ($mode == "invoice") $smarty->display("orders/order_invoice.tpl"); elseif ($mode == "label") $smarty->display("main/order_labels_print.tpl"); $smarty->debugging = $_tmp_smarty_debug; }

to:

Code:
if ($mode == "packing") $smarty->display("orders/order_packing.tpl"); elseif ($mode == "invoice") $smarty->display("orders/order_invoice.tpl"); elseif ($mode == "label") $smarty->display("main/order_labels_print.tpl"); $smarty->debugging = $_tmp_smarty_debug; }

Then create a file orders/order_packing.tpl by slightly modifying the order_invoice.tpl file. Essentially, just replicate the whole file, but change the include statement from file="orders/invoice.tpl" to file="orders/packingslip.tpl":

Code:
{* $Id: order_invoice_print.tpl,v 1.3.2.1 2002/11/01 09:19:29 alfiya Exp $ *} {section name=oi loop=$orders_data} { include file="orders/packingslip.tpl" order=$orders_data[oi].order customer=$orders_data[oi].customer products=$orders_data[oi].products giftcerts=$orders_data[oi].giftcerts} {/section}

Create the file orders/packingslip.tpl by (again) slightly modifying the invoice.tpl file to remove the prices, taxes, subtotals, etc. Here's an example. Modify it accordingly to include all your own store information:

Code:
<meta http-equiv="Content-Language" content="en-us"> <body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" style="font-family: Courier New"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber1" height="1"> <tr> <td width="600"> <font face="Courier New" size="6"><center>YOUR STORE PACKING SLIP</center></font></td> </tr> <tr> <td height="1" nowrap> <p style="margin-left: 5"><font size="2">Order date:</font><font size="2"> {$order.date|date_format:"%m/%d/%y %H:%M"}</font> <font size="2">Order id: </font> #{$order.orderid} <font size="2">Shipping: {include file="orders/include/shipping.tpl"}</font> </p> </p></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber2" height="1"> <tr> <td width="50%" style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 3; border-bottom-width: 1" bordercolor="#000000" height="1" rowspan="2"> <p style="margin-left: 5"><font size="2"> {$order.company} {$order.firstname}{$order.lastname} {$order.phone} {$order.email} </td> <td width="100%" style="border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 3; border-bottom-width: 1" bordercolor="#000000" height="18"> <p align="right" style="margin-right: 5"><font size="2">YOUR ORDER INCLUDES THE ITEMS BELOW</font> </td> </tr> <tr> <td colspan="2" width="100%" style="border-left-width: 1; border-right-width: 1; border-bottom-width: 1" bordercolor="#000000" height="1"> </td> </tr> <tr> <td colspan="2"> <font size="1"><hr></font></td> </tr> <tr> <td width="50%" style="border-left-width: 1; border-right-width: 1; border-bottom-width: 1" bordercolor="#000000" height="19"> <p style="margin-left: 30"><font size="2">Bill to:</font></td> <td width="50%" style="border-left-width: 1; border-right-width: 1; border-bottom-width: 1" bordercolor="#000000" height="19"> <font size="2">Ship to:</font></td> </tr> <tr> <td width="50%" bordercolor="#000000" height="1" valign="top"> <p style="margin-left: 45"><font size="2">{$order.firstname} {$order.lastname}</font><font size="2"> {$order.b_address} {$order.b_city}, {$order.b_state} {$order.b_zipcode}</font></td> <td width="50%" bordercolor="#000000" height="1" valign="top"> <p style="margin-left: 45"><font size="2"> {$order.firstname} {$order.lastname} {$order.s_address} {$order.s_city}, {$order.s_state} {$order.s_zipcode} </font></td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber3" height="15"> <tr> <td width="100%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bgcolor="#E1E1E1" height="15"> <p align="center">Products Ordered </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber4" height="1"> <tr> <td width="10" height="1" style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: dotted; border-bottom-width: 1"></td> <td width="40" height="1" nowrap style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: dotted; border-bottom-width: 1"> <p align="center" style="margin-left: 5; margin-right: 5"><font size="2"> Qty</font></td> <td width="180" height="1" nowrap style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: dotted; border-bottom-width: 1"> <p align="center" style="margin-left: 5; margin-right: 5"><font size="2"> SKU#</font></td> <td width="370" height="1" nowrap style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom-style: dotted; border-bottom-width: 1"> <p align="center"><font size="2">Item Description</font></td> </tr> {include file="orders/include/packing_products.tpl"} </tr> <tr><td colspan="4"><hr></td></tr> </table>

Next create the file orders/include/packing_products.tpl, which is a modified version of orders/include/products.tpl with the price information stripped out:

Code:
<tr> <td colspan="6"></td> </tr> {section name=prod_num loop=$products} <tr> <td width="10" height="9"></td> <td width="30" height="9"> <p align="center"><font size="2">{$products[prod_num].amount}</font></td> <td width="180" nowrap height="9"> <p align="center"><font size="2">{$products[prod_num].productcode}</font></td> <td width="380" height="9"> <p align="center"><font size="2">{$products[prod_num].product}</font></td> </tr> {/section} <tr> <td colspan="6"></td> </tr>

Finally, change the main/history_order.tpl to include a link and for the Packing Slip in the Admin section. I put it right beside the 'Print Invoice' link and button, which looks like this:


I think we changed our buttons a while back, so watch that you get the right include statements for the buttons in your store.

This workss in version 3.3.1. I don't know if someone already posted a mod like this months (or years) ago, but since I can't find it searching the forums...

Oh, btw, thanks for all the great mods everyone!! I'm having a blast scanning through this forum and implementing a bunch of fun stuff![/code]
__________________
Kendrew
www.germansupply.com
Xcart 3.3.1 UNIX/Apache

Don\'t hate me \'cause I like ColdFusion
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 03:49 PM.

   

 
X-Cart forums © 2001-2020