X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Compact Attractive Invoice (https://forum.x-cart.com/showthread.php?t=39868)

Troy 05-18-2008 08:09 AM

Compact Attractive Invoice
 
1 Attachment(s)
See attached for revised invoice format, free for you to adapt as you see fit.
Attachment 942

Main changes: User and Order info on same row; field names right-aligned; bolding swapped so user sees what matters to them; banner logo across top.

Involves:
- extensive changes to mail/html/order_invoice.tpl
- adding two language labels related to store hours
- changing table widths (but NOT th widths) in mail/html/order_data.tpl from 100% to 600

The revised order_invoice file is now 434 lines, so as a newbie I'd appreciate some guidance on how best to post the file for others to access.

Cheers.
Troy

PS - The site where this will be used is not yet live. You could test it using our dev site at http://calligraphybycarla.ndic.com/estore.

carpeperdiem 05-18-2008 09:16 AM

Re: Compact Attractive Invoice
 
Troy,

Congratulations on mastering the order_invoice.tpl

May I suggest:

1. kill the field names. Most people don't need to see the field: "name" before their name. They know this is their name (usually)
2. Combine city/state/zip for US addresses into one line.
3. Combine first/last name into one line.
4. Move NAME from "personal info" to the billing name
IN fact, I'd move all the "personal info" field to billing section... (or vice versa)

etc...

You've definitely improved on the stock invoice, but I would take it all the way.

How would YOU want the invoice to look if you were the customer?

In my opinion, less is more (that is make sure it prints on 1 page of letter paper)

Hope this helps,

Jeremy

Freakmode 05-18-2008 12:03 PM

Re: Compact Attractive Invoice
 
1 Attachment(s)
Here is ours - the customers address (in the top right) prints in the peel off window of the integrated label invoice paper we use. Peel it off and slap it on the envelope or parcel. Also prints off the senders address on a line below.

tamicampos 05-18-2008 04:17 PM

Re: Compact Attractive Invoice
 
Would you mind sharing your code and which labels the invoice is compatible with? Thanks.

Troy 05-18-2008 05:38 PM

Re: Compact Attractive Invoice
 
Glad to share the code if someone will tell me the best way. Should I just put it all in a Reply, or should I post it somewhere online, or should I email it to requesters??

Carpeperdiem, thanks for stating the obvious; truly. So obvious that I missed it. :-) Will do.

01bodyjewelry, can you tell me what label stock you use? I'd not considered the possibility yet?

Tamicampos, sorry but mine was not designed for a label.

carpeperdiem 05-18-2008 05:47 PM

Re: Compact Attractive Invoice
 
Quote:

Should I just put it all in a Reply,

Absolutely. The forum is here to share code...

Tip: click on "go advanced" and you will see additional icons above the message input field... if you select some code, then click on the icon that looks like "#" - it will wrap CODE tags around your selected text. This is THE BEST WAY to post code, since the formatting is preserved,

For example, use this to ONLY show country if NOT the US:

Code:

{if $_userinfo.default_fields.b_country eq "United States"}{else}
<tr>
<td>{$order.b_countryname}</td>
</tr>                                                       
{/if}


Code:

{if $_userinfo.default_fields.s_country eq "United States"}{else}
<tr>
<td>{$order.s_countryname}</td>
</tr>                                                       
{/if}


Freakmode 05-19-2008 12:20 AM

Re: Compact Attractive Invoice
 
1 Attachment(s)
The integrated labels we use are from

http://www.integratedlabels.co.uk/Single-Label-Integrated-Label-Paper.html

We are based in the UK but I would think you could source these from your local country - also please rememeber that they are A4 size

Troy 05-20-2008 12:52 AM

Re: Compact Attractive Invoice
 
I'll post the code after I make the additional changes recommended by carpeperdiem.

Primordial Performance 06-04-2008 03:49 PM

Re: Compact Attractive Invoice
 
where do i go to do custom invoice work??

balinor 06-04-2008 03:51 PM

Re: Compact Attractive Invoice
 
As mentioned above:

mail/html/order_invoice.tpl

Primordial Performance 06-04-2008 04:13 PM

Re: Compact Attractive Invoice
 
How do I get to the place where I would find this code? Do I need an FTP client?[/font]

balinor 06-04-2008 04:27 PM

Re: Compact Attractive Invoice
 
I think perhaps you should start here:

http://forum.x-cart.com/showthread.php?t=21529

Troy 10-13-2008 10:48 PM

Re: Compact Attractive Invoice
 
