Zen Cart Logo
Forums / Addon Sideboxes / product filter module addon

product filter module addon

Views: 81,446

Results 61 to 80 of 169
22 Sep 2009, 4:48 PM
#61
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

product filter module addon

limelites:

No disrespect, but this mod sucks. After reading the post and in spite of everyone having problems making it work, I tried to install it. Needless to say, nichts, nada, nothing! It's not worth a download.

If you're looking for a really, really good product filter then download and install the css_horizontal_drop_down_menu_1-5 from here.

It's not only a fantastic header menu with css fly out and completely customisable links, but it adds a rather amazing sort by filter to all of your pages!

I just thought I'd share this with you as I'd been searching in vain for a good product filter and had given up the chase when I stumbled on this by complete accident.

I have the css_horizontal_drop_down_menu_1-5 what "rather amazing sort by filter" does it add to all of your pages? Because i do not see any thing different no disrespect but i think what the people are looking for a is to sort by price which is something i am seeking as well has this mod actually worked correctly?

23 Sep 2009, 7:56 AM
#62
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: product filter module addon

lextechs, have a look at the technopro site in my signature. I have the sorter installed and it is working exactly as I want. I think this mod will meet your requirements.

23 Sep 2009, 6:06 PM
#63
atmpartmart avatar

atmpartmart

New Zenner

Join Date:
May 2009
Posts:
14
Plugin Contributions:
0

Re: product filter module addon

Can anybody help me out with the error quoted below?

Thanks in advance. I'd love to get this installed as we have added so many products lately and it's getting harder for customers to find the specific product they are looking for.

atmpartmart:

Well, here's a new one that nobody has posted about. Strange because I know the field "master_categories_id" does exist in the table "zen_products" (this is the correct table prefix in my installation).

If anybody can point me in the right direction, I'd greatly appreciate it. Here is the error below. Doesn't matter what category you search or price range, it always is a problme with "p.master_categories_id"...

1054 Unknown column 'p.master_categories_id' in 'on clause'
in:
[select count(distinct p.products_id) as total FROM zen_products p, zen_products_description pd, zen_products_to_categories p2c, zen_products_options po , zen_products_options_values pov LEFT JOIN zen_hide_categories h ON (p.master_categories_id = h.categories_id) WHERE (h.visibility_status < 2 OR h.visibility_status IS NULL) AND (p.products_status = 1 AND p2c.categories_id = 700 AND p.products_price >= 0 AND p.products_price <= 1000000 AND p.products_quantity > 0 AND p.products_id = pd.products_id AND p.products_id = p2c.products_id) ]

7 Oct 2009, 1:34 PM
#64
starruby avatar

starruby

Zen Follower

Join Date:
Nov 2007
Posts:
96
Plugin Contributions:
0

Re: product filter module addon

Hi Louis,

Thanks for the fix... I installed it and I think it should work now except that I am getting the following error :

1054 Unknown column 'price_range' in 'where clause'
in:
[select count(distinct p.products_id) as total FROM zen_products p, zen_products_description pd, zen_products_to_categories p2c, zen_products_options po , zen_products_options_values pov WHERE (p.products_status = 1 AND p2c.categories_id = price_range AND p.products_price >= 0 AND p.products_price <= 1000000 AND p.products_quantity > 0 AND p.products_id = pd.products_id AND p.products_id = p2c.products_id) ]

Any idea what's wrong? Thanks...

Harshil

Louis:

Hi All, I installed this mod but found that regardless of the criteria selected no items were shown. I started debugging and modified the header_php.php file a bit.

The scenario is as follows.

  1. The file as contained in the downloads folder will only work IF YOU HAVE ATTRIBUTES loaded against your products. I do not make use of attributes but I did like the idea of having a Price and Category search on my site.
  2. In the downloaded version there was a reference to a ZS_table. I fixed this by changing it to the correct variable so you no longer have to change the table prefix, it will be done for you.

To install this "fix" just override the header_php.php file contained in the contribution with the following:

