Print Page | Close Window

Search on exact phrase giving error everytime!

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=1757
Printed Date: 07-October-2024 at 1:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Search on exact phrase giving error everytime!
Posted By: njessen42
Subject: Search on exact phrase giving error everytime!
Date Posted: 24-June-2008 at 5:37pm
In our cart we are getting an error every time we click the option to "search on exact phrase" in the advanced search. It also doesn't give a specific reference ID either. Any other type of search in the advanced search works great. Any thoughts or ideas. Here is our advanced search page.

http://shop.rings-things.com/cart/pc/search.asp - http://shop.rings-things.com/cart/pc/search.asp



Replies:
Posted By: Hamish
Date Posted: 24-June-2008 at 6:10pm
Hi,
   Have you tested this after re-instating the original version of the search code?
It may be a knock on effect of the modifications.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: njessen42
Date Posted: 25-June-2008 at 12:38pm
Yes we just restored the original file before we edited it to removed [details] from the search and it still gave me an error using the "search by exact phrase" check box. Strange.... 


Posted By: Hamish
Date Posted: 25-June-2008 at 2:05pm
Hmmm,   Was this ever working on your site? Was it showSearchResults.asp that you restored to it's "vanilla"  state?
The failure is pretty instantaneous, so it doesn't seem to be related to the large number of products in your DB (not a timeout or anything like that).

Perhaps this issue is one to raise a ticket with EA about.


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: ricardoc
Date Posted: 26-June-2008 at 3:58pm
I restored showsearchresults.asp to it's vanilla state and I get results, but the query times out after showing all the results.

Our modified version of showsearchresults.asp instantly goes to techerr.asp but that is because the machine I built has a nuclear powered cpu and is fast.

Actually it errors to techerr.asp when you search, but I traced the code, and the error code is max int, 2million something.  Some reason the query is causing the error.  As soon as the query is executed, it errors.

Haven't gone much further than that.


Posted By: ricardoc
Date Posted: 26-June-2008 at 4:01pm
Addendum:  I just restored a vanilla pcShowproductM.asp and it works fine.

It's some custom code I stuck in that file that is causing it to time out.

Bingo..


Posted By: ricardoc
Date Posted: 26-June-2008 at 6:56pm
Ugh..
Anyone see a problem with this SQL query?  This is where it breaks....it executes the query and errors with a max int value.

"SELECT TOP 200 A.idProduct, A.sku, A.description, A.price, A.listHidden, A.listPrice, A.serviceSpec, A.bToBPrice, A.smallImageUrl, A.noprices, A.stock, A.noStock, A.pcprod_HideBTOPrice, A.pcProd_BackOrder, A.FormQuantity, A.pcProd_BackOrder, A.pcProd_BTODefaultPrice, cast(A.sDesc as varchar(8000)) sDesc FROM products A  WHERE idProduct IN ( SELECT TOP 200 idProduct FROM categories_products, categories WHERE idProduct = A.idProduct AND ((A.serviceSpec<>0 AND A.pcProd_BTODefaultPrice>=0 And A.pcProd_BTODefaultPrice<=999999999) OR (A.serviceSpec=0 AND A.configOnly=0 AND A.price>=0 And A.price<=999999999)) AND A.active=-1 AND A.removed=0 AND categories.idCategory=categories_products.idCategory AND categories.iBTOhide=0 AND categories.pccats_RetailHide=0 AND idSupplier=10 AND (stock>0 OR noStock<>0) AND ((((content1 LIKE 'blue bead') OR (content2 LIKE 'blue bead') OR (content3 LIKE 'blue bead')) OR ((content1 LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%') OR (content2 LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%') OR (content3 LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%')) OR ((content1 LIKE 'blue bead[^a-zA-z0-9]%') OR (content2 LIKE 'blue bead[^a-zA-z0-9]%') OR (content3 LIKE 'blue bead[^a-zA-z0-9]%')) OR ((content1 LIKE '%[^a-zA-z0-9]blue bead') OR (content2 LIKE '%[^a-zA-z0-9]blue bead') OR (content3 LIKE '%[^a-zA-z0-9]blue bead'))) OR ((A.description LIKE 'blue bead' OR  A.description LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%' OR  A.description LIKE 'blue bead[^a-zA-z0-9]%' OR  A.description LIKE '%[^a-zA-z0-9]blue bead') OR (A.sDesc LIKE 'blue bead' OR  A.sDesc LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%' OR  A.sDesc LIKE 'blue bead[^a-zA-z0-9]%' OR  A.sDesc LIKE '%[^a-zA-z0-9]blue bead') OR (SKU LIKE 'blue bead' OR  SKU LIKE '%[^a-zA-z0-9]blue bead[^a-zA-z0-9]%' OR  SKU LIKE 'blue bead[^a-zA-z0-9]%' OR  SKU LIKE '%[^a-zA-z0-9]blue bead'))) ORDER BY A.sku ASC, A.idproduct DESC"




Posted By: Matt
Date Posted: 26-June-2008 at 7:16pm
Hi ricardoc,

This query is from the Beta search files.  You should report all issues with the Beta back to us.

If you submit a ticket (ask for Matt) I will fix it for you.  Please provide temp FTP access if possible so I can review your files.


Posted By: Matt
Date Posted: 26-June-2008 at 7:19pm
Note: Anyone using a Beta or pre-release should report the issue back to the support agent that provided the files.  You will get the fastest support that way.


Posted By: ricardoc
Date Posted: 26-June-2008 at 7:25pm
will do, thanks.





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