2 Attachment(s)
At last I've gotten around to incorporating a number the good suggestions I got some time back from carpeperdiem (thanks, Jeremy). It's not perfect yet,* but I think it's better than the vanilla version.

I'm attaching the final invoice code, as it's too long to fit in the regular thread, and a sample jpg to show how it ended up.

Enjoy...

* - Don't know why OrderID wrapped, causing a two-line entry; Payment is two-line also, but just because the extra wording re test mode forced that. For several other invoices I printed, those lines both came out single, making the vertical spacing more efficient.

Troy 10-13-2008 11:01 PM

Re: Compact Attractive Invoice
 
Quote:

Originally Posted by tamicampos
Would you mind sharing your code and which labels the invoice is compatible with? Thanks.


Tami, I've posted the code for my compact invoice. As I said earlier, it's not designed for use on label stock, but if there's anything about it you'd like to clone, have at it.

Troy
No reply awaited.

JWait 10-16-2008 01:26 PM

Re: Compact Attractive Invoice
 
Ok, I'm flummuxed. How did you get your tax to appear correctly instead of as an afterthought....."including XX Tax XX% $X.XX after the total"? I would like it to be....

Subtotal <--- not including the sales tax!
Discounted Total <-- if there is one
Shipping
Sales Tax <--- here instead of "added-on" after the total is displayed.
Order Total

Troy 10-16-2008 02:46 PM

Re: Compact Attractive Invoice
 
My tinkering at the bottom of the invoice page was done months ago, so I don't recall what if anything I did to affect the SalesTax display sequence. The recent work only related to minor formatting in the middle of the page.

You could compare the code in that lower area between mine and yours to distinguish the differences.

I'm on 4.1.8, so maybe 4.1.10ff is different??

Learner 07-10-2009 10:15 PM

Re: Compact Attractive Invoice
 
Hi,
Is it possible to call manufactures logo/name at the bottom of the invoice?

Thank you.

hoosierglass 02-25-2010 06:52 AM

Re: Compact Attractive Invoice
 
Quote:

Originally Posted by JWait
Ok, I'm flummuxed. How did you get your tax to appear correctly instead of as an afterthought....."including XX Tax XX% $X.XX after the total"? I would like it to be....

Subtotal <--- not including the sales tax!
Discounted Total <-- if there is one
Shipping
Sales Tax <--- here instead of "added-on" after the total is displayed.
Order Total


I know this is a little old, but for the life of me I cannot figure out how to fix the order_data.tpl to display like JWait is wanting. Did anyone ever figure this out? I hate the default way X-cart does this and it confuses the customer.

JWait 02-25-2010 07:51 AM

Re: Compact Attractive Invoice
 
2 Attachment(s)
Attached is the skin1/mail/html/order_data.tpl that we use for version 4.1.10. I included a bmp screenshot so you can see what we ended up with.

hoosierglass 02-25-2010 08:09 AM

Re: Compact Attractive Invoice
 
That didn't work. The more I look at this here is the problem:

Order Subtotal is displayed with the following:
{include file="currency.tpl" value=$order.display_subtotal} The value listed here has already gone through an if statement to determine if tax should be applied in the math equation to get to this value. The same holds true if you are in a state that taxes shipping as well. Here is the line:
{include file="currency.tpl" value=$order.display_shipping_cost}

Where can I find the $order.display information?

This is what needs to be changed.

hoosierglass 02-25-2010 11:52 AM

Re: Compact Attractive Invoice
 
1 Attachment(s)
Finally have this one figured out. :D/

The $order.display items are found in func.order.php. This is what I did....
around line 137 you will find:
# Assign the display_* vars for displaying in the invoice
if (@$order["extra"]["tax_info"]["display_taxed_order_totals"] == "Y" && !empty($order["extra"]["tax_info"]["taxed_subtotal"]))
$order["display_subtotal"] = $order["extra"]["tax_info"]["taxed_subtotal"];
else
$order["display_subtotal"] = $order["subtotal"];

I changed it to this:

if (@$order["extra"]["tax_info"]["display_taxed_order_totals"] == "Y" && !empty($order["extra"]["tax_info"]["taxed_subtotal"]))
$order["display_subtotal"] = $order["subtotal"];

else
$order["display_subtotal"] =
$order["subtotal"];

I did this for discounted subtotal and for shipping since my ignorant state collects sales tax for shipping.

Then i went into the order_data.tpl file and mover the sales tax from the bottom of the invoice to the line before Total. So now it looks like this:

Attachment 1878


All times are GMT -8. The time now is 04:02 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.