Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Free Invoice Template Rate Topic   * * * * * 1 votes

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 27 February 2014 - 02:51 AM #1

UPDATED 5th March 2014
I have created a new invoice template that I think looks better than the standard CS-Cart ones so I thought I would share them...we all need to help each other and share what we have done to personalise our installations so everyone can benefit. Cs-Cart uses two different invoice.tpl template files to email a copy of the invoice to both the Customer and to Admin plus they are used to view online by both the Customer and the Admin. These templates are for CS-Cart v4.1.2 (possibly for v4.? but not tested).

1.gif inv.gif 3.gif

Both templates files are named the same (invoice.tpl) however they are located in 2 different places in your CS-Cart installation:
Customer (Customer.zip): \design\themes\basic\mail\templates\orders
Admin (Admin.zip): \design\backend\mail\templates\orders

The templates can be used just as they are or below are some steps that you may like to do that will enhance the templates even further

So to start with, dowload and unzip the attached 2 new template files:
Customer.zip
Admin.zip

1. Install new templates as they are
a.) Rename your current invoice.tpl templates that are located as above to invoice.BAK as backups
b.) Simply copy both new invoice.tpl files to the locations as above

2. Add Company Number
OPTION 1. Add Company Number by using new language entry
In Australia you have to display your Company or Business Number on your Invoice and perhaps other countries as well. If so then this OPTION OR OPTION 2 below (your choice) will display that number just below the "Invoice" text at the top right corner of your invoice.
a.) Add a new entry in Administration -> Languages -> Translations, with the following:
Language variable: company_number
Value: (your company number)
b.) Edit both Customer and Admin templates by replacing the {* Company No *} in the templates with:
{if __("company_number") !=""}
	<div style="font-size:11px; font-family: Tahoma,Arial; text-transform: uppercase;" nowrap="nowrap">
		<b>{__("company_number")}</b>
	</div>
{/if}

OPTION 2. Add Company/Tax Number by using the Tax field Registration Number
If you only have one Tax Registration Number and like in Australia, it is your Business Number, it is pointless having the Tax Number displayed at the bottom of the invoice with the Tax amount instead it can be removed from there and placed under the "Invoice" text at the top right corner of your invoice...this is where most Australian businesses place it.
a.) Edit both Customer and Admin templates by replacing the {* Company No *} in the templates with:
<div style="font-size:11px; font-family: Tahoma,Arial; text-transform: uppercase;" nowrap="nowrap">
	{if $order_info.taxes}
		{foreach from=$order_info.taxes item=tax_data}
			{if $tax_data.regnumber}<b>({$tax_data.regnumber})</b>{/if}
		{/foreach}
	{/if}
</div>
b.) To remove the tax number from also displaying in the subtotal section of the invoice find {* Tax Number *} and remove the following line:
{if $tax_data.regnumber}&nbsp;({$tax_data.regnumber}){/if}:&nbsp;

3. Banking Details (or payment details of a different kind)
We have a payment method called "Direct Deposit" set up in our shop which is the first payment method in the database (i.e. payment_id 1). So if a customer selects "Direct Deposit" as their payment method, we include our bank details on the invoice to make it easy for them to make their payment. If you also have a similar situation then then this may be of help.
a.) Look in the cscart_payments table in your database for the payment_id you have for direct deposit
b.) In the Customer invoice.tpl template, replace {* Bank details *} with:
{if $order_info.payment_id == 1}
	{* Bank details *}
	<td valign="top">
		<table border="0" cellspacing="2" cellpadding="2">
			<tr>
				<td colspan="2" nowrap><b>Bank Details for Direct Deposit:</b></td>
			</tr>
			<tr>
				<td width="5%"><b>Reference:</b></td>
				<td width="10%">Inv No {$order_info.order_id}</td>
			</tr>
			<tr>
				<td width="5%" nowrap><b>A/c Name:</b></td>
				<td width="10%"nowrap>(insert bank account name)</td>
			</tr>
			<tr>
				<td width="5%"><b>Bank:</b></td>
				<td width="10%">(insert bank name)</td>
			</tr>
			<tr>
				<td width="5%"><b>BSB:</b></td>
				<td width="10%">(insert bank branch identifier)</td>
			</tr>
			<tr>
				<td width="5%"><b>A/c No:</b></td>
				<td width="10%">(insert bank account number)</td>
			</tr>
		</table>
	</td>
	{* /Bank details *}
{/if}
c.) Replace the number 1 in the above code with the payment_id number that you got from your cscart_payments table in your database
d.) Replace the (insert...) places of the code with your own banking details

