Printer Ink & Toner Filter
#1
Posted 16 November 2009 - 09:46 AM
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.
#2
Posted 17 November 2009 - 07:42 AM
very useful contribution, thanx!!!!
Is it possible to arrange to associate products by model not by products ID?
Regards
F. Majer
#3
Posted 17 November 2009 - 08:32 AM
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
#4
Posted 17 November 2009 - 09:43 AM
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.
#5
Posted 17 November 2009 - 10:04 AM
majerfra, on 17 November 2009 - 07:42 AM, said:
very useful contribution, thanx!!!!
Is it possible to arrange to associate products by model not by products ID?
Regards
F. Majer
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.
#6
Posted 19 November 2009 - 08:13 PM
nsb, on 17 November 2009 - 10:04 AM, said:
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?
#7
Posted 27 November 2009 - 01:19 PM
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.
#8
Posted 24 February 2010 - 09:25 AM
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?
#9
Posted 01 April 2010 - 09:11 AM
opty, on 27 November 2009 - 01:19 PM, said:
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.
spiKRE, on 24 February 2010 - 09:25 AM, said:
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?
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 by nsb, 01 April 2010 - 09:13 AM.
#10
Posted 01 April 2010 - 10:36 AM
alejovel, on 19 November 2009 - 08:13 PM, said:
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.
#11
Posted 13 April 2010 - 04:39 PM
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 by dukejack, 13 April 2010 - 04:40 PM.
#12
Posted 13 April 2010 - 08:07 PM
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 by dukejack, 13 April 2010 - 08:08 PM.
#13
Posted 14 April 2010 - 08:01 PM
#14
Posted 17 April 2010 - 02:33 AM
<?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.
#15
Posted 20 April 2010 - 08:47 AM
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?
#16
Posted 24 April 2010 - 06:08 AM
Darkayer, on 20 April 2010 - 08:47 AM, said:
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?
#17
Posted 18 May 2010 - 03:39 PM
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
#18
Posted 19 May 2010 - 12:37 AM
BLaCKBuLL, on 18 May 2010 - 03:39 PM, said:
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
#19
Posted 20 May 2010 - 01:13 AM
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
#20
Posted 20 May 2010 - 01:31 AM
Envelo, on 20 May 2010 - 01:13 AM, said:
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









