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)
-   -   Display text depending on payment method used. (https://forum.x-cart.com/showthread.php?t=36842)

bedstar 01-18-2008 06:13 AM

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

balinor 01-18-2008 06:19 AM

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.

bedstar 01-18-2008 08:31 AM

Re: Display text depending on payment method used.
 
Hi

Tried that no joy um afaid any other ideas!

Regards

john

pauldodman 01-18-2008 08:55 AM

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"}

sk8conz 01-18-2008 08:26 PM

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

bedstar 01-19-2008 02:10 AM

Re: Display text depending on payment method used.
 
nope still cant get it to work is that code correct for the $payment_method

sk8conz 01-19-2008 11:20 AM

Re: Display text depending on payment method used.
 
Post the code you are trying to use

bedstar 01-20-2008 11:39 PM

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

sk8conz 01-21-2008 02:07 AM

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.

neroag 01-31-2008 11:41 AM

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


All times are GMT -8. The time now is 11:24 AM.

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