Print Page | Close Window

Registry search

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=4486
Printed Date: 30-June-2025 at 11:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Registry search
Posted By: virtualimage
Subject: Registry search
Date Posted: 16-May-2011 at 3:55pm

Hi all,

Our shoppers are finding the gift registry search function challenging.
Is there a way to code the registry search so that there is only one box but the search query will search all of the fields: (cname, clastname, cregname)

Basically if any of the fields match - the appropriate registries are returned.

Thanks very much in advance for your help.

Cheers,

Quinn




Replies:
Posted By: DevDuo
Date Posted: 17-May-2011 at 3:18pm
Hi there,

Not sure what version you are using, but you could try the following...

in ggg_srcGR.asp remove the last name and registry name rows.

Rename the label of the first field (cname) to something like Name: instead of First Name.

 You can either do this in the language file or inline.

In ggg_srcGRb.asp populate cname, clastname, and cregname all with the posted cname...

example...
cname=getUserInput(request("cname"),0)
clastname=getUserInput(request("cname"),0)
cregname=getUserInput(request("cname"),0)
emonth=getUserInput(request("emonth"),0)
eyear=getUserInput(request("eyear"),0)


Then change your AND's to OR's for the corresponding variables in the lines where the SQL query is being built, and this should produce an aggregate result set.

Always back up your files before modding. The above was not tested, but should work in theory... proceed as such...

Take care...
Ted





-------------
http://www.devduo.com - Website Design - Pittsburgh, PA - DevDuo


Posted By: virtualimage
Date Posted: 25-May-2011 at 9:17am
Thanks, Ted.

We tried something along those lines  but we were receiving every entry from the registry. I'll give it another shot from scratch and post my results. Thanks, again.

-Quinn


Posted By: DevDuo
Date Posted: 26-May-2011 at 10:35am
Probably just an issue with your use of AND and OR.

You may need to group some conditions, example...

WHERE active=1 AND (name='frank' OR lastname='jones')

-Ted


-------------
http://www.devduo.com - Website Design - Pittsburgh, PA - DevDuo



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net