Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Printer Ink & Toner Filter


nsb

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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?

Link to comment
Share on other sites

  • 1 month later...

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 by nsb
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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 by dukejack
Link to comment
Share on other sites

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 by dukejack
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

for_adam.JPG

Link to comment
Share on other sites

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>

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

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. :)

Link to comment
Share on other sites

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.

:)

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...