<?php /** * header_php.php * *Zen Cart product filter module *Johnny Ye, Oct 2007 * update by Jan Cabicar, Apr 2009 */ require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); $error = false; $missing_one_input = false; if (isset($_GET['categories_id']) && !is_numeric($_GET['categories_id'])){ $error = true; $messageStack->add_session('filter', ERROR_AT_LEAST_ONE_INPUT); } else { $categories_id =''; } $available = 'yes'; $option_ids = array(); $option_values = array(); foreach($_GET as $key => $value){ if(substr_count($key,'options')>0) { $option_ids[sizeof($option_ids)] = str_replace('options_','',$key); $option_values[sizeof($option_values)] = $value; } } if (isset($_GET['categories_id'])) { $categories_id = $_GET['categories_id']; } if (isset($_GET['price_range'])) { $price_range = $_GET['price_range']; } if (isset($_GET['available'])) { $available = $_GET['available']; } if (isset($_GET['sort'])) { $sort = $_GET['sort']; } $price_check_error = false; if (zen_not_null($pfrom)) { if (!settype($pfrom, 'float')) { $error = true; $price_check_error = true; $messageStack->add_session('filter', ERROR_PRICE_FROM_MUST_BE_NUM); } } $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE); asort($define_list); $column_list = array(); reset($define_list); while (list($column, $value) = each($define_list)) { if ($value) $column_list[] = $column; } $select_column_list = ''; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { if (($column_list[$col] == 'PRODUCT_LIST_NAME') || ($column_list[$col] == 'PRODUCT_LIST_PRICE')) { continue; } if (zen_not_null($select_column_list)) { $select_column_list .= ', '; } switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model'; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name'; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity'; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image'; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight'; break; } } // always add quantity regardless of whether or not it is in the listing for add to cart buttons if (PRODUCT_LIST_QUANTITY < 1) { if (empty($select_column_list)) { $select_column_list .= ' p.products_quantity '; } else { $select_column_list .= ', p.products_quantity '; } } if (zen_not_null($select_column_list)) { $select_column_list .= ', '; } // Notifier Point $select_str = "SELECT DISTINCT " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status "; $from_str = " FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_OPTIONS . " po , " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov "; $order_str=''; $listing_sql = $select_str . $from_str . $where_str . $order_str; $listing_sql = "select DISTINCT "; $listing_sql .= "p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, p.products_price_sorter, p.products_qty_box_status "; $where_str = " WHERE (p.products_status = 1 "; $enable_price_filter = true; switch($price_range){ case 0: $pfrom = MIN_PRICE; $pto = MAX_PRICE; break; case 1: $pfrom = PRANGE1_MIN; $pto = PRANGE1_MAX; break; case 2: $pfrom = PRANGE2_MIN; $pto = PRANGE2_MAX; break; case 3: $pfrom = PRANGE3_MIN; $pto = PRANGE3_MAX; break; case 4: $pfrom = PRANGE4_MIN; $pto = PRANGE4_MAX; break; case 5: $pfrom = PRANGE5_MIN; $pto = PRANGE5_MAX; break; } if(SHOW_SORT){ switch($sort){ case 0: $order_str = " order by p.products_date_added DESC, p.products_date_available DESC, products_price ASC "; break; case 1: $order_str = " order by p.products_date_added ASC, p.products_date_available ASC, products_price ASC "; break; case 2: $order_str = " order by p.products_price ASC, p.products_date_added DESC, p.products_date_available DESC "; break; case 3: $order_str = " order by products_price DESC, p.products_date_added DESC, p.products_date_available DESC "; break; $order_str = " order by p.products_date_added DESC, p.products_date_available DESC, products_price ASC "; } } if($categories_id !=''){ $where_str .=" AND p2c.categories_id = ".$categories_id; } if($enable_price_filter){ $where_str .= " AND p.products_price >= ".$pfrom; $where_str .= " AND p.products_price <= ".$pto; } if($available=='yes'){ $where_str .= " AND p.products_quantity > 0 "; } $where_str .=" AND p.products_id = pd.products_id"; $where_str .=" AND p.products_id = p2c.products_id) "; $listing_sql .= $from_str; $listing_sql .= $where_str; $listing_sql .= $order_str; $listing_sql //$breadcrumb->add('title'); // This should be last line of the script: ?>
> 
> Thank you to the original author for this great mod.
7 Oct 2009, 1:59 PM
#65
louis avatar

louis

Zen Follower

Join Date:
Jul 2006
Location:
Johannesburg
Posts:
408
Plugin Contributions:
0

Re: product filter module addon

Not to sure about this one. Make sure your line collecting the category is in fact

if($categories_id !=''){
	$where_str .=" AND p2c.categories_id = ".$categories_id;

How the PRICE_RANGE got in there is a mystery to me.

7 Oct 2009, 2:30 PM
#66
starruby avatar

starruby

Zen Follower

Join Date:
Nov 2007
Posts:
96
Plugin Contributions:
0

Re: product filter module addon

Louis:

Not to sure about this one. Make sure your line collecting the category is in fact

if($categories_id !=''){
$where_str .=" AND p2c.categories_id = ".$categories_id;

> 
> How the PRICE_RANGE got in there is a mystery to me.

Yes, the line is perfectly set but still doesn't work... It's been tough getting this mod to work. Thanks for your help anyways!

Regards,
Harshil
17 Oct 2009, 8:41 AM
#67
biketuna avatar

biketuna

New Zenner

Join Date:
Jun 2009
Posts:
17
Plugin Contributions:
0

Re: product filter module addon

Is there any way of getting this filter to only list one attribute range in the sidebox, and not all of them?

18 Oct 2009, 1:44 AM
#68
lavanya avatar

lavanya

New Zenner

Join Date:
Oct 2009
Posts:
9
Plugin Contributions:
0

Re: product filter module addon

[QUOTE=limelites;684567]I installed this mod on 1.3.8 and it seems to work pretty well with only one little glitch which I fixed by altering the language file that was generating page headings on all my ezpages.
QUOTE]

Please can you explain here how you altered the language file as I am having the same problem and don't know how to make the changes.

Thanks, Lavinia

21 Oct 2009, 4:02 AM
#69
lavanya avatar

lavanya

New Zenner

Join Date:
Oct 2009
Posts:
9
Plugin Contributions:
0

Re: product filter module addon

Hi, anybody out there who can tell me what i can do that the heading_titles of my define pages are not overwritten by the heading_tilte of the product filter by attributes module?

27 Oct 2009, 7:49 AM
#70
lavanya avatar

lavanya

New Zenner

Join Date:
Oct 2009
Posts:
9
Plugin Contributions:
0

Re: product filter module addon

ok, as nobody answered i had to find out myself with the help of firebug and the delopers tool kit (indeed very helpfull both of them :smile:)
For any other zencart beginner like me who wants to know:
change in includes/templates/your template/templates/tpl_product_filter_result_default.php the line <h1 id="advSearchResultsDefaultHeading"><?php echo HEADING_TITLE; ?></h1> to

<h1 id="advSearchResultsDefaultHeading"><?php echo PRODUCT_FILTER_HEADING_TITLE; ?></h1> and then in product_filter_define.php the line define('HEADING_TITLE','Product Filter Results'); to define('PRODUCT_FILTER_HEADING_TITLE','Product Filter Results'); Like this the headers of my define pages don't get effected anymore by the product filter heading.
11 Nov 2009, 4:52 AM
#71
sckatlyns avatar

sckatlyns

New Zenner

Join Date:
Oct 2009
Posts:
20
Plugin Contributions:
0

Re: product filter module addon

I have tried and tried to get this mod to work. I get it installed and it shows up on the sidebox. The problem is that no matter what filter I choose, I do not get any products at all.

Can someone help?

Thanks,
Kat

11 Nov 2009, 10:50 AM
#72
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: product filter module addon

I had this issue... I posted my fix in thread 57 (http://www.zen-cart.com/forum/showpost.php?p=779077&postcount=57). For some reason the filter is set to NOT filter in the code, and there was no switch to turn it on in config, so I had to change the code and it worked for me. See http://www.zen-cart.com/forum/showpost.php?p=779077&postcount=57.

11 Nov 2009, 8:12 PM
#73
sckatlyns avatar

sckatlyns

New Zenner

Join Date:
Oct 2009
Posts:
20
Plugin Contributions:
0

Re: product filter module addon

Thanks for your reply.

I had seen your post and had checked my code. They were both set to true all ready.

Any more suggestions?

Thanks,
Kat

12 Nov 2009, 1:38 AM
#74
sckatlyns avatar

sckatlyns

New Zenner

Join Date:
Oct 2009
Posts:
20
Plugin Contributions:
0

Re: product filter module addon

Is there someone who can help me get this to work, please?

Thanks,
Kat

24 Nov 2009, 6:17 PM
#75
notforever avatar

notforever

New Zenner

Join Date:
Nov 2009
Posts:
2
Plugin Contributions:
0

Re: product filter module addon

Hello I´m using de 1.3.7 version, I installed all the files corresponding to their folders in the site, but i still cant see the filter, is there any kind of extra configuration for this to start working. the site is: http://www.bynsy.com/index.php

Thanks in advance

7 Dec 2009, 10:46 PM
#76
freduf avatar

freduf

New Zenner

Join Date:
Jul 2009
Posts:
8
Plugin Contributions:
0

Re: product filter module addon

hello
I followed all the son of topics, but to date, the filter does
not, whatever the choice, the module gives me no results, I
always the answer "no product"
who managed to get it working properly on module version 1.3.8.A
?

8 Dec 2009, 7:40 PM
#77
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: product filter module addon

I have the module installed and working but I do have a few issues:

  1. I just want to use it for its Pricing Feature, what needs to be done?

  2. Instead of the options being in a dropdown box, how can I make the options links instead?

Thanks in advance.

8 Dec 2009, 10:27 PM
#78
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: product filter module addon

autoace:

I have the module installed and working but I do have a few issues:

  1. I just want to use it for its Pricing Feature, what needs to be done?

  2. Instead of the options being in a dropdown box, how can I make the options links instead?

Thanks in advance.

Update to #1 above:
in product_filter_defines find (@ the bottom):

define('SHOW_CATEGORIES',true);
define('SHOW_ATTRIBUTES',true);
define('SHOW_PRICE_RANGE',true);
define('SHOW_AVAILABLE',true);
define('SHOW_SORT',true);

and set the ones you want to hide to false

Just in case anyone else needs to know.

9 Dec 2009, 2:24 PM
#79
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: product filter module addon

Is it possible to change this mod from an attribute filter to a Product Data filter?

Would I just need to change the database reference from the attributes table to the products data table? How could I do that?

Any ideas?

17 Jan 2010, 10:35 PM
#80
frumfell avatar

frumfell

New Zenner

Join Date:
Jul 2009
Posts:
7
Plugin Contributions:
0

Re: product filter module addon

hi, so if someone know solution for the problem described by Flower, about broken order in which product "products_options_values_name" appears when filtering by attributes?
will be thankfull for any help.
probably tpl_product_filter.php needs some add that say him to show them in products_options_values_sort_order , but i dont know how to write it.
thanks a lot for any help