Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-28-2007 12:21:20

fishbite
Member
Registered: 02-16-2007
Posts: 41

I have found a problem!

I think I have found a problem with the new cpp6 software, when you search for a product, results are shown, then when you click on the product to view details this is OK, But when you click back on the browser (internet explorer only) you get Webpage has expired error, when it should go back to the search results.

Can others test this to see if it works for you.

Also a quick question regarding the "quick search" again if say someone is at my shop and wants to search for say "brown shoes" does the search, search the single words as well as both of them, so if i searched for say "brown snooooes" (spelt wrong) or even "brown hair" does the results still show for "brown"?

In the advanced search form under search type "any word" does this mean any word will be searched? as this feature does not work?

I have tried testing this and get mixed results.
Can others also test this to see what results they recieve.

Thanks

Last edited by fishbite (03-28-2007 12:24:39)


The ultimate home business http://www.momum.com

Offline

 

#2 03-28-2007 13:24:05

danielk
Member
From: Massachusetts, USA
Registered: 02-23-2007
Posts: 11

Re: I have found a problem!

fishbite wrote:

I think I have found a problem with the new cpp6 software, when you search for a product, results are shown, then when you click on the product to view details this is OK, But when you click back on the browser (internet explorer only) you get Webpage has expired error, when it should go back to the search results.

I see the same problem in Internet Explorer 7.0 on two websites that I believe use ccp6 -- http://www.jagpublicsafety.com/ and http://www.fireplacestoreonline.com/shop/

I do not see the problem on those websites using Opera 9.1 or Firefox 2.0.0.3

Dan

Offline

 

#3 03-28-2007 13:59:32

fishbite
Member
Registered: 02-16-2007
Posts: 41

Re: I have found a problem!

I Have just tried the Demo store at wwwclickcartpro.com and that too does not work!


The ultimate home business http://www.momum.com

Offline

 

#4 03-28-2007 14:08:52

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

What you are seeing is "normal" behavior I believe.  Searching involves a form which posts data.  IE believes that returning to a page with posted data is a "bad thing" and gives you that message.  The other browsers are a bit more intelligent about it and realize that nothing really changed and do what you would expect.  This isn't a problem with CCP at all anyway.  There's no control over browser behavior when it comes to back and forward buttons.

Offline

 

#5 03-28-2007 14:17:52

fishbite
Member
Registered: 02-16-2007
Posts: 41

Re: I have found a problem!

Thanks Dave for clearing that up!, can you answer the quick search question?


The ultimate home business http://www.momum.com

Offline

 

#6 03-28-2007 14:26:37

fishbite
Member
Registered: 02-16-2007
Posts: 41

Re: I have found a problem!

Ok I have just surfed the web for about 5 minuites to various shopping carts php, asp and others. ALL seem to cope with this problem, can this be fixed in CPP 6?


The ultimate home business http://www.momum.com

Offline

 

#7 03-28-2007 17:05:37

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

fishbite wrote:

Also a quick question regarding the "quick search" again if say someone is at my shop and wants to search for say "brown shoes" does the search, search the single words as well as both of them, so if i searched for say "brown snooooes" (spelt wrong) or even "brown hair" does the results still show for "brown"?

The quick search is done using  and  which means it will search for *brown*  *shoes* in any of the following fields:  name, prodnum, keywords descshort

If you were searching for brown snoooes it will still find things that have brown in any of those fields.

fishbite wrote:

In the advanced search form under search type "any word" does this mean any word will be searched? as this feature does not work?

The  option in advanced search functions the same way as described above.  The  options changes the search to use  instead of .

BTW, please send me some links, via PM or email, to the other carts that you say allow the use of the back button in the browser and don't report that the page is expired.

Offline

 

#8 03-28-2007 23:52:23

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

Someone sent me a link to another cart via mail and I just took a look at it.  With that cart one doesn't get a page expired message with IE because it is passing all of the parameters for the search in the URL itself.  This can be a dangerous thing to allow since it lets people pass anything they want to the program.  It also limits how much data may be passed back (4k).  I suspect that this will be the case for the other examples too.

IMNSHO this is NOT a change you want made to CCP (nor do I think Nick would go for it anyway).

I have to comment again that this is an IE "quirk" and it's the only browser, afaik, that exhibits this behavior.  Why is anyones guess.

Last edited by djm0219 (03-29-2007 05:15:11)

Offline

 

#9 03-29-2007 00:19:15

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

