| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Passing $variable but won't display on page? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Passing $variable but won't display on page?
I'm doing a post with the following:
<input type="hidden" name="popcart" value="1"> It then redirects back to the same page and in the url it is passing the variable popcart=1 in the browser header successfully I then call the following which fails {if $popcart eq "1"} <script language="JavaScript" src="/popup/minicart_adplib.js"></script> <script language="JavaScript" src="/popup/minicart.js"></script> <body onload="show('template01');return true;"></body> {/if} I even tried outputting the variable to see if it will post but the system doesn't seem to grab the variables that I assign. Is there something I need to do? <h2>{$popcart}</h2> <== no output
__________________
Xcart 4.0.19 |
|||||||
#2
|
|||||||
|
|||||||
Re: Passing $variable but won't display on page?
when you put things in braces, its a smarty variable which is not the same as a html value
|
|||||||
#3
|
|||||||
|
|||||||
Re: Passing $variable but won't display on page?
ok thanks
__________________
Xcart 4.0.19 |
|||||||
#4
|
|||||||
|
|||||||
Re: Passing $variable but won't display on page?
How do i assign a html variable to a smarty variable ?
__________________
Xcart 4.0.19 |
|||||||
#5
|
|||||||
|
|||||||
Re: Passing $variable but won't display on page?
Ok I found out how to do it in the home.php file.
$smarty->assign("popcart",$popcart);
__________________
Xcart 4.0.19 |
|||||||
|
|||
X-Cart forums © 2001-2020
|