X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Different invoices for check/mo and credit card payments (https://forum.x-cart.com/showthread.php?t=28540)

stanlee 02-02-2007 03:09 PM

Different invoices for check/mo and credit card payments
 
I would like to have separate invoices for online payments and check/money order payments.
The second would show a text on the top saying "Please print this invoice and mail it along with your payment to...".
I don't want the same text on credit card orders, so I need two different invoices.

I tried to modify the template: /skin1/customer/main/order_message.tpl
and put an "if" around this line:

Code:

<font class="ProductDetails">{$lng.txt_order_placed_msg}</font>
I want it to display only if the paymentid is either 2 or 7 (check/mo or purchase order).
Can anyon please tell me how to do this?

I've been searching the Forums for about 2 weeks now but no luck so far,
I guess if I want to open my store before Christmas I'd better ask...

Thanks!

inebriate 02-04-2007 02:58 AM

Re: Different invoices for check/mo and credit card payments
 
dont know if this will work, but maybe you could play around with it (im sure there is a way to just pass the paymentid to smarty from cart.php but that requires a little more thought)...

in order_message.tpl under the section loop, put
Code:

{if $orders[oi].order.payment_method nq 'Credit Card'}
display the non credit card order message
{else}
display the credit card order message
{/if}


stanlee 02-04-2007 06:07 PM

Re: Different invoices for check/mo and credit card payments
 
Quote:

{if $orders[oi].order.payment_method nq 'Credit Card'}
Thanks for the reply. Unfortunately it doesn't work.
I replaced the "nq" in the above with "ne" ("nq" turned my location bar into bread crumbs).
The payment method variable simply doesn't get to the order_message.tpl
It's strange, because it works in order_invoice.tpl which is on the same page
below the message, and it's called from the order message template.

I finally gave up on order_message.tpl, and modified the order_invoice.tpl instead, it works fine with this:
Code:

{if $order.payment_method eq "Purchase Order"}
print purchase order text
{elseif $order.payment_method eq "Check / Money Order"}
print check / money order text
{/if}
no message needed for credit card or paypal payments.


The invoice page needed some editing anyway, and now my problem is solved. It's been bugging me for a long time.
I'm still wondering why it could not be done in order_message.tpl.....

Learner 09-07-2009 03:53 AM

Re: Different invoices for check/mo and credit card payments
 
Quote:

Originally Posted by stanlee
Thanks for the reply. Unfortunately it doesn't work.
I replaced the "nq" in the above with "ne" ("nq" turned my location bar into bread crumbs).
The payment method variable simply doesn't get to the order_message.tpl
It's strange, because it works in order_invoice.tpl which is on the same page
below the message, and it's called from the order message template.

I finally gave up on order_message.tpl, and modified the order_invoice.tpl instead, it works fine with this:
Code:

{if $order.payment_method eq "Purchase Order"}
print purchase order text
{elseif $order.payment_method eq "Check / Money Order"}
print check / money order text
{/if}
no message needed for credit card or paypal payments.


The invoice page needed some editing anyway, and now my problem is solved. It's been bugging me for a long time.
I'm still wondering why it could not be done in order_message.tpl.....


Can you help me how to do this?


All times are GMT -8. The time now is 10:20 PM.

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