 |

IronVictory
User
Jun 20, 2008, 10:02 AM
Post #1 of 2
(172 views)
Shortcut
|
|
Show only "active" products
|
Can't Post
|
|
I have set up a checkbox called "Active" and I don't want to display any items that are not checked. I could put it in the URL like this: viewer.php?category=tents&active=1, but I don't want to show the active=1 in the URL as users could easily change it to active=0 to see all the inactive items. If I remove it from the URL and use 'where' => 'active ="1"'; I believe it will override the category=tents as well. Is there a way to still use ?category=tents in the URL but "hide" the active variable?
|
|
|  |
 |

Dave
Staff
/ Moderator

Jun 20, 2008, 11:15 AM
Post #2 of 2
(165 views)
Shortcut
|
|
Re: [IronVictory] Show only "active" products
[In reply to]
|
Can't Post
|
|
Hi IronVictory, You're on the right track. The old viewer code worked like that - when you had a 'where' field it would ignore the search fields. The new viewer code doesn't. You can tell the difference by the style of code: // old code style: $options['where'] = 'active ="1"'; // new code style: 'where' => 'active ="1"', Try adding the where as you suggested, it should do the job. Also, for a list and description of all the viewer options see this page: http://www.interactivetools.com/docs/cmsbuilder/viewer_options.html. With the new system searching is always enabled unless you disable it with: allowSearch => false, Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|