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)
-   -   Smarty variable for payment methods? (https://forum.x-cart.com/showthread.php?t=9194)

viridiancity 09-01-2004 01:15 PM

Smarty variable for payment methods?
 
I want to add a block of text (address, etc.) that only appears when the payment method selected is a Personal Check or a Money Order.

I know *where* to put it in the checkout.tpl, but I need help sussing out the relevant Smarty variables and syntax: {if ? eq ? or ?}{/if}

Please and thank you ...

shan 09-02-2004 08:04 AM

I think you may want to look at payment_offline.tpl

viridiancity 09-02-2004 09:38 AM

you know, i did ... and it consists of exactly this:

{* $Id: payment_offline.tpl,v 1.2.6.1 2003/11/21 07:09:23 mclap Exp $ *}

... no actual code. i restored the file just to be sure, and it didn't change.

is there supposed to be something there?

B00MER 09-02-2004 12:07 PM

If the paymentid is in the URI, you can do {$smarty.get.paymentid eq "1"} ... {/if} or else you'll need to $smarty->assign() the payment method if its not available.

viridiancity 09-03-2004 03:04 AM

Boomer, could you spell that out for me a bit more? I'm obviously not as fluent in smarty as you're assuming. :}

I'm figuring there's a variable already assigned that contains the chosen payment method. I know I can print the type of payment method with {$payment_data.payment_method}. I'm looking for something like:

{if $payment_data.payment_method eq "personal check"}[text here]{/if}

... except, you know, code that actually works. <wry>


Remedial help appreciated.


All times are GMT -8. The time now is 09:29 AM.

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