4. Add Office Use Only section in the Admin copy of the invoice
We like to have some Office Use Only printed fields on the invoice copy that we get emailed to ascertain the costs etc of that invoice before it gets files away. This addition adds those fields to the invoice instead of us having to stamp each one.
a.) In the Admin invoice.tpl template replace {* Admin Fields *} with the following code:
{* Admin only *}
<td valign="top">
	<table border="0" cellspacing="2" cellpadding="2">
		<tr>
			<td colspan="2" nowrap><b>Admin Only:</b></td>
		</tr>
		<tr>
			<td width="5%"><b>Total Paid:</b></td>
			<td width="10%">_____________</td>
		</tr>
		<tr>
			<td width="5%"><b>Product Cost:</b></td>
			<td width="10%">_____________</td>
		</tr>
		<tr>
			<td width="5%"><b>Shipping Cost:</b></td>
			<td width="10%">_____________</td>
		</tr>
		<tr>
			<td width="5%"><b>Bank Cost:</b></td>
			<td width="10%">_____________</td>
		</tr>
		<tr>
			<td width="5%"><b>Total Cost:</b></td>
			<td width="10%">_____________</td>
		</tr>
		<tr>
			<td width="5%"><b>Gross Profit:</b></td>
			<td width="10%">_____________</td>
		</tr>
	</table>
</td>
{* /Admin only *}

5. Extra Profile Fields
I like the customer to have the ability to add different companies for themself, a Bill To Company and a Shipping To Company, all as options. However, the built in CS-Cart ability to display these extra profile fields on an invoice is hampered as the template they use includes paragraph tags that adds spaces as well as field names. So this extra bit cleans that up so I can allow my customers to use the extra Company fields without hindering the display of the invoice. So my Administration -> Profile Fields look like this (note the fields I have ticked):

5.gif

To provide for the extra Company(s) on the invoice, you need to add an extra profile field called Company by this screen shot:

4.gif

a.) Download and unzip the attached file Profile Fields.zip and then place that template into these two locations:
- \design\backend\mail\templates\profiles
- \design\themes\basic\mail\templates\profiles
b.) In both Customer and Admin invoice.tpl templates replace the {* Extra Invoice Fields B *} with the following code:
{include file="profiles/extra_invoice_fields.tpl" fields=$profile_fields.B}
c.) In both Customer and Admin invoice.tpl templates replace the {* Extra Invoice Fields S *} with the following code:
{include file="profiles/extra_invoice_fields.tpl" fields=$profile_fields.S}

6. That is all
After you have completed any changes to the invoice.tpl templates, upload them to their respective directories as in Step 1 and TEST

Hope this helps someone. If I get time soon I will be creating an MS Access front end that hooks into the CS-Cart tables so I can manage all the orders, inventory and costings (profit etc per order), and I will release that here for free if anyone wants that...but give me some time

Attached Files



 
  • johnbol1
  • Never Re
  • Members
  • Join Date: 23-Feb 10
  • 4942 posts

Posted 27 February 2014 - 06:46 PM #2

thanks for sharing

Custom printed hi visibility clothing sale the UK's online hivis safety shop
v4.5.2


 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 28 February 2014 - 12:35 AM #3