fishbite wrote:

Thanks Dave for clearing that up!, can you answer the quick search question?

Here's the exact database call that happens if you do a search from quick search.

Code:

name LIKE '%personal%' OR prodnum LIKE '%personal%' OR keywords LIKE '%personal%' OR descshort LIKE '%personal%'

The same search from advanced search with the Any Word search type.

Code:

((name LIKE '%personal%') OR (prodnum LIKE '%personal%') OR (keywords LIKE '%personal%') OR (descshort LIKE '%personal%')) AND (sortprice>'0')

Offline

 

#10 03-29-2007 04:59:12

fishbite
Member
Registered: 02-16-2007
Posts: 41

Re: I have found a problem!

Thanks Dave for your help, much appreciated.


The ultimate home business http://www.momum.com

Offline

 

#11 03-31-2007 13:19:34

bill99
Member
Registered: 01-22-2007
Posts: 130

Re: I have found a problem!

Hi All,

Can you tell me where the queries for the quick search and advanced search are built. I'd like to experiment with modifying the queries to provide a result set more taylored to our specific needs. In particular I'd like to see if the sorting can be done using the regular price field in some way instead of the integer only sortprioce field which produces very poor results for us.

Thanks,

Bill

Offline

 

#12 03-31-2007 13:50:31

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

The SQL search in built in the  function within CCP_Prod.php which you'll find in the {private}/apps/{app}/CCP_Prod directory.  There's a specific area in that function for dealing with prices and currency settings.  The sort order is actually set when the  function is call after the SQL search statement is built.  You'll find that at line 420 in the file.

Offline

 

#13 03-31-2007 15:44:59

bill99
Member
Registered: 01-22-2007
Posts: 130

Re: I have found a problem!

thanks - I've been looking at this. I'm now searching using the full values of pricemin and pricemax against the regprice instead of the searchprice. This may have legs but the initial results I'm getting are mixed.

One thing that would help greatly would be to know what the final query that is used when performing the search looks like. Do you happen to know where I could display this as the prodsearch function is only responsible for building the where clause?

thanks

Bill

Offline

 

#14 03-31-2007 16:06:01

bill99
Member
Registered: 01-22-2007
Posts: 130

Re: I have found a problem!

Actually I think I can see the problem.

The regprice is stored in the database as a string. Therefore when searching between the range 1.00 to 4.00 the string 35.00 will match in the case of a string comparison!

So I need to do somthing like multiply all value by 100 to remove the decimal place and then pad everything with leading 0's to do the compare - maybe? roll

Bill

Offline

 

#15 03-31-2007 16:28:55

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: I have found a problem!

You shouldn't need to pad with leading zeros.  One solution is to use a multiplication (or any mathmatical operation, really), like you suggested:

WHERE (regprice*1) >=1.00 AND (regprice*1) <=4.00

That should implicitly cast the regular price as a floating point in most databases.  Or else, you can use the CAST statement:

WHERE CAST (regprice as SIGNED) >=1.00 AND CAST (regprice as SIGNED) <=4.00

You'll need to check the exact syntax for the database type you're using and you might use a different variable type in the CAST statement, bu that's the general idea.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#16 03-31-2007 17:03:32

bill99
Member
Registered: 01-22-2007
Posts: 130

Re: I have found a problem!

yes I'll give that a go. I need it to work on MSSQL and MySQL so I'll check the syntax.

If I can cast the value returned from the database as a float and compare it to the minprice / maxprice values also cast to x.xx (using sprintf or something) then we might be in business. I need to be sure the comparison will work for cases where the user enters an integer in the minprice / maxprice fields instead of a floating point value or the database contains, say 2 instead of 2.00.

Cheers,

Bill

Last edited by bill99 (03-31-2007 17:04:45)

Offline

 

#17 03-31-2007 17:35:57

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

bill99 wrote:

One thing that would help greatly would be to know what the final query that is used when performing the search looks like. Do you happen to know where I could display this as the prodsearch function is only responsible for building the where clause?

Turn on debug and you'll see the exact query (and a whole lot more) which will let you see exactly what the statement looks like when it's passed to the "do" function.  See  in the Wiki for information on how to turn on debug (you do not want to do this on a production installation).

Offline

 

#18 03-31-2007 17:48:03

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

bill99 wrote:

yes I'll give that a go. I need it to work on MSSQL and MySQL so I'll check the syntax.

