Welcome, Guest ( Customer Panel | Login )




 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-CART 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-CART New User

France
134 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-CART 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-CART New User

France
134 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-CART 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
0 Item(s)
$0.00