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)
-   -   New Custom Order Invoice (https://forum.x-cart.com/showthread.php?t=2836)

jignacio 05-03-2004 07:33 AM

xcart_invoice for 3.4.14 version
 
Someone has modified xcart_invoice for 3.4.14 version?

Many Thanks.

Josц╘ Williman

jeremye 05-03-2004 08:02 AM

Josц╘,

I am running 3.4.14 and I didn't have to modify anything to get it running. You should be fine.

Jeremy

jeremye 05-03-2004 08:04 AM

I made a few customizations to this after I noticed that this custom order invoice does not display discounts and/or coupon code (gift certificate) discounts. In /skin1/orders/invoice.tpl, I added:

Code:

{if $order.discount gt 0}
  <tr>
    <td width="600" height="1" colspan="5" bgcolor="#E1E1E1">
    <p align="right" style="margin-right: 5"><font size="2">
    Discount:</font></td>
    <td width="92" align="left" height="1" bgcolor="#E1E1E1">
    <font size="2">{include file="currency.tpl" value=$order.discount}</font></td>
    <td width="314" align="center" height="1"></td>
  </tr>
{/if}
{if $order.coupon_discount gt 0}
  <tr>
    <td width="600" height="1" colspan="5" bgcolor="#E1E1E1">
    <p align="right" style="margin-right: 5"><font size="2">
    Gift Cert.:</font></td>
    <td width="92" align="left" height="1" bgcolor="#E1E1E1">
    <font size="2">{include file="currency.tpl" value=$order.coupon_discount}</font></td>
    <td width="314" align="center" height="1"></td>
  </tr>
{/if}


Put that immediately before:

Code:

  <tr>

    <td width="600" height="1" colspan="5" bgcolor="#E1E1E1">

    <p align="right" style="margin-right: 5"><font size="2">

    Shipping:</font></td>

    <td width="92" align="left" height="1" bgcolor="#E1E1E1">

    <font size="2">{include file="currency.tpl" value=$order.shipping_cost}</font></td>

    <td width="314" align="center" height="1"></td>

  </tr>


That will only show the discount or gift certificate if one exists. It tested fine for me.

Jeremy

jignacio 05-03-2004 08:55 AM

Many thanks jeremye.

All the best.

Josц╘

----------------------------
X-Cart 3.4.14 LIVE

ETInteractive.com 05-12-2004 07:50 AM

Quote:

Originally Posted by preston
Quote:

Anybody know how to to get it to call a different set of templates when i click the 'print invoice' button so i can still keep my emails as plain text?"

This works with 3.5.4 and should work with 3.5.5


Make a copy of the original /skin1/mail/order_invoice.tpl and the /skin1/mail/order_data.tpl. Rename them to order_invoice_email.tpl and order_data_email.tpl.

In the order_invoice_email.tpl make this change the line near to bottom of the file.
Quote:

Change the line
{include file="mail/order_data.tpl"}

to

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

Next edit the skin1/mail/order_notification.tpl as follows.

Quote:

Change the line
{include file="mail/order_invoice.tpl"}

to

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

Place all these files in the skin1/mail folder and you should be good to go.


I'm assuming if i keep the files as is, the store will display TEXT invoices, and if i add the new files and rename them to file_email...the emailed invoice would be html based.??

just doing the opposite of what you posted above.

ETInteractive.com 05-25-2004 05:29 PM

I set HTML mail option On.

I created "order_data_email.tpl" and "order_invoice_email.tpl"

put htem in /mail/html

I also edited order_notification.tpl to Call "order_invoice_email.tpl"

but when i get the order, its still using the Text based order_data.


What am i missing???????

DogByteMan 05-25-2004 08:21 PM

Man... I just read this entire soap opera... I mean thread. How in the world did I miss this one! [-X

Great mods guys I appreciate the hard work ! 8)

gardel 06-06-2004 03:07 PM

With a couple of very small tweaks (primarily to fit my vertical logo), this little hack works quite well.


Except ...

When someone makes a purchase and the invoice is presented on the page, the invoice breaks the page (way too wide) and it all looks horrendous.

Ideally, I would like to present the invoice after purchase exactly the way it was in the default install, but to email and print the invoice with the custom hack. The hack is installed, I just want the Order Processed page to go back to the original format.

Any pointers where to look?

DanUK 06-07-2004 06:30 AM

This hack is great except I think I've buggered it up a bit :roll: . I downloaded the 3.5.4 version of this hack, but before uploading the modified order_invoice.tpl and the order_data.tpl, I followed preston's fix for sending plain text email using copies of the existing templates (as I want to keep that). The Order invoice now comes out fine on screen as I would expect, yet I'm still getting html formatted email. HTML email is turned off FYI!

All I did was:

Quote:

Make a copy of the original /skin1/mail/order_invoice.tpl and the /skin1/mail/order_data.tpl. Rename them to order_invoice_email.tpl and order_data_email.tpl.

In the order_invoice_email.tpl make this change the line near to bottom of the file.
Quote:
Change the line
{include file="mail/order_data.tpl"}

to

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


Next edit the skin1/mail/order_notification.tpl as follows.

Quote:
Change the line
{include file="mail/order_invoice.tpl"}

to

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


Place all these files in the skin1/mail folder and you should be good to go.

..before uploading the two replacement 3.5.4 invoice mod files.

Any ideas where I might have botched up?

Thanks

Dan

DanUK 06-08-2004 02:48 AM

OK, I hadn't given the email templates a .tpl extension :roll: . It works now apart from the "Order Receipt" email is in html...I'll have to look further into this.....

Dan


All times are GMT -8. The time now is 09:18 PM.

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