Pretty cool. Never thought about redoing the invoice.
Regards,
Jim

 
  • Takestock
  • Senior Member
  • Members
  • Join Date: 08-Nov 13
  • 505 posts

Posted 28 February 2014 - 11:16 AM #4

HI ibaker
Thanks for sharing, We are running MV version 4.1.2 and the company number shown below "INVOICE" shows text
(_company_number)

were should this information be filled in and can it be done per vendor.

Alan

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 02 March 2014 - 07:26 AM #5

Hi Allan
see point 1 of the opening post

 
  • Takestock
  • Senior Member
  • Members
  • Join Date: 08-Nov 13
  • 505 posts

Posted 02 March 2014 - 01:53 PM #6

HI ibaker
Thanks for sharing, We are running MV version 4.1.2 and the company number shown below "INVOICE" shows text
(_company_number)

were should this information be filled in and can it be done per vendor.

Alan

Hi Ibaker
Thanks for the reply, I worded my question very badly,
What I wanted to know as we have MV and the invoices come from many vendors. were would I pull this info for the various company numbers and how would I implement this.
If this is asking a bit much, I will remove as per you point No1.

Alan

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 02 March 2014 - 08:41 PM #7

Alan, I don't have the Multi Vendor version so I am not sure how you would be able to define a company number per vendor. I use a new language entry for the company number and I doubt there would be a seperate language per vendor.

Is there an extra company details field that is unique per vendor that could be used and referenced in the template?
Does each vendor have their own invoice template?...if so then you could define a separate language entry per vendor.
In MV can you define an extra company field?

Failing the above then I think the only thing you could do would be to remove the company number line in the template.

Are you an Australian company that has to have the company number shown by law? If so let me know and perhaps we could contact each other offline and see what I could do to help

 
  • Takestock
  • Senior Member
  • Members
  • Join Date: 08-Nov 13
  • 505 posts

Posted 03 March 2014 - 06:57 AM #8

Alan, I don't have the Multi Vendor version so I am not sure how you would be able to define a company number per vendor. I use a new language entry for the company number and I doubt there would be a seperate language per vendor.

Is there an extra company details field that is unique per vendor that could be used and referenced in the template?
Does each vendor have their own invoice template?...if so then you could define a separate language entry per vendor.
In MV can you define an extra company field?

Failing the above then I think the only thing you could do would be to remove the company number line in the template.

Are you an Australian company that has to have the company number shown by law? If so let me know and perhaps we could contact each other offline and see what I could do to help


Hi Ibaker
Thanks for the answer, No spare field in the vendor profile.
I have already changed the only spare from ZIP Code to Vat Number, and this worked perfectly.
We are an Irish company, So while we currently have no Post or Zip Codes, they are being introduced in a few months. So I will lose the above change.
There is a legal requirement in most EU country to have the company number, directors, etc. On all company paperwork. but it's never enforced.
I will have to search the forum to see if anyone has managed to add extra fields the the vendor profile in 4x.

Alan

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 03 March 2014 - 07:20 AM #9

If I could get my hands on a demo copy of the MV version I could create an "IF" statement that could pull the company number (and VAT number) from a language entry for you...it w3ould just need an IF statement that says "if vendor =1 then show this number OR if vendor=2 then show that number" etc

 
  • Takestock
  • Senior Member
  • Members
  • Join Date: 08-Nov 13
  • 505 posts

Posted 03 March 2014 - 08:05 AM #10

If I could get my hands on a demo copy of the MV version I could create an "IF" statement that could pull the company number (and VAT number) from a language entry for you...it w3ould just need an IF statement that says "if vendor =1 then show this number OR if vendor=2 then show that number" etc

HI Ibaker
Thank you for the extremely kind offer,
But I try and keep everything as automated as possible and the only true way of doing this is to find a way of adding the extra fields into the vendor profile and calling the information from there.
It should be a standard feature on CS and I see quite a few posts referring to this in one way or another, but no solution to date.

Alan

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 05 March 2014 - 04:09 AM #11

