Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

php in static page question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-22-2007, 06:53 PM
 
luxor luxor is offline
 

Senior Member
  
Join Date: Apr 2007
Posts: 120
 

Default php in static page question

I have the following placed in a static page:

Code:
{php} if($pr=="2") echo"2"; else echo "3"; {/php}

now when i reference page , 2 is showing always.

When I type in my browser page.html?pr=3

the 2 still shows, so the url variable insertion of 3 is not effecting the variable $pr at all.

Is there a way to make this work?
__________________
v4.1.8 GOLD
Reply With Quote
  #2  
Old 11-22-2007, 08:31 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: php in static page question

Why are you doing it in php instead of doing:

{if $smarty.get.pr eq "2}
show 2
{else}
show 3
{/if}

?
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:54 PM.

   

 
X-Cart forums © 2001-2020