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

product filter module addon

Views: 81,446

Results 1 to 20 of 169
30 Oct 2007, 9:48 PM
#1
jye999 avatar

jye999

New Zenner

Join Date:
Oct 2007
Posts:
1
Plugin Contributions:
0

product filter module addon

I wrote a sidebox module for product filter by attribute, and price range. I looked all over the places and couldn't find something similar, so ending writing my own. It seems to be working, but only tested using zen-cart v1.37.

Don't forget to read the README file first. I tried to sumit to zen-cart.org. But the file didn't get submitted (don't know why).

Anyways, Here's the download page in my blog. Zen Cart Product Filter by Attribute, Price RangeZen Cart Product Filter by Attribute, Price Range. I wish zen-cart can give me a place to host the file. I've already tried to submit to the download page, but it failed to upload.

14 Nov 2007, 3:56 PM
#3
alray10 avatar

alray10

New Zenner

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

Re: product filter module addon

I have been looking for something like this but found to problems with this mod.

First is no Images show.

The second when you put price lowest to highest it gives this out.

1054 Unknown column 'P.products_price' in 'order clause'
in:
[select DISTINCT p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status FROM zen_products p, zen_products_description pd, zen_products_to_categories p2c, zen_products_attributes pa, zen_products_options po , zen_products_options_values pov WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND pa.options_id = 1 AND pa.options_values_id = 26 AND p.products_id = pa.products_id AND p.products_status =1 AND p.products_quantity > 0 ) order by P.products_price ASC, p.products_date_added DESC, p.products_date_available DESC limit 0, 15]

If these 2 things are corrected it has the makings of a great mod.

16 Nov 2007, 4:27 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: product filter module addon

The reference P.products_price looks in correct as the alias is p and not P ...

Perhaps a typo and you need this referencing the products table with p vs P ... :smile:

17 Nov 2007, 7:28 AM
#5
alray10 avatar

alray10

New Zenner

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

Re: product filter module addon

Ajeh:

The reference P.products_price looks in correct as the alias is p and not P ...

Perhaps a typo and you need this referencing the products table with p vs P ... :smile:
Thanks for that it sounds like it could be the problem, I have not tried it because it is the images or lack of them I really need to sort out.
Any ideas on that it just gives a page full of no image available boxes.

25 Nov 2007, 8:20 AM
#6
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: product filter module addon

jye999:

I wrote a sidebox module for product filter by attribute, and price range. I looked all over the places and couldn't find something similar, so ending writing my own. It seems to be working, but only tested using zen-cart v1.37. ..........

Thanks! exactly what I was looking for.:clap:
Is there a way to exclude certain attributes?

29 Nov 2007, 5:24 AM
#7
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Re: product filter module addon

I'm having this same problem:

1054 Unknown column 'P.products_price' in 'order clause'
in:
[select DISTINCT p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status FROM zen_products p, zen_products_description pd, zen_products_to_categories p2c, zen_products_attributes pa, zen_products_options po , zen_products_options_values pov WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND pa.options_id = 1 AND pa.options_values_id = 26 AND p.products_id = pa.products_id AND p.products_status =1 AND p.products_quantity > 0 ) order by P.products_price ASC, p.products_date_added DESC, p.products_date_available DESC limit 0, 15]

It seems that you answered it and corrected the problem but I didn't quite understand how to do so.

Exactly what do I do with:
The reference P.products_price looks in correct as the alias is p and not P ...
Perhaps a typo and you need this referencing the products table with p vs P ...

Thanks

4 Dec 2007, 5:12 PM
#8
jomo5280 avatar

jomo5280

New Zenner

Join Date:
Dec 2007
Posts:
3
Plugin Contributions:
0

Re: product filter module addon

:oops:
I got this module installed - but for some reason when i submit i get this response: TEXT_NO_PRODUCTS

What do i have not configured correctly? eeek!

4 Dec 2007, 6:00 PM
#9
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: product filter module addon

People with the P problem:

Open: includes/modules/pages/product_filter_result/header_php.php
Find:

case 2:
            $order_str = " order by P.products_price ASC, p.products_date_added DESC, p.products_date_available DESC ";

Replace by:

            $order_str = " order by p.products_price ASC, p.products_date_added DESC, p.products_date_available DESC ";
24 Dec 2007, 4:58 PM
#10
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Re: product filter module addon

I love this mod, but..

The search results have "No Image Available"!
I also get "TEXT_NO_PRODUCTS", on some searches. Does anyone have any thoughts?
:bangin:
Thanks in advance!

1 Jan 2008, 8:51 PM
#11
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: product filter module addon

I am trying this mod out to..

The problem I am having is that the page just keeps loading and loading..

I only modified the pricing:

