drofe Posted January 29, 2013 Share Posted January 29, 2013 I have implemented Show soldout items for 2.3 and also Add in-stock only filter. This has added a working filter to advanced search in my shop. it is meant also to add the filter to categories and manufacturer displays but this doesn't work at all for me and was problematic for others as well, going on this topic. I'm also interested in implementing the filter in the basic search box. This can clearly be done, going on this topic and I see the filter is still working in Puggybelle's shop. Another option would at least be to sort the soldout items at the bottom of the list. I'm not a coder so I'm dependent on a revised addon in this area and wondered if someone was working on it. Quote Link to comment Share on other sites More sharing options...
drofe Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) By pattern matching I've managed to get the filter working in the basic search box. My code in bm_search.php now looks like this: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_search { var $code = 'bm_search'; var $group = 'boxes'; var $instock; var $title; var $description; var $sort_order; var $enabled = false; function bm_search() { $this->instock = HEADER_INSTOCK; $this->title = MODULE_BOXES_SEARCH_TITLE; $this->description = MODULE_BOXES_SEARCH_DESCRIPTION; if ( defined('MODULE_BOXES_SEARCH_STATUS') ) { $this->sort_order = MODULE_BOXES_SEARCH_SORT_ORDER; $this->enabled = (MODULE_BOXES_SEARCH_STATUS == 'True'); $this->group = ((MODULE_BOXES_SEARCH_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_SEARCH_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: left;">' . ' ' . tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . ' ' . tep_draw_checkbox_field('instock', 1, false). HEADER_INSTOCK. ' ' . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 75%"') . ' ' . tep_draw_hidden_field('search_in_description', '1') . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', MODULE_BOXES_SEARCH_BOX_TITLE) . '<br />' . MODULE_BOXES_SEARCH_BOX_TEXT . '<br /><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><strong>' . MODULE_BOXES_SEARCH_BOX_ADVANCED_SEARCH . '</strong></a>' . ' </form>' . ' </div>' . '</div>'; This is a great advance! Now all I need help with is to get the category and manufacturer filters working. I've compared my index.php code with the examples in the previous topic and can't see any notable differences. Edited January 29, 2013 by drofe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.