| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
Check for url paramater existance | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||||
|
|||||||||
|
Hello ..
Wondering if there is a way in smarty to find out if a certain parameter exists in the url's query string? e.g: current url - product.php?productid=16137&cat=0&page=1&featured and I need to check if the parameter 'featured' exists ... {if $php_url.query_string eq "featured"} ... {/if} doesn't seem to work, because that outputs the whole query string ... Can anyone help ? Thanks Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
|
#2
|
|||||||
|
|||||||
|
Try...
Code:
__________________
xcartmods.co.uk |
|||||||
|
#3
|
|||||||||
|
|||||||||
|
Thats Great ... Thanks Phil ..
Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
|
#4
|
|||||||
|
|||||||
|
IS there a way to read just part of the query string? Like an instring function of some sort? I need to look for "mode=checkout" within the query string, but there may be more parameters then that.
Any help is appreciated. -dpm
__________________
x-cart-4.1.8gold |
|||||||
|
#5
|
|||||||
|
|||||||
|
Code:
__________________
xcartmods.co.uk |
|||||||
|
#6
|
|||||||
|
|||||||
|
Hi Phil...
Thanks for your quick response... I should have been a little more clear... I have 2 options: 1. cart.php?mode=checkout 2. cart.php?mode=checkout&signup=1 If the signup=1 is present then I show the user a hidden div tag where they can signup for a membership. I tried this but it didnt work. {if $signup eq "1"} ... {/if} Any ideas? Many Thanks, -dpm
__________________
x-cart-4.1.8gold |
|||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||