![]() |
Payment Method - use Smarty var in "Special instructions" ?
In the Payment Method screen, I know that we can use html in the "Special instructions" - to place a credit card image or whatever...
http://forum.x-cart.com/showthread.php?p=131711#post131711 What about using a Smarty variable in there? Can a $var be used in the special instructions? How? I tried {$variable} and simply, $variable, but neither worked. Help? Thanks. Jeremy |
Re: Payment Method - use Smarty var in "Special instructions" ?
You need to use the Smarty eval function in the template to evaluate Smarty variables. Try changing this in checkout.tpl:
Code:
<td>{$payment_methods[payment].payment_details|default:" "}</td> Code:
{eval var=$payment_methods[payment].payment_details assign="paydtls"} |
Re: Payment Method - use Smarty var in "Special instructions" ?
Quote:
Hi Ralph, THANK YOU. This worked perfectly. BTW, in case anyone else is searching for this in the future, I put this into /skin1/modules/Checkout_One/checkout_one.tpl instead of checkout.tpl, and used smarty vars in the payment method special instructions -- same result. Perfect! Thanks, Jeremy |
Re: Payment Method - use Smarty var in "Special instructions" ?
I searched for this in the future...
IN 4.5.4, edit file: /common_files/modules/One_Page_Checkout/payment_methods.tpl find: Code:
{$payment.payment_details} replace with: Code:
{* BEGIN var in payment details mod *} (looks like $payment_methods[payment].payment_details became $payment.payment_details sometime between 4.1 and 4.5) Hope this helps someone (possibly me?) in the future. |
Re: Payment Method - use Smarty var in "Special instructions" ?
It's the future...
Checkout One version 2 made some changes to the template structure. In version 2.0.2 file: /skin/common_files/modules/Checkout_One/checkout_one_payment_methods.tpl FIND: {$v.payment_details} REPLACE WITH: Code:
{* BEGIN var in payment details mod *} |
All times are GMT -8. The time now is 03:53 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.