![]() |
Smarty Global variables
I'd like to create a new variable usable on any of the xcart pages through smarty. For example, $basicmarkup with the value of 1.2;
Thanks! |
Re: Smarty Global variables
Anyone?
|
Re: Smarty Global variables
Add this to the auth.php file
PHP Code:
Add it after this code: PHP Code:
|
Re: Smarty Global variables
Very helpful! This worked! I appreciate the help.
However, I've run into another issue. On the search results page when in debug mode it does not show any information about the user. What i'm trying to do is this. {if $customer_info.membership eq "GSA"} GSA Price:<br /> {math equation="price*markup" price=$products[product].taxed_price markup=$gsamarkup format="%.2f" assign=gsaprice} {include file="currency.tpl" value=$gsaprice plain_text_message=true} |
Re: Smarty Global variables
bump
|
Re: Smarty Global variables
Quote:
I can't get variables to show it's modified value in other templates. ex: in template_decide.tpl: Code:
{if $customer eq "A"} and then I use product.tpl to display the result like: Code:
markup: {$basicmarkup} The output will be "markup: 1.2" as it is assigned with $smarty->assign('basicmarkup', 1.2) in auth.php How do I pass the variable between templates with a new modified value ? |
All times are GMT -8. The time now is 07:37 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.