The Opening Post of this thread has been UPDATED with an easier method of installing and an extra feature of adding a Company Number to your invoices

 
  • Jesusarp
  • Newbie
  • Members
  • Join Date: 15-Feb 14
  • 6 posts

Posted 26 March 2014 - 06:15 AM #12

Hey, don't show me the Extra Profile Fields. You can help me? .

 
  • carterj
  • Junior Member
  • Members
  • Join Date: 11-May 09
  • 111 posts

Posted 30 March 2014 - 05:48 PM #13

Is there an easy to add an additional header to the invoice? Example there is invoice, credit memo and order. I like to add another type.. Like purchase order or something and have it selectable in order status. I got the language variable created, but not sure where else I need to update in the template.

suggestions?

Using CS-CART 4.11.x


 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 30 March 2014 - 09:24 PM #14

Is there an easy to add an additional header to the invoice? Example there is invoice, credit memo and order. I like to add another type.. Like purchase order or something and have it selectable in order status. I got the language variable created, but not sure where else I need to update in the template.

suggestions?

Would the status of it be something like Purchase Order? If so you could use an if statement where the Invoice language is called in the template to say something like if status = x use invoice language, if not then use PO language.

 
  • RAVINDRAN
  • Advanced Member
  • Members
  • Join Date: 31-Mar 14
  • 85 posts

Posted 31 March 2014 - 09:06 AM #15

I would like to have My company logo on the Header with Left alignment and the company address on the right allignment of the Header in the Invoice.

Secondly I wish to add my Bank account details on the bottom on the invoice, in the Footer section

Please help me
Thanks in advance

 
  • majerfra
  • Advanced Member
  • Trial users
  • Join Date: 04-Oct 11
  • 134 posts

Posted 11 July 2014 - 11:14 AM #16

Hi,
this will work in version 3.x ?

Thank you
F. Majer

 
  • sox
  • Member
  • Members
  • Join Date: 27-Sep 13
  • 30 posts

Posted 25 September 2014 - 09:06 AM #17

I've tried this with version 4.2 but it hasn't made any difference. I would have thought I'd get some error message if it was not compatible with v4.2 so may be I have done something incorrect (quite likely as I am a beginner). If anyone else finds it works with v4.2 I'd be interested to know.

 
  • ibaker
  • Senior Member
  • Members
  • Join Date: 23-Oct 06
  • 275 posts

Posted 26 September 2014 - 11:12 PM #18

Attached is what I am using for v4.2.2 and works ok:
1.jpg

With the attached templates I am using the extra profile fields for Company. Before you do anything ensure you have done the opening post part for the extra profile fields. Next open the attached invoice.tpl file and edit the bank details that start from around line 250.

Copy the invoice.tpl to:
/public_html/design/themes/YOUR THEME/mail/templates/orders/ (replace existing invoice.tpl)
/public_html/design/backend/mail/templates/orders/ (replace existing invoice.tpl)

Then copy the extra_invoice_fields.tpl to:
/public_html/design/themes/YOUR THEME/mail/templates/profiles/
/public_html/design/backend/mail/templates/profiles/

Finally clear the var/cache files...I normally just go on to my server at /public_html/var/cache/ and delete all 3 folders in there called misc, registry and templates

That is what I have and all works perfectly...deleting the cache files is very important

Attached Files



 
  • Gizmo
  • Junior Member
  • Members
  • Join Date: 05-Jan 09
  • 151 posts

Posted 27 September 2014 - 05:00 PM #19

Thank you for the awesome invoice template! Works 100%, the only thing i would change it make Order number area float more right to match the left :)

Otherwise thank you very much
[center]www.vapeking.co.za[/center]

 
  • BiTrAtE
  • Newbie
  • Members
  • Join Date: 09-Feb 15
  • 12 posts

Posted 13 February 2015 - 02:44 PM #20

Works great on 4.2.4. Thanks a lot!