You want to avoid doing anything that is "tied" to a specific type of database.  All of the functions that do DB related things in KHXC/CCP are database neutral.

bill99 wrote:

The regprice is stored in the database as a string. Therefore when searching between the range 1.00 to 4.00 the string 35.00 will match in the case of a string comparison!

How are you doing the compare?  If both variables are numeric and you're actually doing the compare in PHP it should work as expected.  The simplest way to make sure they are compared as numeric would be to add 0 to the things you want to compare.  But using < <= > >= == should get you the results you expect without having to add zero.

Edit to add: This quote from the PHP manual might help explain what's going on FWIW.

If you compare an integer with a string, the string is converted to a number. If you compare two numerical strings, they are compared as integers.

Last edited by djm0219 (03-31-2007 17:50:11)

Offline

 

#19 04-01-2007 15:45:50

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: I have found a problem!

djm0219 wrote:

Someone sent me a link to another cart via mail and I just took a look at it.  With that cart one doesn't get a page expired message with IE because it is passing all of the parameters for the search in the URL itself.  This can be a dangerous thing to allow since it lets people pass anything they want to the program.  It also limits how much data may be passed back (4k).  I suspect that this will be the case for the other examples too.

IMNSHO this is NOT a change you want made to CCP (nor do I think Nick would go for it anyway).

I have to comment again that this is an IE "quirk" and it's the only browser, afaik, that exhibits this behavior.  Why is anyones guess.

Some additional information about this.  I've been corresponding with someone off-line and there's another cart that doesn't exhibit the problem and it is NOT passing the search data in the URL.  Looking at the response  headers compared to CCP the only difference I can see is that the other cart is using a session cookie and CCP uses a "persistent" cookie with an expiration date (way in the future).

It still doesn't make sense, to me, that that alone would cause the page expired error in CCP and not the other cart but it's the only difference I can see in the headers.  The other difference is in the action used for the searching form.  CCP uses a fully qualified URL with http: etc while the other cart only uses a reference to search.php.  Again this doesn't seem to explain why CCP gives the expired message but it is another difference.

Can we simply get rid of IE? smile smile

Offline

 

#20 04-01-2007 15:56:45

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: I have found a problem!

2nd that motion!


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#21 04-21-2007 13:22:53

Charles
Member
From: USA
Registered: 12-24-2002
Posts: 252

Re: I have found a problem!

djm0219 wrote:

Someone sent me a link to another cart via mail and I just took a look at it.  With that cart one doesn't get a page expired message with IE because it is passing all of the parameters for the search in the URL itself.  This can be a dangerous thing to allow since it lets people pass anything they want to the program.  It also limits how much data may be passed back (4k).  I suspect that this will be the case for the other examples too.

IMNSHO this is NOT a change you want made to CCP (nor do I think Nick would go for it anyway).

I have to comment again that this is an IE "quirk" and it's the only browser, afaik, that exhibits this behavior.  Why is anyones guess.

And this is another good reason not to use IE!!


Charles

Offline

 

#22 07-27-2009 12:07:42

spowart
Member
From: London
Registered: 01-20-2009
Posts: 56
Website

Re: I have found a problem!

Is there a solution to this "Webpage has expired"  my boss wants it sorted out..

Not sure where to start.

1) Is there something I can do being a non developer?

2) Is there a solution that you could do for me as a support ticket?

Our Custom solution built by ClickCart Pro UK version:
My Boss has noticed it after making a search for a nearest Golf Club and clicking the back button to get back to the list of nearest Postcodes to Golf Clubs:

http://www.pgacitygolf.co.uk/shop/#GC_search

Thanks for your time.

Offline

 

#23 07-29-2009 04:56:47

spowart
Member
From: London
Registered: 01-20-2009
Posts: 56
Website

Re: I have found a problem!

bumperty

Offline

 

#24 07-29-2009 08:34:11

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: I have found a problem!

There is nothing within ccp that controls how long a webpage lives or when it expires, I belive that you will find that this is a browser issue not a ccp one. The only time limite ccp impoies is on the cookie life which you can change in the Settings: Application Settings Menu > Session and Cookie Setting for the backend.

John

Offline

 

#25 07-29-2009 08:38:35

spowart
Member
From: London
Registered: 01-20-2009
Posts: 56
Website

Re: I have found a problem!

ah cookie time, is it ok to change these?

I will have a look at this now. Thanks

Offline

 

Board footer