VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Search - customize
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cps
VP-ASP New User

South Africa
69 Posts

Posted - November 05 2012 :  09:13:16  Show Profile  Visit cps's Homepage  Reply with Quote
I would like to customize my search facility in the following ways:

1) Currently, none of my child products display when I search for the product codes - how do I get them to display? e.g. 1406 (a child product of Branch Tree STD Green).

2) When I search for a product code, it should match exactly - how do I do this? e.g. searching for product code 1043 which is also a tree, product code 11043 displays in the search results which I don't want.

Please could someone assist me with one or both requests?


www.thecpswarehouse.co.za

manilow
VP-ASP New User

France
106 Posts

Posted - November 05 2012 :  10:01:45  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi cps,

To display all child (inventory) products in your search results, edit the shopproductcreatesql.asp file around line 840:

'inventory
sql = sql & " AND (higherCatalogId is null)"

Outquote this part of the sql string :

'inventory
'sql = sql & " AND (higherCatalogId is null)"


If you want only exact matches of your query, modify around line 745:

SQL = SQL & "p." & searchfields(j) & " LIKE "& sqlserverprefixn &"'%" & tosql(exactString,"Text") & "%' "

To

SQL = SQL & "p." & searchfields(j) & " = " & sqlserverprefixn &"'" & tosql(exactString,"Text") & "' "


This works when your visitor uses the "exact phrase" field on the advanced search form on shopsearch.asp.


Kind regards,

Erik
www.AquaThermia.com
Go to Top of Page

cps
VP-ASP New User

South Africa
69 Posts

Posted - November 06 2012 :  04:35:25  Show Profile  Visit cps's Homepage  Reply with Quote
Hi there,

Thanks so much - the first one worked great - I can now search for child products.

However the second one didn't work unfortunately - any ideas would be greatly appreciated.

www.thecpswarehouse.co.za
Go to Top of Page

manilow
VP-ASP New User

France
106 Posts

Posted - November 06 2012 :  05:34:24  Show Profile  Visit manilow's Homepage  Reply with Quote
Hi cps,

Which type of database do you use?

Regards,

Erik
www.AquaThermia.com
Go to Top of Page

cps
VP-ASP New User

South Africa
69 Posts

Posted - November 26 2012 :  01:09:08  Show Profile  Visit cps's Homepage  Reply with Quote
I think it's SQL sever but I'm not 100 percent sure - is there a way that I can check?(Sorry for the delayed reply.)

www.thecpswarehouse.co.za
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000