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

Display text depending on payment method used.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-18-2008, 06:13 AM
  bedstar's Avatar 
bedstar bedstar is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 115
 

Default Display text depending on payment method used.

Hi

I would like to display different text on the order.message.tpl depending on what order method the customer used this is what ihave put cant seem to get it to work.

{if $payment_methods[payment].paymentid eq 11}

{$lng.txt_finance_placed}

{else}
{$lng.txt_placed}
{/if}

Any help would be great.

Im using Xcart 4.0

Regards

john
__________________
https://www.bedstar.co.uk
Reply With Quote
  #2  
Old 01-18-2008, 06:19 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Display text depending on payment method used.

Not sure if this is the one, but try it:

{if $payment.paymentid eq "11"}


Moving to Template Editing.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-18-2008, 08:31 AM
  bedstar's Avatar 
bedstar bedstar is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 115
 

Default Re: Display text depending on payment method used.

Hi

Tried that no joy um afaid any other ideas!

Regards

john
__________________
https://www.bedstar.co.uk
Reply With Quote
  #4  
Old 01-18-2008, 08:55 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: Display text depending on payment method used.

Possibly you are wrong in doing it with the payment method ID.
When I do things like this, I find that you have to use the actual payment method, which you can copy and paste from Payment Methods in admin.
So, e.g.
{if $order.payment_method eq "Cheque"}
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #5  
Old 01-18-2008, 08:26 PM
 
sk8conz sk8conz is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 31
 

Default Re: Display text depending on payment method used.

Code:
{if $order.payment_method eq "Phone Order"} do stuff {/if}

Has to be the same name you gave in the payment methods in the admin section
__________________
4.3.1
rounded white template
one page checkout
Reply With Quote
  #6  
Old 01-19-2008, 02:10 AM
  bedstar's Avatar 
bedstar bedstar is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 115
 

Default Re: Display text depending on payment method used.

nope still cant get it to work is that code correct for the $payment_method
__________________
https://www.bedstar.co.uk
Reply With Quote
  #7  
Old 01-19-2008, 11:20 AM
 
sk8conz sk8conz is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 31
 

Default Re: Display text depending on payment method used.

Post the code you are trying to use
__________________
4.3.1
rounded white template
one page checkout
Reply With Quote
  #8  
Old 01-20-2008, 11:39 PM
  bedstar's Avatar 
bedstar bedstar is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 115
 

Default Re: Display text depending on payment method used.

{if $order.payment_method eq "Finance"}
{$lng.txt_finance_placed}
{else}
{$lng.txt_order_placed_msg}
{/if}

I have placed this into the order message.tpl.

Currently when i put an order through on Finance is still shows

lng.txt_order_placed_msg

Regards

JOhn
Currently
__________________
https://www.bedstar.co.uk
Reply With Quote
  #9  
Old 01-21-2008, 02:07 AM
 
sk8conz sk8conz is offline
 

Advanced Member
  
Join Date: Dec 2007
Posts: 31
 

Default Re: Display text depending on payment method used.

Quote:
Originally Posted by bedstar
{if $order.payment_method eq "Finance"}
{$lng.txt_finance_placed}
{else}
{$lng.txt_order_placed_msg}
{/if}

I have placed this into the order message.tpl.

Currently when i put an order through on Finance is still shows

lng.txt_order_placed_msg

Regards

JOhn
Currently


If I place {$order.payment_method} at the top of order message.tpl nothing prints.

So there is no value assigned to $order.payment method. You need to look what tpl files are included starting from the invoice heading. $order.payment_method has a value by then.

I use pretty much the same code in order_invoice.tpl to print different messages at the bottom of the invoice depending on payment type. It works there.
__________________
4.3.1
rounded white template
one page checkout
Reply With Quote
  #10  
Old 01-31-2008, 11:41 AM
 
neroag neroag is offline
 

Senior Member
  
Join Date: May 2005
Location: UK
Posts: 171
 

Default Re: Display text depending on payment method used.

In /skin1/mail/html/order_invoice.tpl

look for :
Code:
<td align="center"><br /><br /><font style="FONT-SIZE:12px">{$lng.txt_thank_you_for_purchase}</font>
add below it:

Code:
<br /> {if $order.payment_method eq "Finance"} <p>Add your Message here !!</p> {/if}

obviously you will need to change both the $order.payment_method value & the text to your own requirements

hope that helps you anyways
__________________
X-cart Gold - 4.0.18 - 4.1.9 - 4.1.10 - 4.3.0
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:09 AM.

   

 
X-Cart forums © 2001-2020