| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Smarty Global variables | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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!
__________________
X-Cart version 4.1.6 PHP 5.1.1 MySQL server 5.0.27 MySQL client 4.1.7 Web server Microsoft-IIS/6.0 Operation system Windows |
|||||||
#2
|
|||||||
|
|||||||
![]() Anyone?
__________________
X-Cart version 4.1.6 PHP 5.1.1 MySQL server 5.0.27 MySQL client 4.1.7 Web server Microsoft-IIS/6.0 Operation system Windows |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Add this to the auth.php file
PHP Code:
Add it after this code: PHP Code:
|
|||||||||
#4
|
|||||||
|
|||||||
![]() 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}
__________________
X-Cart version 4.1.6 PHP 5.1.1 MySQL server 5.0.27 MySQL client 4.1.7 Web server Microsoft-IIS/6.0 Operation system Windows |
|||||||
#5
|
|||||||
|
|||||||
![]() bump
__________________
X-Cart version 4.1.6 PHP 5.1.1 MySQL server 5.0.27 MySQL client 4.1.7 Web server Microsoft-IIS/6.0 Operation system Windows |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
I can't get variables to show it's modified value in other templates. ex: in template_decide.tpl: Code:
and then I use product.tpl to display the result like: Code:
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 ?
__________________
Rene End user - merchant In the upgrade process 4.6.6 to 5.4.x ![]() Mods I miss in 5.4.x: xCMS, Create-A-Sale, On-Sale AC, Kit Builder AC, Manufacturer-A-Z BCSE, Product-Bundle BCSE, Pre-Order BCSE, Customer Quotes BCSE |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|