nsb Posted November 16, 2009 Share Posted November 16, 2009 http://addons.oscommerce.com/info/7116 Provides a complete printer filter for ink and toner products. Very simple install. Includes sample database with many of the major printer makes and models. Optional empty database that could be used as a filter system for any type of products associated with a make and/or model such as products for vehicles. Live test example is here Video of filter in action http://addons.oscommerce.com/info/7116 This is only V1 so feel free to improve and share any changes here. Quote Link to comment Share on other sites More sharing options...
majerfra Posted November 17, 2009 Share Posted November 17, 2009 Hello, very useful contribution, thanx!!!! Is it possible to arrange to associate products by model not by products ID? Regards F. Majer Quote Link to comment Share on other sites More sharing options...
nsb Posted November 17, 2009 Author Share Posted November 17, 2009 Thank you I hope you can find good use for it. The products are displayed using the product listing file, includes/modules/product_listing.php with sorting settings in admin. To sort by model could be done quite easily editing the catalog/filter_printer.php file. To have the option to do this is a good idea for next version. I may wait a week or so and see if more ideas come up before I upload a new version. Thanks, Adam Quote Link to comment Share on other sites More sharing options...
nsb Posted November 17, 2009 Author Share Posted November 17, 2009 If you wanted to sort by model now with a quick hack you can do this. Open catalog/filter_printer.php Find: $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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."')"; Replace with: $listing_sql = "select " . $select_column_list . " p.products_id, p.products_model, p.manufacturers_id, p.products_price, 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."') order by products_model"; By doing this you are just including p.products_model in the string then at the end of the string you are adding order by products_model Hope this helps. Quote Link to comment Share on other sites More sharing options...
nsb Posted November 17, 2009 Author Share Posted November 17, 2009 Hello, very useful contribution, thanx!!!! Is it possible to arrange to associate products by model not by products ID? Regards F. Majer Hi, thanks I'm happy you think Printer Ink & Toner Filter is useful :) I'm just learning how to use this forum and I actually replied twice to your question but created a new thread, the answers are there.... ooops. Quote Link to comment Share on other sites More sharing options...
alejovel Posted November 19, 2009 Share Posted November 19, 2009 Hi, thanks I'm happy you think Printer Ink & Toner Filter is useful :) I'm just learning how to use this forum and I actually replied twice to your question but created a new thread, the answers are there.... ooops. NSB, this contribution is just perfect, I can't thank you enough. I like it so much that I would love to use it directly in my index, so customers are able to find it right away. Is there anyway to put the dropdown menus in a box on the left, or somewhere in the index? nsb 1 Quote Link to comment Share on other sites More sharing options...
opty Posted November 27, 2009 Share Posted November 27, 2009 Hi, thanks for the post! I'm testing Printer Ink & Toner Filter on Windows XP with the following testing environment: ○ Apache 2.2.12 (IPv6 enabled) + OpenSSL 0.9.8k ○ MySQL 5.1.37 + PBXT engine ○ PHP 5.3.0 ○ phpMyAdmin 3.2.0.1 Have you any ideas why the script would not run on local test machine mentioned above (even though it shows the first drop-down box "Select One" (Find products by selecting the printer make and model)? Thanks. Quote Link to comment Share on other sites More sharing options...
spiKRE Posted February 24, 2010 Share Posted February 24, 2010 Hi, Alt1: Is it possible to define the length of the fields? It's doesn't look like that nice when the length of the field depends on the category-name. Would it be possible to set the the same? Alt2: Is it possible to not make the fields "jump" one line down? Quote Link to comment Share on other sites More sharing options...
nsb Posted April 1, 2010 Author Share Posted April 1, 2010 (edited) Hi, thanks for the post! I'm testing Printer Ink & Toner Filter on Windows XP with the following testing environment: ○ Apache 2.2.12 (IPv6 enabled) + OpenSSL 0.9.8k ○ MySQL 5.1.37 + PBXT engine ○ PHP 5.3.0 ○ phpMyAdmin 3.2.0.1 Have you any ideas why the script would not run on local test machine mentioned above (even though it shows the first drop-down box "Select One" (Find products by selecting the printer make and model)? Thanks. I think it may have something to do with the catalog/js/ajaxd.js file may not work as expected locally. Hi, Alt1: Is it possible to define the length of the fields? It's doesn't look like that nice when the length of the field depends on the category-name. Would it be possible to set the the same? Yes, you could do this with CSS. In your stylesheet search for: checkbox, input, radio, select inside the { } you can set your width. For example: width: 200px; Alt2: Is it possible to not make the fields "jump" one line down? I'm not exactly sure what you mean but you may be able to make the fields appear better with CSS or javascript. If possible please provide more details or a screenshot. PS Sorry for delay in replies but I never received email notifications of any posts Edited April 1, 2010 by nsb Quote Link to comment Share on other sites More sharing options...
nsb Posted April 1, 2010 Author Share Posted April 1, 2010 NSB, this contribution is just perfect, I can't thank you enough. I like it so much that I would love to use it directly in my index, so customers are able to find it right away. Is there anyway to put the dropdown menus in a box on the left, or somewhere in the index? Great ideas and I'm happy you like it :) Having it sit in the middle of the index page, similar to New Products can be done but would be challenge. A sidebox, with results in the middle of the page,could be done but would be an even bigger challenge. There are probably several ways it could be done but it really depends on what is on your home page. A simple solution would be to combine the catalog/index.php file with the catalog/filter_printer.php file to make one single index.php file. Please let me know if you would like this solution and I will do it for you. If your catalog/index.php has been edited at all please post or upload it here. Quote Link to comment Share on other sites More sharing options...
dukejack Posted April 13, 2010 Share Posted April 13, 2010 (edited) thanks for the contrib. In my case I certainly have the following problem: when I go to open a new browser for the link and printer filter. does not the selection. what may be the cause for this? only when I press again on the link does the selection. here to test live sorry for my bad englisch Edited April 13, 2010 by dukejack Quote Link to comment Share on other sites More sharing options...
dukejack Posted April 13, 2010 Share Posted April 13, 2010 (edited) The following error is displayed in IE. calling the first page (on filter_printer.php)after re-click on the link is the wrong way Details about the error to the site Message: ':' expected Line: 235 Sign: 39 Code: 0 URI: "http://www.domain.de/ordner/filter_printer.php?filterid=1?osCsid=1c8bd5b96ea2e9a7e5ca722ae921b541" Edited April 13, 2010 by dukejack Quote Link to comment Share on other sites More sharing options...
dukejack Posted April 14, 2010 Share Posted April 14, 2010 have Force Cookie Use on Youtube to true and now it works. Otherwise always depends on the oscID link drann the first Page. Quote Link to comment Share on other sites More sharing options...
nsb Posted April 17, 2010 Author Share Posted April 17, 2010 Please replace all code in: /includes/boxes/filter_printer.php with the following to avoid the session id problem. <?php /* catalog/includes/boxes/filter_printer.php osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 - 2010 osCommerce Released under the GNU General Public License */ ?> <!-- Printer Filter //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_FILTER_PRINTER); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a "href=' . tep_href_link(FILENAME_FILTER_PRINTER_FINDER) . '>Ink & Toner Finder</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- Printer Filter eof //--> The original file simply had a link to the page. I will upload this file in the addon section to save future users having this same problem. Quote Link to comment Share on other sites More sharing options...
Darkayer Posted April 20, 2010 Share Posted April 20, 2010 Very nice contrib. I was wondering if it was possible to let the output say something like (No product for this printer) or so when there is no product linked to a model? Since there is a line in the Text files (TEXT_NO_PRODUCTS) it should be right? Quote Link to comment Share on other sites More sharing options...
nsb Posted April 24, 2010 Author Share Posted April 24, 2010 Very nice contrib. I was wondering if it was possible to let the output say something like (No product for this printer) or so when there is no product linked to a model? Since there is a line in the Text files (TEXT_NO_PRODUCTS) it should be right? Yes, that's correct. Change the text in the catalog/includes/languages/english/filter_printer.php Quote Link to comment Share on other sites More sharing options...
BLaCKBuLL Posted May 18, 2010 Share Posted May 18, 2010 Hi Adam First thanks for this useful contirbution... I am using PHP 5.0.75 and install V1.2 Full Package I receive Parse error: syntax error, unexpected '<' in /................../catalog/includes/boxes/filter_printer.php on line 13 on main page... What do you think about this... Ty Quote Link to comment Share on other sites More sharing options...
nsb Posted May 19, 2010 Author Share Posted May 19, 2010 Hi Adam First thanks for this useful contirbution... I am using PHP 5.0.75 and install V1.2 Full Package I receive Parse error: syntax error, unexpected '<' in /................../catalog/includes/boxes/filter_printer.php on line 13 on main page... What do you think about this... Ty Sorry about that but I messed up and uploaded the wrong zip file for v1.2. Version 1.2 doesn't work... Please download and install the new version 1.3. http://addons.oscommerce.com/info/7116 Quote Link to comment Share on other sites More sharing options...
Envelo Posted May 20, 2010 Share Posted May 20, 2010 Hello, Thank for this addon, but i have 2 ideas, 1º take "box seach" on filter_printer_products.php. (when you have to many product this is very important) 2º maybe using ajax will get less loads of the webpage this is only some ideas, i will try to make this but maybe i do not get it Thank you Quote Link to comment Share on other sites More sharing options...
nsb Posted May 20, 2010 Author Share Posted May 20, 2010 Hello, Thank for this addon, but i have 2 ideas, 1º take "box seach" on filter_printer_products.php. (when you have to many product this is very important) 2º maybe using ajax will get less loads of the webpage this is only some ideas, i will try to make this but maybe i do not get it Thank you Great ideas :) and thank you for trying to make it. If you have any questions feel free to ask. Quote Link to comment Share on other sites More sharing options...
BLaCKBuLL Posted May 20, 2010 Share Posted May 20, 2010 Sorry about that but I messed up and uploaded the wrong zip file for v1.2. Version 1.2 doesn't work... Please download and install the new version 1.3. http://addons.oscommerce.com/info/7116 Dear Adam Thanks for adjustment Now i dont recieve any error but i need ask an otherthing TonerFilter is working with mozailla 3.6.3 perfectly but when i open with IE 7 nothing happens.You can find a picture as attachment.I am waiting your expect valuable comments... Best Regards Quote Link to comment Share on other sites More sharing options...
Envelo Posted May 21, 2010 Share Posted May 21, 2010 Great ideas :) and thank you for trying to make it. If you have any questions feel free to ask. i can't make it sorry Quote Link to comment Share on other sites More sharing options...
germ Posted May 23, 2010 Share Posted May 23, 2010 Dear Adam Thanks for adjustment Now i dont recieve any error but i need ask an otherthing TonerFilter is working with mozailla 3.6.3 perfectly but when i open with IE 7 nothing happens.You can find a picture as attachment.I am waiting your expect valuable comments... Best Regards Your syntax on the link is screwed up. Look at the HTML source and you'll see this: <a "href=http://www.orjinalsarf.com/filter_printer.php?filterid=1>Ink & Toner Finder</a> It needs to be: <a href="http://www.orjinalsarf.com/filter_printer.php?filterid=1">Ink & Toner Finder</a> Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
nsb Posted May 25, 2010 Author Share Posted May 25, 2010 Your syntax on the link is screwed up. Look at the HTML source and you'll see this: <a "href=http://www.orjinalsarf.com/filter_printer.php?filterid=1>Ink & Toner Finder</a> It needs to be: <a href="http://www.orjinalsarf.com/filter_printer.php?filterid=1">Ink & Toner Finder</a> Thanks and sorry for any inconvenience caused. I will post an update soon, just very busy and behind schedule with my current project. :) Quote Link to comment Share on other sites More sharing options...
germ Posted May 25, 2010 Share Posted May 25, 2010 Thanks and sorry for any inconvenience caused. I will post an update soon, just very busy and behind schedule with my current project. :) Don't misunderstand! :o I wasn't meaning to "point fingers". I was just offering an explanation for what was happening. :) Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > 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.