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

Different invoices for check/mo and credit card payments

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-02-2007, 03:09 PM
 
stanlee stanlee is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 53
 

Question 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!
__________________
xcart gold 4.1.11
Dedicated server Intel i5-2400 CPU, 8GB RAM
CentOS 5, Plesk Panel v10.4
mods: MAP Pricing, Advanced Speedbar,
Tabbed Product Menu, Multiple Manufacturers,
Customer Reviews Search, Edit & Delete,
Pre-login Shipping Estimate, FREEOVERX. X-AOM
Reply With Quote
  #2  
Old 02-04-2007, 02:58 AM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default 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}
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #3  
Old 02-04-2007, 06:07 PM
 
stanlee stanlee is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 53
 

Thumbs up 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.....
__________________
xcart gold 4.1.11
Dedicated server Intel i5-2400 CPU, 8GB RAM
CentOS 5, Plesk Panel v10.4
mods: MAP Pricing, Advanced Speedbar,
Tabbed Product Menu, Multiple Manufacturers,
Customer Reviews Search, Edit & Delete,
Pre-login Shipping Estimate, FREEOVERX. X-AOM
Reply With Quote
  #4  
Old 09-07-2009, 03:53 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default 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?
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 07:34 AM.

   

 
X-Cart forums © 2001-2020