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

Improved Search Function

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #191  
Old 04-03-2006, 03:14 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default

get a program like Araxis Merge or WinMerge, compare the search-related files to see what the differences are, might help you determine if there are dependency differences or not
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #192  
Old 04-04-2006, 09:47 AM
 
chrisollar chrisollar is offline
 

Member
  
Join Date: Mar 2006
Location: waco, texas, usa
Posts: 20
 

Default

Quote:
Originally Posted by davidsaldana
This search is great, I have been using it for a couple of months now. I have noticed that some of my customers are searching for products by the SKU. I have seen other sku search modifications on the forums, but none seem to work with this 4.0.16 modified search. Does anybody know how to change this to search by sku?

Thanks


I am having problems with SKU search, too. We are running gold 4.0.18. No search using sku alone works--not even the advanced search. I tried the mods but can only find partial code in our version. Any help would be appreciated!
__________________
Shannon Williams for Chris Ollar
chrisollar@grandecom.net
x-cart gold 4.0.18
x-cart gold 4.1
LC v2.1
LC v2.2 beta 1
unix
Reply With Quote
  #193  
Old 04-04-2006, 09:50 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default

the other day was doing a code compare between 4.0.18 & 4.1 rc 4 (on include/search.php), looks like there's a piece missing from the query regarding SKU.

FYI, in case you want to work on figuring out why the SKU search isn't working.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #194  
Old 04-06-2006, 10:16 AM
 
jherzog jherzog is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 93
 

Default Can we create a sticky w/ the best code for current version

Is it possible, or does any one else think it is a good idea to create a sticky post at the begining of this thread that contains the best code for use with the current version?

It is very confusing to read all 13 pages and then try to remember on which page and post the latest code was. I have seen many people asking through out the thread what the latest code was, so I know I am not the only one. I have seen on other mod threads that the first post is sticky and updated with newest changes/code.

Just an idea.
Jed
__________________
Jed Herzog
Gold X-Cart 4.0.17
http://www.outliersolutions.com
Portland Advertising Agency,
Portland Web Design
Reply With Quote
  #195  
Old 04-21-2006, 05:26 PM
 
MOC MOC is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 171
 

Default

Hey Guys, could someone post me a working code for Version 3.5.14?
I tried the code which should works for 3.5.3 but then im receiving the Error QUERY EMPTY while searching.

And i lost the track about the whole Codes posted in this thread!!

Quote:
INVALID SQL: 1065 : Query was empty
SQL QUERY FAILURE:

tia
saskia
Reply With Quote
  #196  
Old 05-22-2006, 02:45 AM
 
VTX VTX is offline
 

Member
  
Join Date: Oct 2005
Posts: 11
 

Default

Is it possible to extend this search code to include searches in the category fields?

Suppose this category:

Exhausts -> honda -> 2004 -> cb600

When I do a search for 'honda' I would like to show all products where honda is in the category or category path of the products to be displayed.

Is this doable?
__________________
X-Cart Gold 4.0.16
Reply With Quote
  #197  
Old 05-25-2006, 08:54 PM
 
MarkMan MarkMan is offline
 

Member
  
Join Date: Apr 2006
Posts: 14
 

Default Re: Can we create a sticky w/ the best code for current vers

Quote:
Originally Posted by jherzog
Is it possible, or does any one else think it is a good idea to create a sticky post at the begining of this thread that contains the best code for use with the current version?

It is very confusing to read all 13 pages and then try to remember on which page and post the latest code was. I have seen many people asking through out the thread what the latest code was, so I know I am not the only one. I have seen on other mod threads that the first post is sticky and updated with newest changes/code.

Just an idea.
Jed

Moderators, please, please do this. It would help out tremendously.
__________________
www.discfunctional.com
Xcart v4.0.18 gold [unix]
AOM v4.0.18
X-Affiliate v4.0.18
Reply With Quote
  #198  
Old 05-30-2006, 11:13 AM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default

Excellent post folks, but any idea on 4.0.18, I saw that 4.0.16 seems to be working (with a post from page 12 or 12) but does anyone have this up and running 4.0.18? Thanks a lot
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #199  
Old 05-30-2006, 01:57 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default

Quote:
Originally Posted by taltos1
Excellent post folks, but any idea on 4.0.18, I saw that 4.0.16 seems to be working (with a post from page 12 or 12) but does anyone have this up and running 4.0.18? Thanks a lot

I'd like to know this too before trying to install this mod.
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #200  
Old 06-10-2006, 02:58 PM
 
nfc5382 nfc5382 is offline
 

X-Adept
  
Join Date: Nov 2002
Posts: 477
 

Default

Quote:
Originally Posted by Grant
Quote:
Originally Posted by taltos1
Excellent post folks, but any idea on 4.0.18, I saw that 4.0.16 seems to be working (with a post from page 12 or 12) but does anyone have this up and running 4.0.18? Thanks a lot

I'd like to know this too before trying to install this mod.

This is for 4.0.18. It also searches the productid by default. Both admin and customers constantly search by the product id!

find:
Code:
# Search for substring in some fields...

replace with:
Code:
# Search for substring in some fields... ## new advanced search $ss = split(" ",$data["substring"]); $ss_condition = ""; foreach($ss as $s) { $condition = array(); ## //new advanced search if (!empty($data["by_title"])) { if($current_area == 'C' || $current_area == 'P') { $condition[] = "IF($sql_tbl[products_lng].product IS NOT NULL AND $sql_tbl[products_lng].product != '', $sql_tbl[products_lng].product, $sql_tbl[products].product) LIKE '%".$s."%'"; } else { $condition[] = "$sql_tbl[products].product LIKE '%".$s."%'"; } } if (!empty($data["by_shortdescr"])) { if($current_area == 'C' || $current_area == 'P') { $condition[] = "IF($sql_tbl[products_lng].descr IS NOT NULL AND $sql_tbl[products_lng].descr != '', $sql_tbl[products_lng].descr, $sql_tbl[products].descr) LIKE '%".$s."%'"; } else { $condition[] = "$sql_tbl[products].descr LIKE '%".$s."%'"; } } if (!empty($data["by_fulldescr"])) { if($current_area == 'C' || $current_area == 'P') { $condition[] = "IF($sql_tbl[products_lng].full_descr IS NOT NULL AND $sql_tbl[products_lng].full_descr != '', $sql_tbl[products_lng].full_descr, $sql_tbl[products].fulldescr) LIKE '%".$s."%'"; } else { $condition[] = "$sql_tbl[products].fulldescr LIKE '%".$s."%'"; } } ## always search productid if($current_area == 'C' || $current_area == 'P') { $condition[] = "IF($sql_tbl[products_lng].productid IS NOT NULL AND $sql_tbl[products_lng].productid != '', $sql_tbl[products_lng].productid, $sql_tbl[products].productid) LIKE '%".$s."%'"; } else { $condition[] = "$sql_tbl[products].productid LIKE '%".$s."%'"; } ## //always search productid if (!empty($data["extra_fields"]) && $active_modules['Extra_Fields']) { foreach($data["extra_fields"] as $k => $v) { $condition[] = "($sql_tbl[extra_field_values].value LIKE '%".$s."%' AND $sql_tbl[extra_fields].fieldid = '$k')"; } $join['extra_field_values'] = "$sql_tbl[products].productid = $sql_tbl[extra_field_values].productid"; $join['extra_fields'] = "$sql_tbl[extra_field_values].fieldid = $sql_tbl[extra_fields].fieldid AND $sql_tbl[extra_fields].active = 'Y'"; } if (!empty($condition)) { $ss_condition .= " AND (".implode(" OR ", $condition).")"; } ## new advanced search } $search_condition .= $ss_condition; ## //new advanced search # Search statistics if ($page == '0') { db_query("INSERT INTO $sql_tbl[stats_search] (search, date) VALUES ('$data[substring]', '".time()."')"); } } # /if (!empty($data["substring"])) # # Search by product features #

until:
Code:
# # Search by product features #
__________________
-----------------------
x-cart v4.7.6 [LIVE]
x-cart v4.0.18 [retired 2004-2016]
x-cart v3.5.13 [retired]
x-cart v3.4.14 [retired]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 01:29 PM.

   

 
X-Cart forums © 2001-2020