nsb Posted March 1, 2011 Author Share Posted March 1, 2011 Hi, sorry I missed these replies. The search feature for admin is cool. I will add it in next upgrade. I just installed it on a new demo here http://www.newshopinabox.com/demo you can see it by clicking the Oil and Lube button or the Printer Ink & Toner There are a few issues such as session id causing drop down boxes not to work, there is also a bug preventing the 'No Items Found' message form appearing sometimes. There's also some small issues in admin i need to clear up, most likely this weekend it will be done. If you have any other suggestions please let me know. Quote Link to comment Share on other sites More sharing options...
stClem Posted March 7, 2011 Share Posted March 7, 2011 Cool. Hope it wil be released soon. Quote Link to comment Share on other sites More sharing options...
nsb Posted May 7, 2011 Author Share Posted May 7, 2011 Sorry I just don't have any time to support this mod. I haven't haven't done anything on this project since I last posted as I'm too busy working with clients using other ecommerce platforms. If anyone is interested and has the time I can give you a copy of the entire site at http://newshopinabox.com/demo which is heavily modified and has a lot of great features regarding the filters. Especially the backend for oil and lube filters. Let me know if you are interested. Quote Link to comment Share on other sites More sharing options...
majerfra Posted June 20, 2011 Share Posted June 20, 2011 Sorry I just don't have any time to support this mod. I haven't haven't done anything on this project since I last posted as I'm too busy working with clients using other ecommerce platforms. If anyone is interested and has the time I can give you a copy of the entire site at http://newshopinabox.com/demo which is heavily modified and has a lot of great features regarding the filters. Especially the backend for oil and lube filters. Let me know if you are interested. Hi, i'm very interested on copy of your site, my filter doesn't work :-( thank you in advance My mail: [email protected] Quote Link to comment Share on other sites More sharing options...
MickSwift Posted September 13, 2011 Share Posted September 13, 2011 If anyone is interested and has the time I can give you a copy of the entire site at http://newshopinabox.com/demo which is heavily modified and has a lot of great features regarding the filters. Especially the backend for oil and lube filters. Let me know if you are interested. Yes im interested, would love a copy. Thanks email [email protected] Quote Link to comment Share on other sites More sharing options...
euromix Posted July 10, 2012 Share Posted July 10, 2012 I have the newest version of OScommerce and I am trying to get the printer and toner filter working. I have followed the instructions in the install file (with the exception of column_left) because that doesnt exist anymore I tried adding it in the module boxes in the admin and I cant seem to get this working can anyone help me get this working or know of another solution for my ink and toner store PLEASE HELP Quote Link to comment Share on other sites More sharing options...
automa Posted July 23, 2012 Share Posted July 23, 2012 Hello euromix, we have succesfully integrated this to our toner store with a few modifications though. Happy to help you if you could provide more details, for instance, what do you see when opening filter_printer.php ? Error, empty page, the select box ? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 26, 2013 Share Posted January 26, 2013 Hi How Printer Ink & Toner Filter is work with New Oscommerce v2.3.3 ? I install new version but can't do it.. Can't find column_left.php ? Plese help me ? REgards Mani Quote Link to comment Share on other sites More sharing options...
Guest Posted January 26, 2013 Share Posted January 26, 2013 Hi How Printer Ink & Toner Filter is work with New Oscommerce v2.3.3 ? I install new version but can't do it.. Can't find column_left.php ? Plese help me ? REgards Mani Quote Link to comment Share on other sites More sharing options...
PupStar Posted January 27, 2013 Share Posted January 27, 2013 @mvadukul21621 it does work with minor mods but you need to read this first http://www.oscommerce.com/forums/topic/368845-guide-to-converting-addons-from-22x-to-23x/ Quote Link to comment Share on other sites More sharing options...
robertmcintosh66 Posted August 31, 2013 Share Posted August 31, 2013 (edited) I have install Printer_filter 1.7 on osCommerce 2.3.3 which they say will work but I get a error Warning: Illegal string offset 'link' inC:\xampp\htdocs\catalog\kermit\includes\column_left.phpon line 34 in catalog/includes/colum left.php there in no file by that name can anyone help me Iam new to osc and not sure if i done it right Edited August 31, 2013 by robertmcintosh66 Quote Link to comment Share on other sites More sharing options...
robertmcintosh66 Posted September 1, 2013 Share Posted September 1, 2013 I have install Printer_filter 1.7 on osCommerce 2.3.3 which they say will work but I get a error Below are two warnings i get in admin page Warning: Illegal string offset 'link' inC:\xampp\htdocs\catalog\kermit\includes\column_left.phpon line 34 Warning: Illegal string offset 'title' inC:\xampp\htdocs\catalog\kermit\includes\column_left.phpon line 34 Below is the column_left.php the instructions say to add whats below but there is no such code in colum_left.php can anyone help as I need to get it to work on my site before i launch it require(DIR_WS_BOXES . 'whats_new.php'); dit Left Column File catalog/includes/column_left.php Add before require(DIR_WS_BOXES . 'whats_new.php'); // Printer Ink & Toner Filter require(DIR_WS_BOXES . 'filter_printer.php'); <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ if (tep_session_is_registered('admin')) { $cl_box_groups = array(); include(DIR_WS_BOXES . 'configuration.php'); include(DIR_WS_BOXES . 'catalog.php'); include(DIR_WS_BOXES . 'modules.php'); include(DIR_WS_BOXES . 'customers.php'); include(DIR_WS_BOXES . 'taxes.php'); include(DIR_WS_BOXES . 'localization.php'); include(DIR_WS_BOXES . 'reports.php'); include(DIR_WS_BOXES . 'tools.php'); ?> <div id="adminAppMenu"> <?php foreach ($cl_box_groups as $groups) { echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } ?> </div> <script type="text/javascript"> $('#adminAppMenu').accordion({ autoHeight: false, icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' } <?php $counter = 0; foreach ($cl_box_groups as $groups) { foreach ($groups['apps'] as $app) { if ($app['code'] == $PHP_SELF) { echo ',active: ' . $counter; break; } } $counter++; } ?> }); </script> <?php } ?> Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 1, 2013 Share Posted September 1, 2013 You will need a working knowledge of PHP to convert this old code to work with osC 2.3x. This one is probably not a good project for a beginner. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
robertmcintosh66 Posted September 10, 2013 Share Posted September 10, 2013 I have it running in osc 2.3.3 on cleaned install only thing now is I can't get it on the webpage because there is no column left in catalog I was to put code in that script Edit Left Column File catalog/includes/column_left.php Add before require(DIR_WS_BOXES . 'whats_new.php'); // Printer Ink & Toner Filter require(DIR_WS_BOXES . 'filter_printer.php'); and edit the following script Edit Main Language File catalog/includes/languages/english.php Add after define('BOX_INFORMATION_CONTACT', 'Contact Us'); // Printer Ink & Toner Filter define('BOX_HEADING_FILTER_PRINTER', 'Printer Filter'); define('BOX_INFORMATION_FILTER_PRINTER', 'Ink & Toner Finder'); but there is no line with Add after define('BOX_INFORMATION_CONTACT', 'Contact Us'); in the english.php as shown below can any one help me please <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2007 osCommerce Released under the GNU General Public License */ // look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Examples: // on RedHat try 'en_US' // on FreeBSD try 'en_US.ISO_8859-1' // on Windows try 'en', or 'English' @setlocale(LC_TIME, 'en_US.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'mm/dd/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD'); // Global entries for the <html> tag define('HTML_PARAMS', 'dir="ltr" lang="en"'); // charset for web pages and emails define('CHARSET', 'utf-8'); // page title define('TITLE', STORE_NAME); // header text in includes/header.php define('HEADER_TITLE_CREATE_ACCOUNT', 'Create an Account'); define('HEADER_TITLE_MY_ACCOUNT', 'My Account'); define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents'); define('HEADER_TITLE_CHECKOUT', 'Checkout'); define('HEADER_TITLE_TOP', 'Top'); define('HEADER_TITLE_CATALOG', 'Catalog'); define('HEADER_TITLE_LOGOFF', 'Log Off'); define('HEADER_TITLE_LOGIN', 'Log In'); // footer text in includes/footer.php define('FOOTER_TEXT_REQUESTS_SINCE', 'requests since'); // text for gender define('MALE', 'Male'); define('FEMALE', 'Female'); define('MALE_ADDRESS', 'Mr.'); define('FEMALE_ADDRESS', 'Ms.'); // text for date of birth example define('DOB_FORMAT_STRING', 'mm/dd/yyyy'); // checkout procedure text define('CHECKOUT_BAR_DELIVERY', 'Delivery Information'); define('CHECKOUT_BAR_PAYMENT', 'Payment Information'); define('CHECKOUT_BAR_CONFIRMATION', 'Confirmation'); define('CHECKOUT_BAR_FINISHED', 'Finished!'); // pull down default text define('PULL_DOWN_DEFAULT', 'Please Select'); define('TYPE_BELOW', 'Type Below'); // javascript messages define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n'); define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n'); define('JS_REVIEW_RATING', '* You must rate the product for your review.\n'); define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n'); define('JS_ERROR_SUBMITTED', 'This form has already been submitted. Please press Ok and wait for this process to be completed.'); define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please select a payment method for your order.'); define('CATEGORY_COMPANY', 'Company Details'); define('CATEGORY_PERSONAL', 'Your Personal Details'); define('CATEGORY_ADDRESS', 'Your Address'); define('CATEGORY_CONTACT', 'Your Contact Information'); define('CATEGORY_OPTIONS', 'Options'); define('CATEGORY_PASSWORD', 'Your Password'); define('ENTRY_COMPANY', 'Company Name:'); define('ENTRY_COMPANY_TEXT', ''); define('ENTRY_GENDER', 'Gender:'); define('ENTRY_GENDER_ERROR', 'Please select your Gender.'); define('ENTRY_GENDER_TEXT', '*'); define('ENTRY_FIRST_NAME', 'First Name:'); define('ENTRY_FIRST_NAME_ERROR', 'Your First Name must contain a minimum of ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.'); define('ENTRY_FIRST_NAME_TEXT', '*'); define('ENTRY_LAST_NAME', 'Last Name:'); define('ENTRY_LAST_NAME_ERROR', 'Your Last Name must contain a minimum of ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.'); define('ENTRY_LAST_NAME_TEXT', '*'); define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:'); define('ENTRY_DATE_OF_BIRTH_ERROR', 'Your Date of Birth must be in this format: MM/DD/YYYY (eg 05/21/1970)'); define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 05/21/1970)'); define('ENTRY_EMAIL_ADDRESS', 'E-Mail Address:'); define('ENTRY_EMAIL_ADDRESS_ERROR', 'Your E-Mail Address must contain a minimum of ' . ENTRY_EMAIL_ADDRESS_MIN_LENGTH . ' characters.'); define('ENTRY_EMAIL_ADDRESS_CHECK_ERROR', 'Your E-Mail Address does not appear to be valid - please make any necessary corrections.'); define('ENTRY_EMAIL_ADDRESS_ERROR_EXISTS', 'Your E-Mail Address already exists in our records - please log in with the e-mail address or create an account with a different address.'); define('ENTRY_EMAIL_ADDRESS_TEXT', '*'); define('ENTRY_STREET_ADDRESS', 'Street Address:'); define('ENTRY_STREET_ADDRESS_ERROR', 'Your Street Address must contain a minimum of ' . ENTRY_STREET_ADDRESS_MIN_LENGTH . ' characters.'); define('ENTRY_STREET_ADDRESS_TEXT', '*'); define('ENTRY_SUBURB', 'Suburb:'); define('ENTRY_SUBURB_TEXT', ''); define('ENTRY_POST_CODE', 'Post Code:'); define('ENTRY_POST_CODE_ERROR', 'Your Post Code must contain a minimum of ' . ENTRY_POSTCODE_MIN_LENGTH . ' characters.'); define('ENTRY_POST_CODE_TEXT', '*'); define('ENTRY_CITY', 'City:'); define('ENTRY_CITY_ERROR', 'Your City must contain a minimum of ' . ENTRY_CITY_MIN_LENGTH . ' characters.'); define('ENTRY_CITY_TEXT', '*'); define('ENTRY_STATE', 'State/Province:'); define('ENTRY_STATE_ERROR', 'Your State must contain a minimum of ' . ENTRY_STATE_MIN_LENGTH . ' characters.'); define('ENTRY_STATE_ERROR_SELECT', 'Please select a state from the States pull down menu.'); define('ENTRY_STATE_TEXT', '*'); define('ENTRY_COUNTRY', 'Country:'); define('ENTRY_COUNTRY_ERROR', 'You must select a country from the Countries pull down menu.'); define('ENTRY_COUNTRY_TEXT', '*'); define('ENTRY_TELEPHONE_NUMBER', 'Telephone Number:'); define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your Telephone Number must contain a minimum of ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.'); define('ENTRY_TELEPHONE_NUMBER_TEXT', '*'); define('ENTRY_FAX_NUMBER', 'Fax Number:'); define('ENTRY_FAX_NUMBER_TEXT', ''); define('ENTRY_NEWSLETTER', 'Newsletter:'); define('ENTRY_NEWSLETTER_TEXT', ''); define('ENTRY_NEWSLETTER_YES', 'Subscribed'); define('ENTRY_NEWSLETTER_NO', 'Unsubscribed'); define('ENTRY_PASSWORD', 'Password:'); define('ENTRY_PASSWORD_ERROR', 'Your Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.'); define('ENTRY_PASSWORD_ERROR_NOT_MATCHING', 'The Password Confirmation must match your Password.'); define('ENTRY_PASSWORD_TEXT', '*'); define('ENTRY_PASSWORD_CONFIRMATION', 'Password Confirmation:'); define('ENTRY_PASSWORD_CONFIRMATION_TEXT', '*'); define('ENTRY_PASSWORD_CURRENT', 'Current Password:'); define('ENTRY_PASSWORD_CURRENT_TEXT', '*'); define('ENTRY_PASSWORD_CURRENT_ERROR', 'Your Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.'); define('ENTRY_PASSWORD_NEW', 'New Password:'); define('ENTRY_PASSWORD_NEW_TEXT', '*'); define('ENTRY_PASSWORD_NEW_ERROR', 'Your new Password must contain a minimum of ' . ENTRY_PASSWORD_MIN_LENGTH . ' characters.'); define('ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING', 'The Password Confirmation must match your new Password.'); define('PASSWORD_HIDDEN', '--HIDDEN--'); define('FORM_REQUIRED_INFORMATION', '* Required information'); // constants for use in tep_prev_next_display function define('TEXT_RESULT_PAGE', 'Result Pages:'); define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS', 'Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> products)'); define('TEXT_DISPLAY_NUMBER_OF_ORDERS', 'Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> orders)'); define('TEXT_DISPLAY_NUMBER_OF_REVIEWS', 'Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> reviews)'); define('TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW', 'Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> new products)'); define('TEXT_DISPLAY_NUMBER_OF_SPECIALS', 'Displaying <strong>%d</strong> to <strong>%d</strong> (of <strong>%d</strong> specials)'); define('PREVNEXT_TITLE_FIRST_PAGE', 'First Page'); define('PREVNEXT_TITLE_PREVIOUS_PAGE', 'Previous Page'); define('PREVNEXT_TITLE_NEXT_PAGE', 'Next Page'); define('PREVNEXT_TITLE_LAST_PAGE', 'Last Page'); define('PREVNEXT_TITLE_PAGE_NO', 'Page %d'); define('PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE', 'Previous Set of %d Pages'); define('PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE', 'Next Set of %d Pages'); define('PREVNEXT_BUTTON_FIRST', '<<FIRST'); define('PREVNEXT_BUTTON_PREV', '[<< Prev]'); define('PREVNEXT_BUTTON_NEXT', '[Next >>]'); define('PREVNEXT_BUTTON_LAST', 'LAST>>'); define('IMAGE_BUTTON_ADD_ADDRESS', 'Add Address'); define('IMAGE_BUTTON_ADDRESS_BOOK', 'Address Book'); define('IMAGE_BUTTON_BACK', 'Back'); define('IMAGE_BUTTON_BUY_NOW', 'Buy Now'); define('IMAGE_BUTTON_CHANGE_ADDRESS', 'Change Address'); define('IMAGE_BUTTON_CHECKOUT', 'Checkout'); define('IMAGE_BUTTON_CONFIRM_ORDER', 'Confirm Order'); define('IMAGE_BUTTON_CONTINUE', 'Continue'); define('IMAGE_BUTTON_CONTINUE_SHOPPING', 'Continue Shopping'); define('IMAGE_BUTTON_DELETE', 'Delete'); define('IMAGE_BUTTON_EDIT_ACCOUNT', 'Edit Account'); define('IMAGE_BUTTON_HISTORY', 'Order History'); define('IMAGE_BUTTON_LOGIN', 'Sign In'); define('IMAGE_BUTTON_IN_CART', 'Add to Cart'); define('IMAGE_BUTTON_NOTIFICATIONS', 'Notifications'); define('IMAGE_BUTTON_QUICK_FIND', 'Quick Find'); define('IMAGE_BUTTON_REMOVE_NOTIFICATIONS', 'Remove Notifications'); define('IMAGE_BUTTON_REVIEWS', 'Reviews'); define('IMAGE_BUTTON_SEARCH', 'Search'); define('IMAGE_BUTTON_SHIPPING_OPTIONS', 'Shipping Options'); define('IMAGE_BUTTON_TELL_A_FRIEND', 'Tell a Friend'); define('IMAGE_BUTTON_UPDATE', 'Update'); define('IMAGE_BUTTON_UPDATE_CART', 'Update Cart'); define('IMAGE_BUTTON_WRITE_REVIEW', 'Write Review'); define('SMALL_IMAGE_BUTTON_DELETE', 'Delete'); define('SMALL_IMAGE_BUTTON_EDIT', 'Edit'); define('SMALL_IMAGE_BUTTON_VIEW', 'View'); define('ICON_ARROW_RIGHT', 'more'); define('ICON_CART', 'In Cart'); define('ICON_ERROR', 'Error'); define('ICON_SUCCESS', 'Success'); define('ICON_WARNING', 'Warning'); define('TEXT_GREETING_PERSONAL', 'Welcome back <span class="greetUser">%s!</span> Would you like to see which <a href="%s"><u>new products</u></a> are available to purchase?'); define('TEXT_GREETING_PERSONAL_RELOGON', '<small>If you are not %s, please <a href="%s"><u>log yourself in</u></a> with your account information.</small>'); define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?'); define('TEXT_SORT_PRODUCTS', 'Sort products '); define('TEXT_DESCENDINGLY', 'descendingly'); define('TEXT_ASCENDINGLY', 'ascendingly'); define('TEXT_BY', ' by '); define('TEXT_REVIEW_BY', 'by %s'); define('TEXT_REVIEW_WORD_COUNT', '%s words'); define('TEXT_REVIEW_RATING', 'Rating: %s [%s]'); define('TEXT_REVIEW_DATE_ADDED', 'Date Added: %s'); define('TEXT_NO_REVIEWS', 'There are currently no product reviews.'); define('TEXT_NO_NEW_PRODUCTS', 'There are currently no products.'); define('TEXT_UNKNOWN_TAX_RATE', 'Unknown tax rate'); define('TEXT_REQUIRED', '<span class="errorText">Required</span>'); define('ERROR_TEP_MAIL', '<font face="Verdana, Arial" size="2" color="#ff0000"><strong><small>TEP ERROR:</small> Cannot send the email through the specified SMTP server. Please check your php.ini setting and correct the SMTP server if necessary.</strong></font>'); define('TEXT_CCVAL_ERROR_INVALID_DATE', 'The expiry date entered for the credit card is invalid. Please check the date and try again.'); define('TEXT_CCVAL_ERROR_INVALID_NUMBER', 'The credit card number entered is invalid. Please check the number and try again.'); define('TEXT_CCVAL_ERROR_UNKNOWN_CARD', 'The first four digits of the number entered are: %s. If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.'); define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a><br />Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a>'); ?> Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 10, 2013 Share Posted September 10, 2013 The boxes in the left column are now modules in includes/modules/boxes. You can use one of the existing modules (such as bm_information.php) as a model to make your new boxes. You can generally put the code from the old box in the execute() method of your new box. There's a guide to creating a new box that gives you the important changes. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
robertmcintosh66 Posted September 28, 2013 Share Posted September 28, 2013 Hi I Have got he catalog part working or he backend but having trouble installing the box in module boxes here is my bm_filter_ printer.php file and th error iam getting <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ class bm_filter_printer { var $code = 'filter_printer'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_filter_printer() { $this->title = MODULE_BOXES_FILTER_PRINTER_TITLE; $this->description = MODULE_BOXES_FILTER_PRINTER_DESCRIPTION; if ( defined('MODULE_BOXES_FILTER_PRINTER_STATUS') ) { $this->sort_order = MODULE_BOXES_FILTER_PRINTER_SORT_ORDER; $this->enabled = (MODULE_BOXES_FILTER_PRINTER_STATUS == 'True'); $this->group = ((MODULE_BOXES_FILTER_PRINTER_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_FILTER_PRINTER_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <a href="' . tep_href_link(FILENAME_FILTER_PRINTER_FINDER) . '">' . MODULE_BOXES_FILTER_PRINTER_BOX_FILTER_PRINTER_FINDER . '</a>' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_FILTER_PRINTER_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Filter_printer Module', 'MODULE_BOXES_FILTER_PRINTER_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_FILTER_PRINTER_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_FILTER_PRINTER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_FILTER_PRINTER_STATUS', 'MODULE_BOXES_FILTER_PRINTER_CONTENT_PLACEMENT', 'MODULE_BOXES_FILTER_PRINTER_SORT_ORDER'); } } ?> Notice: Undefined variable: mInfo in C:\xampps\htdocs\cartridge\catalog\gonzo\modules.php on line 247 Notice: Trying to get property of non-object in C:\xampps\htdocs\cartridge\catalog\gonzo\modules.php on line 247 Notice: Undefined variable: mInfo in C:\xampps\htdocs\cartridge\catalog\gonzo\modules.php on line 249 Notice: Trying to get property of non-object in C:\xampps\htdocs\cartridge\catalog\gonzo\modules.php on line 249 I used the BM_Information.php and followed the steps in the guide to creating a new box can anyone help thanks Quote Link to comment Share on other sites More sharing options...
pgower Posted February 23, 2014 Share Posted February 23, 2014 Hi Has anybody got this working for the latest version of OSC. I have the admin side working but i am struggling on getting the client side working,with creating the left column box Quote Link to comment Share on other sites More sharing options...
jaydean Posted May 26, 2014 Share Posted May 26, 2014 Does anyone have the full printer search addon for the latest version of oscommerce ? Also does anyone know how to create a page which displays all of the printer models with links to their cartridges? Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 3, 2015 Share Posted December 3, 2015 (edited) @Tsimi ok I have started from scratch and I think I have found the problem and it lies in the product query. This query works $products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd, '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.$printer_category_id.'" order by pd.products_name asc';but as soon as I add in p.products_id = pc.printer_category_idso the query then looks like this it stops working $products_query_raw = 'select distinct p.products_id, p.products_model, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd, '.TABLE_PRINTER_CATEGORY.' pc where p.products_id = pd.products_id and p.products_id = pc.printer_category_id and pd.language_id = "'.(int)$languages_id.'" and pc.printer_category_id = "'.$printer_category_id.'" order by pd.products_name asc';Any ideas why? Mark @@PupStar Let's continue here in this topic. ;) You're right it does work when using the old query. Why? I have no idea yet. Other question is why do you need that p.products_id = pc.printer_category_id part i don't see any difference with or without it. Edited December 3, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 3, 2015 Share Posted December 3, 2015 (edited) @@PupStar I just finished bootstrapping both files for the admin area. filter_printer_category.php filter_printer_products.php And thanks to your query it works now. Add/Edit/Remove categories and Add/Remove products works now. Haven't seen any errors so far. I also bootstrapped the catalog side but! it won't show me anything. No dropdowns to select from and no text what so ever just a continue button. When I deactivate the if($showfilter) { part it shows me some text but still no dropdowns. So the query(ies) are not working properly I guess. The code is very old and it had mysql_ stuff inside which is deprecated but even changing them to tep_db_ it doesn't work. So more digging to do then.... Edited December 3, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 3, 2015 Share Posted December 3, 2015 The code I have now is very far from the original its scary. I have everything working except that query urgh Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 3, 2015 Share Posted December 3, 2015 (edited) @@PupStar What about the catalog side? Can you show me your catalog side file? The code I have now is very far from the original its scary. I have everything working except that query urgh Do you need that query addition? Edited December 3, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 3, 2015 Share Posted December 3, 2015 (edited) @@PupStar What about the catalog side? Can you show me your catalog side file? Do you need that query addition? @@Tsimi the catalog side is this <?php require('includes/application_top.php'); if(isset($_REQUEST['filterid'])&&($_REQUEST['filterid']!='')) { $filterid = $_REQUEST['filterid']; $filterquery = tep_db_query("select * from ".TABLE_PRINTER_CATEGORY." where parent_id = '0' AND printer_category_id = '".$filterid."'"); if(tep_db_num_rows($filterquery)>0) { $showfilter = true; } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FILTER_PRINTER); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FILTER_PRINTER_FINDER)); require(DIR_WS_INCLUDES . 'template_top.php'); $printerid = 0; if(isset($_REQUEST['mode'])&&($_REQUEST['mode']=='showlist')) { $printerid= $_REQUEST['parts_cat_'.$filterid]; } elseif(isset($_REQUEST['mode'])&&($_REQUEST['mode']=='searchlist')) { $vehidrow = @mysql_fetch_array(mysql_query("SELECT printer_category_name, printer_category_id, categories_image FROM ".TABLE_PRINTER_CATEGORY." where category_name = '".$_REQUEST['keywords']."'")); $vehidrow = tep_db_fetch_array($query); if($vehidrow['printer_category_id']!='') { $printerid= $vehidrow['printer_category_id']; $printerid= $vehidrow['categories_image']; } } $catimage_query = tep_db_query("select categories_image, category_image_name FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$printerid."'"); ?> <?php if($showfilter) { ?> <div class="panel panel-default"> <div class="panel-body"> <div> <div class="row"> <div class="col-sm-3"><?php getprintercatoptions($filterid); ?></div> <div class="col-sm-9"><?php echo TEXT_PARTS_FINDER_DESCRIPTION;?></div> </div> </div> </div> </div> <?php $define_list = array('PARTS_PRODUCT_LIST_MEDIACAT_PART_NO' => PARTS_PRODUCT_LIST_MEDIACAT_PART_NO, 'PARTS_PRODUCT_LIST_MEDIACAT_QUANTITY' => PARTS_PRODUCT_LIST_MEDIACAT_QUANTITY, 'PARTS_PRODUCT_LIST_MODEL' => PARTS_PRODUCT_LIST_MODEL, 'PARTS_PRODUCT_LIST_NAME' => PARTS_PRODUCT_LIST_NAME, 'PARTS_PRODUCT_LIST_IMAGE_ICON' => PARTS_PRODUCT_LIST_IMAGE_ICON, 'PARTS_PRODUCT_LIST_MANUFACTURER' => PARTS_PRODUCT_LIST_MANUFACTURER, 'PARTS_PRODUCT_LIST_PRICE' => PARTS_PRODUCT_LIST_PRICE, 'PARTS_PRODUCT_LIST_QUANTITY' => PARTS_PRODUCT_LIST_QUANTITY, 'PARTS_PRODUCT_LIST_WEIGHT' => PARTS_PRODUCT_LIST_WEIGHT, 'PARTS_PRODUCT_LIST_BUY_NOW' => PARTS_PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PARTS_PRODUCT_LIST_MEDIACAT_PART_NO': $select_column_list .= 'pd.mediacat_part_no, '; break; case 'PARTS_PRODUCT_LIST_MEDIACAT_QUANTITY': $select_column_list .= 'p.products_mediacat_quantity, '; break; case 'PARTS_PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PARTS_PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PARTS_PRODUCT_LIST_IMAGE_ICON': $select_column_list .= ''; break; case 'PARTS_PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PARTS_PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PARTS_PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PARTS_PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } if($printerid>0) { $printercat_query = tep_db_query("SELECT * FROM ".TABLE_PRINTER_CATEGORY." WHERE printer_category_id = '".$printerid."'"); $printercat_row = tep_db_fetch_array($printercat_query); $productids = $printercat_row['productids']; if($productids!='') { $listing_sql = "select distinct " . $select_column_list . " p.products_id, products_model, p.manufacturers_id, p.products_image, p.products_price, pd.mediacat_part_no, products_name, products_description, products_mediacat_quantity, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and FIND_IN_SET(p.products_id,'".$productids."' )"; //$listing_sql .= " order by pd.mediacat_part_no"; } while ($category_image = tep_db_fetch_array($catimage_query)) { if($productids!='') { ?> <div class="alert alert-success" role="alert"><?php echo '' . $category_image['category_image_name'];?></div> <div class="row"> <div class="col-sm-5"> <div class="panel panel-primary"> <div class="panel-heading"><?php echo TEXT_PANEL_HEADER_PARTS_DIAGRAM;?></div> <div class="panel-body"><?php echo '' . tep_image_parts(DIR_WS_IMAGES_PARTS . $category_image['categories_image'], '', '');?></div> </div> </div> <div class="col-sm-7"> <div class="panel panel-primary"> <div class="panel-heading"><?php echo TEXT_PART_FINDER_LISTING;?></div> <div class="panel-body"> <div class="panel-table"> <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING_LIST); ?> </div> </div> </div> </div> <?php } } } } function getprintercatoptions($printer_category_id="",$curprintercatid="") { $fieldid = $printer_category_id; if(isset($_REQUEST['parts_cat_'.$printer_category_id])&&($_REQUEST['parts_cat_'.$printer_category_id]!='')) { $printer_category_id = $_REQUEST['parts_cat_'.$printer_category_id]; $str = getprintercatpath($printer_category_id,""); // change thefollowing add alias of count $query1 = tep_db_query("SELECT count(printer_category_id) as count FROM " . TABLE_PRINTER_CATEGORY . " where parent_id = '".$printer_category_id."'"); $chkbottomROW = tep_db_fetch_array($query1); if($str =="") {$str = "0,";} //change here use alias if($chkbottomROW['count'] > 0) { $str .= $printer_category_id.","; } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); }else{ if($curprintercatid>0) { $str = getprintercatpath($curprintercatid,""); if($str =="") { $str = $curprintercatid.","; }else{ $str .= $curprintercatid.","; } }else{ $str = getprintercatpath($printer_category_id,""); if($str =="") {$str = $printer_category_id.",";} } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); } } function editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid="") { $i=0; $cntvarr = count($catarr); foreach($catarr as $val) { $veh_cat_array = array(array('id' => '', 'text' => 'Select One')); $printers_query = tep_db_query("select * from " . TABLE_PRINTER_CATEGORY . " where parent_id = '".$val."' order by category_name"); if(tep_db_num_rows($printers_query)>0) { while ($printers = tep_db_fetch_array($printers_query)) { $veh_cat_array[] = array('id' => $printers['printer_category_id'], 'text' => $printers['category_name']); } if($cntvarr==$i+1) { $selval = $printer_category_id; }else{ $selval = $catarr[$i+1]; } ?> <?php echo tep_draw_pull_down_menu_parts('parts_cat_'.$val, $veh_cat_array, $selval, 'onchange="document.frmveh.parts_cat_'.$fieldid.'.value=this.value;document.frmveh.submit();"');?> <?php $i++; } } } function getprintercatpath($printer_category_id, $str) { $str1 = $str; $printers_query = tep_db_query("select parent_id from " . TABLE_PRINTER_CATEGORY . " where printer_category_id = '".$printer_category_id."'"); $printers = tep_db_fetch_array($printers_query); $parent_id = $printers['parent_id']; if($parent_id==0) { return $str1; }else{ $str1 .= $parent_id.","; $str1 = getprintercatpath($parent_id, $str1); return $str1; } } ?> <form name="frmveh" action="" method="get"> <input type="hidden" name="parts_cat_<?php echo $filterid;?>" value="<?php echo $_REQUEST['parts_cat_1'];?>"> <input type="hidden" name="filterid" value="<?php echo $filterid;?>" /> <input type="hidden" name="mode" value="showlist" /> </form> <?php require(DIR_WS_INCLUDES . 'template_bottom.php'); ?> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> If I remember correctly that part of the query allows me to sort by category name because without it I can not sort by category (I think) Edited December 3, 2015 by PupStar Quote Link to comment Share on other sites More sharing options...
PupStar Posted December 4, 2015 Share Posted December 4, 2015 @@Tsimi ok I have narrowed this right down. This query works fine $products_query_raw = 'select p.products_id, p.products_model, pd.products_name, p.products_price, p.products_tax_class_id, p.products_id, p.products_mediacat_ref_no, p.products_mediacat_quantity from '.TABLE_PRODUCTS.' p, '.TABLE_PRODUCTS_DESCRIPTION.' pd where p.products_id = pd.products_id order by pd.products_name asc'; until I change this order by pd.products_name to this order by pd.products_id then the untick does not save the changed the database. I have no idea why ordering by products_id is causing the break. Mark Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 4, 2015 Share Posted December 4, 2015 (edited) did you try "order by p.products_id"? I on the other hand can't get the front end to show or work at all. Nothing is showing up, no dropdowns, no nothing. Edited December 4, 2015 by Tsimi 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.