<?php /** * product_filter_defines.php * *Zen Cart product filter module *Johnny Ye, Oct 2007 */ define('PRODUCT_FILTER_TEXT_ALL_CATEGORIES','All Categories'); define('PRODUCT_FILTER_TEXT_ALL_PRICE','Price Range'); define('FILENAME_PRODUCT_FILTER_RESULT', 'product_filter_result'); define('BOX_HEADING_FILTER', 'My Filter'); define('HEADING_TITLE','Products'); define('PRODUCT_FILTER_BUTTON_NAME', 'Go'); define('MIN_PRICE','0'); define('MAX_PRICE','1000000'); define('PRANGE1_WORD','Below $50'); define('PRANGE1_MIN',MIN_PRICE); define('PRANGE1_MAX',49.99); define('PRANGE2_WORD','$50 -- $200'); define('PRANGE2_MIN',50.00); define('PRANGE2_MAX',199.99); define('PRANGE3_WORD','$200 -- $300'); define('PRANGE3_MIN',200.00); define('PRANGE3_MAX',299.99); define('PRANGE4_WORD','$300 -- $400'); define('PRANGE4_MIN',300.00); define('PRANGE4_MAX',399.99); define('PRANGE5_WORD','Above $400'); define('PRANGE5_MIN',400.00); define('PRANGE5_MAX',MAX_PRICE); define('SHOW_CATEGORIES',true); define('SHOW_ATTRIBUTES',false); define('SHOW_PRICE_RANGE',true); define('SHOW_AVAILABLE',false); define('SHOW_SORT',true); ?>
1 Jan 2008, 9:47 PM
#12
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: product filter module addon

set > define('SHOW_AVAILABLE',false); to true and got same results.... Just times out.

4 Jan 2008, 2:09 PM
#13
barricades avatar

barricades

Inactive

Join Date:
May 2007
Posts:
150
Plugin Contributions:
0

Re: product filter module addon

I've downloaded this mod hoping it is what I'm looking for. However, the version I've downloaded (from the downloads link) doesn't have a read me file - altho the first post on this thread advises reading it.

Basically I want to have price ranges as categories in my categories sidebox. Obviously I could just create price ranges as categories manually tho I'm hoping this mod might provide the answer.

I have read somewhere that this automation might be difficult due to the way the SQL works (or something like that)

Is anyone able to advise on this issue

Many thanks in advance

I love my new Zencart! Only been running for a couple of months and still ironing out things but X-Mas was great

Cheers

11 Jan 2008, 6:39 PM
#14
manage_it avatar

manage_it

Inactive

Join Date:
May 2006
Posts:
80
Plugin Contributions:
0

Re: product filter module addon

I have installed the module on 2 different sites but it is showing NO IMAGE.
What is the problem?
Please check the following site: careltje.managing-it.nl and choose the category Claessens and then girls basic. choose a size and the press find. It shows the no_picture.gif.

PLEASE HELP, need to go LIVE this weeked.

Thanx,

Bram

9 Mar 2008, 3:58 PM
#15
georand99 avatar

georand99

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: product filter module addon

manage-it:

I have installed the module on 2 different sites but it is showing NO IMAGE.
What is the problem?
Please check the following site: careltje.managing-it.nl and choose the category Claessens and then girls basic. choose a size and the press find. It shows the no_picture.gif.

PLEASE HELP, need to go LIVE this weeked.

Thanx,

Bram

hello,
I have visited your site and I have seen that you have resolved that problem, please can you explain how?

Thanks

10 Mar 2008, 9:11 PM
#16
georand99 avatar

georand99

New Zenner

Join Date:
May 2007
Posts:
4
Plugin Contributions:
0

Re: product filter module addon

Hello,

does anybody knows anything about this contribution?

Please, I want to use it as a product filter.

Thanks.:shocking:

18 Mar 2008, 8:39 PM
#17
avansant avatar

avansant

Zen Follower

Join Date:
Aug 2004
Posts:
122
Plugin Contributions:
0

Re: product filter module addon

I'm in the same boat.. great mod in theory but

  1. No pictures show when you do a search
  2. I'd like to state which options to show and which ones not to.

I could have my programmer fix it more than likely but I hate to spend all the $$ if someone has a fix already! Maybe we should pass a hat... :)

A

22 Mar 2008, 8:19 PM
#18
aga avatar

aga

New Zenner

Join Date:
Mar 2008
Posts:
2
Plugin Contributions:
0

Re: product filter module addon

installed it but it doesn't seem to work:( when selecting 1 atribute+category or price it works but if i select more atributes it doesn't return any products... even though it should.
also the options aren't sorted by the option name/value sorter preferences, not even by their ids

26 Sep 2008, 12:13 PM
#19
spen avatar

spen

New Zenner

Join Date:
Jul 2008
Posts:
12
Plugin Contributions:
0

Re: product filter module addon

Hello there

I really need to get this sorted asap so any help would be greatly appreciated.

I downloaded the latest version of this module but I cannot get it to work.
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=760 (product_filter_by_attribute_and_price_range_0-6)

I copied all the files into the related folders.

But when I search by price I get this message.” TEXT_NO_PRODUCTS”, even though products should display.

There was no read me file in my download so can somebody send me the read me file as I am not sure if there is some configuration to be completed etc.

Cheers

Spen

7 Oct 2008, 6:22 PM
#20
teaj avatar

teaj

New Zenner

Join Date:
Dec 2007
Location:
South, UK
Posts:
66
Plugin Contributions:
0

Re: product filter module addon

Hello, this is a very useful module and I'm glad I managed to get images to show up in the results.

Add p.products_image to the following line in your includes/modules/pages/product_filter_result/header_php.php file -

Change line 132

from -

$listing_sql .= "p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status ";

to -

$listing_sql .= "p.products_id, pd.products_name, [B]p.products_image[/B], p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status ";

Worked for me :smile: