tgely 262 Posted July 3, 2015 (edited) Hi all, my Extended Search Bar pushed out for BS stores. http://oscom.hu/images/store_search/store_search_bootstrap_oscommerce.png Add-On : http://addons.oscommerce.com/info/9328 If products are found more than 5 result then advanced search link appears in dropdown as 6th line. If product is not found then advanced search link is displaying in dropdown. Exception: typed single "b" or "B" has no effect. Store Search field working as an origin Search bar with typed enter/return or click on button. Search in description configuration mode has effect only as origin Search method. File content searches are only in "OR" conditions. Categories and product results are working by "AND" conditions. Edited July 3, 2015 by Gergely 4 altoid, clustersolutions, Gyakutsuki and 1 other reacted to this osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
KevinMelbourne 0 Posted July 4, 2015 Great contribution! Does this work for osCommerce v2.3.1? Share this post Link to post Share on other sites
tgely 262 Posted July 4, 2015 Hi @@KevinMelbourne,sorry but new technologies not supported on old systems. You could do it with "less" scripts. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
tgely 262 Posted July 5, 2015 Coming Next.. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
♥BlueBunyip 3 Posted July 6, 2015 Thank you for the great work on this contribution! There is one area where I have an issue - people frequently search on my store by model number as well as keyword. If they use model number then they get the "No Products Found! Try Here" message instead of the relevant product. If they hit return they get taken to the Advanced Search page or if they click the magnifying glass they go directly to the product which are both fine. My fear is that when they see the "No Products Found" message they will abandon the store. I managed to get it working just with model number by changing line 106 of content_searches.php to this: $like_statement .= " p.products_model LIKE '%" . tep_db_input($g) . "%' AND "; … but I haven't been able to get the search incorporating results from model number as well as product name. Greg Share this post Link to post Share on other sites
tgely 262 Posted July 6, 2015 Thank you for the great work on this contribution! There is one area where I have an issue - people frequently search on my store by model number as well as keyword. If they use model number then they get the "No Products Found! Try Here" message instead of the relevant product. If they hit return they get taken to the Advanced Search page or if they click the magnifying glass they go directly to the product which are both fine. My fear is that when they see the "No Products Found" message they will abandon the store. I managed to get it working just with model number by changing line 106 of content_searches.php to this: $like_statement .= " p.products_model LIKE '%" . tep_db_input($g) . "%' AND "; … but I haven't been able to get the search incorporating results from model number as well as product name. Greg Thanks the report. I see the problem. "AND" statement caused this in the query string. I will fix it in the next release with separated "OR" between fields in query. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
ringo667 2 Posted July 6, 2015 Great Contrib, thanks. I use an older Version of OSC BS How can i get the Search bar in the "boxes_header" Group? I Use the Group "header" only in index with the Page Carousel Banner Slider Module Share this post Link to post Share on other sites
tgely 262 Posted July 6, 2015 (edited) Great Contrib, thanks. I use an older Version of OSC BS How can i get the Search bar in the "boxes_header" Group? I Use the Group "header" only in index with the Page Carousel Banner Slider Module At this moment we are in the same version. :D In next days I will do it for myself. I try to figure out for ourselves.. Change: var $group = 'header'; To: var $group = 'boxes_header'; Change: include(DIR_WS_MODULES . 'content/' . $this->group . '/templates/store_search.php'); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); to: include(DIR_WS_MODULES . 'boxes/templates/store_search.php'); $template = ob_get_clean(); $oscTemplate->addBlock($template, $this->group); Find ext/modules/.../store_searches.php change: include(DIR_WS_LANGUAGES . $language . '/modules/content/header/cm_header_store_search.php'); to: include(DIR_WS_LANGUAGES . $language . '/modules/boxes/cm_header_store_search.php'); Upload structure is a little bit different catalog/includes/boxes/templates/ (here should upload template file store_search.php) catalog/includes/boxes/ (here we should upload cm_header_store_search.php) catalog/includes/langauges/english/modules/boxes/ (here we should upload cm_header_store_search.php language file) ext directories could be origin format because all links are absolutes. I think it should be all, but I will test later. Post here if something is wrong. Edited July 7, 2015 by Gergely more edits need osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
ringo667 2 Posted July 6, 2015 now it works, thx :) Share this post Link to post Share on other sites
ringo667 2 Posted July 6, 2015 .... but i have see a little Bug with the german Umlaute äö Whwn i click "View more products on search page.." there are no Products found Share this post Link to post Share on other sites
tgely 262 Posted July 7, 2015 .... but i have see a little Bug with the german Umlaute äö umlaut1.JPG Whwn i click "View more products on search page.." there are no Products found umlaut2.JPG and what happening when äö is in searchbar and click on magnifying glass? osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
tgely 262 Posted July 7, 2015 (edited) then it works... Hotfix for non-english languages change code in ext/modules/content/header/content_searches.php file Find both of: str_replace(' ', '+', $query) replace width: urlencode(str_replace(' ', '+', $query)) Edited July 7, 2015 by Gergely bad fix code osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
blavak 7 Posted July 8, 2015 Hi Gergely. Please look at screencast I created. https://drive.google.com/file/d/0Bx2B3PwSBTx4OWU3U3ZBcHk2bzg/edit?usp=drivesdk I have to select some category and then search. If i use search on index.php site it works for first time as the standard version.... Clue? Share this post Link to post Share on other sites
tgely 262 Posted July 8, 2015 @@blavak Hi Tomas,You have a javascript error in index.php. In these cases typahead could be broken. TypeError: $(...).swiperight is not a function $("#header-carousel").swiperight(function() {$("#header-carousel").carousel('pre... Fix you script error and it will be ok. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
blavak 7 Posted July 8, 2015 Yep... You are right (as allways) Corrected..... THX köszönöm szépen Share this post Link to post Share on other sites
azpro 147 Posted July 21, 2015 (edited) @@Gergely Hi Gergely, Tnx for nice add-on! I believe I have found the hotfix .... urlencode(str_replace(' ', '+', $query)) ....gives unexpected results for a query with multiple words. Hitting the link "View more products on search page.." will give in url : For Example keywords=model%2Bproduct_name&search_in_description=1 ... Returns No Results In stead of keywords=model+product_name&search_in_description=1 ... Will give expected results Removing urlencode() again solves this problem and interestingly enough still works for specials characters like ä and ü. Furthermore the html in function tep_navbar_store_search() is incorrect: $search_link = '<div class="searchbox-margin">'; $search_link .= tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'class="form-horizontal"'); $search_link .= ' <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . MODULE_CONTENT_HEADER_STORE_SEARCH_PLACEHOLDER . '" id="quick_search" data-provide="typeahead" autocomplete="off" style="margin-right:-2px;"', 'search') . ' <span class="input-group-btn"><button type="submit" class="btn ' . $btnclass .'" style="border-top-left-radius: 0px; border-bottom-left-radius: 0px;"><i class="glyphicon glyphicon-search"></i></button></span>'; if (tep_not_null($description) && ($description === true)) { $search_link .= tep_draw_hidden_field('search_in_description', '1'); } $search_link .= ' </div>' . ' </div>'; $search_link .= tep_hide_session_id() . '</form>'; Should be : $search_link = '<div class="searchbox-margin">'; $search_link .= tep_draw_form('quick_find', tep_href_link('advanced_search_result.php', '', $request_type, false), 'get', 'class="form-horizontal"'); $search_link .= ' <div class="input-group">' . tep_draw_input_field('keywords', '', 'required placeholder="' . MODULE_CONTENT_HEADER_STORE_SEARCH_PLACEHOLDER . '" id="quick_search" data-provide="typeahead" autocomplete="off" style="margin-right:-2px;"', 'search') . ' <span class="input-group-btn"><button type="submit" class="btn ' . $btnclass .'" style="border-top-left-radius: 0px; border-bottom-left-radius: 0px;"><i class="glyphicon glyphicon-search"></i></button></span>'; if (tep_not_null($description) && ($description === true)) { $search_link .= tep_draw_hidden_field('search_in_description', '1'); } $search_link .= ' </div>'; $search_link .= tep_hide_session_id() . '</form>'; $search_link .= ' </div>'; Maybe you can confirm! Tnx! Edited July 21, 2015 by azpro Share this post Link to post Share on other sites
tgely 262 Posted July 22, 2015 @@azproThank Arjan your bug report! Nice catch!urlencode syndrome depends on superglobals so I have to edit my advanced_search_result.php to fix this problem finaly. I hope this wont be a problem in v2.4.. if (isset($HTTP_GET_VARS['keywords'])) { $keywords = tep_db_prepare_input(urldecode($HTTP_GET_VARS['keywords'])); } osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
vampirehunter 16 Posted July 22, 2015 does the search also bring up the pages of the site into the search bar? i can on the video, it was listing the actual file names in the search bar. Share this post Link to post Share on other sites
tgely 262 Posted July 22, 2015 @@vampirehunteryes osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
directdepot 0 Posted July 25, 2015 Any one else getting the following error in the error_log? [25-Jul-2015 17:48:31 America/New_York] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/directd8/public_html/ext/modules/content/header/store_search/content_searches.php:1) in /home/directd8/public_html/includes/functions/general.php on line 1279[25-Jul-2015 17:48:31 America/New_York] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/directd8/public_html/ext/modules/content/header/store_search/content_searches.php:1) in /home/directd8/public_html/includes/functions/sessions.php on line 97 Share this post Link to post Share on other sites
tgely 262 Posted July 26, 2015 @@directdepot could you see the previous errors? Its looks like this was the outcome. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Share this post Link to post Share on other sites
osjohn 0 Posted July 27, 2015 (edited) Those are the only errors. Edited July 27, 2015 by osjohn Share this post Link to post Share on other sites
ocs1409 6 Posted August 9, 2015 hello like the contrib and i have already integrated in my shop i am trying to port this addon to a contrib for edit order with bootstrap in order to add products to the order i trying to add products via a modal popup with this input : <div class="form-group"> <label for="search" class="col-xs-3"> <b>- Of geef zoekopdracht in om matches te zien -</b> </label> <div class="col-xs-9"> <input class="form-control" data-provide="typeahead" autocomplete="off" type="text" name="search" id="search" placeholder="" /> </div></div> the script for typeahead : <script type="text/javascript"> $("#search").typeahead({ source: function( query, process ) { $.ajax({ url: '<?php echo DIR_FS_ADMIN ; ?>search.php', type: 'post', data: 'query='+ query, datatype: 'JSON', async: true, success: function(data) { process(data) ; } } ) } });</script> the search.php : <?php require('includes/application_top.php'); $like_statement = $HTTP_POST_VARS[ "query" ] ; // also tried $_POST and $_REQUEST $results= array() ; $autoComplete = tep_db_query("SELECT distinct(p.products_id), pd.products_name, p.products_price, p.products_tax_class_id FROM products_description pd, products p WHERE pd.products_name like '%".$term ."%' AND pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_status limit 6"); $list = tep_db_num_rows($autoComplete); if($list > 0) { while($value = tep_db_fetch_array($autoComplete)){ $row_array['mmsi'] = $row['products_id']; $row_array['name'] = $row['products_name']; array_push($results,$row_array); } } echo json_encode($results, JSON_FORCE_OBJECT); ?> i have typeahead 0.11.1 js and css include in template_top.php do you have a idea what is wrong ?? greet eric Share this post Link to post Share on other sites