Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Search using GET not working - what am I doing wrong!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-26-2011, 03:19 AM
 
xcart-dev xcart-dev is offline
 

Advanced Member
  
Join Date: Jun 2011
Posts: 59
 

Default Search using GET not working - what am I doing wrong!

I have a very wierd one going on!

The website is batterycenter com but I have the same problem with another xcart shop I am developing.

If I search 'battery' I get all the products showing (over 200). Now I go to This Page URL and get the URL which is:
http://batterycenter.com/search.php?mode=search&by_title=Y&by_descr=Y&by_sk u=Y&search_in_subcategories=Y...y_shortdescr=Y

Now I want to put this in a link as a shortcut. All seems fine and it works (I have added a small link 'test' in the footer bar.

Next I close all my browser windows (to clear the Session), then open one (Firefox) and go to the website. I click on the link and it shows only 6 results. It shows those results because they are the only ones with 'battery' appearing in extra fields. It is totally ignoring Title, Description and Full Description.

Copy and paste the link into the browser window and hit enter before you click the link and everything is fine, afterwards it's not. Somewhere X-Cart is caching that I don't want to search the title when actually I do!

I have tried a link to the X-Cart Demo where the substring is 'ring' and that works absolutely fine.

NOTE: search.php and include/search.php have never been changed from the X-Cart originals.

So what am I missing? - any help appreciated!
__________________
X-Cart 4.4.3
Reply With Quote
  #2  
Old 10-26-2011, 11:37 AM
 
xcart-dev xcart-dev is offline
 

Advanced Member
  
Join Date: Jun 2011
Posts: 59
 

Default Re: Search using GET not working - what is XCart doing wrong!

Realised now that this is an X-Cart bug that causes search.php to have problems with GETting variables from the URL when Extra Fields module is enabled.

I made a link to a search (this is the link from the 'This page URL' in the search results:
http://batterycenter.com/search.php?mode=search&by_title=Y&by_descr=Y&by_sk u=Y&search_in_subcategories=Y...y_shortdescr=Y

The search returns 199 products.

Then I cleared the session (to imitate a first time visitor) and clicked on the link. I get 6 results. This is because search.php is only looking in Extra Fields and I do have 6 products where an extra field includes the substring 'battery'.

I went to the admin area and turned off the Extra Field module. Then I cleared the session and clicked the link. I get the correct 199 results. I went back into admin and turned on Extra Fields again. Cleared the session and clicked the link - 6 results.

Bug has been reported
__________________
X-Cart 4.4.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:52 PM.

   

 
X-Cart forums © 2001-2020