Forums / Addon Sideboxes / Dynamic Filter [Support Thread]

Dynamic Filter [Support Thread]

Views: 653,483

Results 41 to 60 of 809
3 May 2012, 7:53 AM
#41
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Dynamic Filter [Support Thread]

That seems to suggest it's probably a different mod that is causing the problem.
Is there any chance you can test on a clean installation or is it possible to switch off any other mods you have installed?

3 May 2012, 7:02 PM
#42
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

damiantaylor:

That seems to suggest it's probably a different mod that is causing the problem.
Is there any chance you can test on a clean installation or is it possible to switch off any other mods you have installed?

Switched off a few mods that can be turned on/off. Went through my different mods to see if they overwrote the same files in this mod. Didn't see that. I can't test on a clean installation. If I can give you access to my store via FTP, could you take a look and see if you see anything? Would that help? Thanks

4 May 2012, 6:51 AM
#44
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

Sure, it's back on now.

4 May 2012, 9:39 AM
#45
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I was hoping it was going to be a styling issue but for some reason it is generating nothing. The code below is what your website is generating (right click your browser window and select View Page Source to see for yourself). Your products should appear between the <table width="auto" border="0" cellpadding="1" cellspacing="1"> and </table> tags

<div id="productListing">

<div id="productsListingTopNumber" class="navSplitPagesResult back">Displaying <strong>1</strong> to <strong>2</strong> (of <strong>2</strong> products)</div>
<div id="productsListingListingTopLinks" class="navSplitPagesLinks forward">  </div>

<br class="clearBoth" />

  <div class="centerBoxWrapperContents">
<table width="auto"  border="0"  cellpadding="1" cellspacing="1">

</table>
 </div>
<div id="productsListingBottomNumber" class="navSplitPagesResult back">Displaying <strong>1</strong> to <strong>2</strong> (of <strong>2</strong> products)</div>

<div  id="productsListingListingBottomLinks" class="navSplitPagesLinks forward">  </div>
<br class="clearBoth" />

</div>

If you filter on something that genuinely doesn't exist such as this where I've just swapped the 80x32 for 32x80.....

http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=32x80

You correctly get the message 'There are no products to list in this category.'

To me, it looks like the filter is working, especially after you'd confirmed the generated SQL does return the 2 expected products. You could try looking at the file that generates the product listing table to see why it isn't generating any products inside the table. Working backwards from there should eventually lead you to the cause of the problem.
If you can work out the cause, hopefully we can find a solution.

Sorry I can't be more help!

5 May 2012, 3:19 AM
#46
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

Hey Damian
I used a program, Beyond Compare and I compared the code using Jeans/50x32 filter and Jeans 80x32 to see any differences (the 50x32 filter seems to work fine). There were a couple differences in the code. Does it make any sense to you? I use Opera and use their Dragonfly extension (like Firebug for Firefox) and copied the code for each screen and then ran it through Beyond Compare. Hmmmm....this one is a stumper:blink:

<a class="disabled">Falcon Bay Sportswear</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltBrand[]=3">Grand River Jean Co.</a>
<a class="disabled">$33 -- $43</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltPrice[]=43.01--53">$43 and over</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=80x32&fltColor[]=Black">Black</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltBrand[]=4">Falcon Bay Sportswear</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltBrand[]=3">Grand River Jean Co.</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltPrice[]=32.5--43">$33 -- $43</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltPrice[]=43.01--53">$43 and over</a>
<a class="enabled" rel="nofollow" href="http://www.bigandtallwarehouse.com/Jeans?fltSizes[]=50x32&fltColor[]=Black">Black</a>
6 May 2012, 12:58 PM
#47
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I think you'll have to debug file includes/modules/product_listing.php as that's the file that fills array '$list_box_contents' with your product listing.

See if you can track down the reason that file isn't generating any products for you.
For example, see if '$listing_split->number_of_rows' is greater than zero (it's around line 73).

If $listing_Split is empty, that points to the splitPageResults class.

6 May 2012, 10:48 PM
#48
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

damiantaylor:

I think you'll have to debug file includes/modules/product_listing.php as that's the file that fills array '$list_box_contents' with your product listing.

See if you can track down the reason that file isn't generating any products for you.
For example, see if '$listing_split->number_of_rows' is greater than zero (it's around line 73).

If $listing_Split is empty, that points to the splitPageResults class.

This is what it's showing. I'm not well versed in PHP at all, so I don't have any idea where to start looking. I do appreciate all your help you've given me trying to get this problem fixed. Thank you

if ($listing_split->number_of_rows > 0) {
  $rows = 0;
  $listing = $db->Execute($listing_split->sql_query);
  $extra_row = 0;
  while (!$listing->EOF) {
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
      $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
    } else {
      $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
    }

    $cur_row = sizeof($list_box_contents) - 1;
7 May 2012, 1:43 PM
#49
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

We need to see if the number of rows returned by $listing_split is greater than zero (my guess is it isn't) so try adding this 'die' line....

die('I see ' . $listing_split->number_of_rows);
if ($listing_split->number_of_rows > 0) {
  $rows = 0;
  $listing = $db->Execute($listing_split->sql_query);
  $extra_row = 0;
  while (!$listing->EOF) {
    $rows++;

    if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
      $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
    } else {
      $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
    }

...then go directly to this link....

http://www.bigandtallwarehouse.com/Jeans?sort=0&fltSizes[]=80x32

If you see 'I see 0' then $listing_split is zero which is why you're getting no products listed.
We'd then need to look at file 'includes/classes/split_page_results.php' to see why $listing_split has returned no rows.
Did you upload the 'split_page_results.php' file supplied in the distribution or did you add the changes manually?

I'll not be around now for just over a week so good luck getting this working. If you're still struggling we'll try again when I'm back

9 May 2012, 7:25 PM
#50
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi,

Installed this filter and it's now working great! Thanks..

There's just one thought, though - is it possible to have after the filters the number of products per that filter, in brackets?

e.g.
Price
£0-£2 (10) --< there are ten products in that price bracket
£2.01-£5 (15)

Country
India (147) --< 147 products originate from India
South Africa (56)

Apart from that - thanks for a great mod.

Cheers,

Gavin

14 May 2012, 1:35 AM
#51
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

damiantaylor:

We need to see if the number of rows returned by $listing_split is greater than zero (my guess is it isn't) so try adding this 'die' line....

die('I see ' . $listing_split->number_of_rows);
if ($listing_split->number_of_rows > 0) {
$rows = 0;
$listing = $db->Execute($listing_split->sql_query);
$extra_row = 0;
while (!$listing->EOF) {
$rows++;

if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) {
  $list_box_contents[$rows] = array('params' => 'class="productListing-even"');
} else {
  $list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}
> 
> If you see 'I see 0' then $listing_split is zero which is why you're getting no products listed.
> We'd then need to look at file 'includes/classes/split_page_results.php' to see why $listing_split has returned no rows.
> Did you upload the 'split_page_results.php' file supplied in the distribution or did you add the changes manually?

Nope, that didn't display 'I see 0' so I think that's not where the problem is (split_page_results.php) So strange it will filter properly some values, while others it will partial (like 6 out of 7 items filtered) or some none at all. I'm so stumped on this. I uploaded the 'split_page_results.php' file in the supplied distribution. Thanks again Damian for your help getting this working for me. I really do appreciate it.
16 May 2012, 6:51 PM
#52
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Filter [Support Thread]

I'm having the same issue as jimproz.

I played around with the attributes on the products that were showing nothing when I tried to filter them on the advanced search page and it seems like if the product has more than one attribute that needs to be selected to add it to the cart, it won't filter properly.

If you go to burningbutterfly.com and search for milk, there are 7 product results. If you select "Unscented/Fragrance Free" on the Dynamic Filter, it will filter properly as those products have no selectable attributes (only read-only). But if you try to filter by "Scented", "Essential Oil/Aromatherapy", or by either of the Product Type options, you get either a blank page or are sent to the "There are no items that match your search criteria" page.

I removed one of the selectable attribute groups from a product that can be filtered by "Scented" so that it only had one group of selectable attributes and the filter worked for that product but when I added the second attribute group back in, it didn't work anymore.

I hope that makes sense - I've been working on this for a while and am starting to get cross-eyed.

Thanks for your help!

20 May 2012, 3:45 PM
#53
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi,

It seems to me that the current filtering works within one attribute as an OR filter; eg. for an ETHICS filter it may search for a product that is Fairly Traded OR Organic OR Vegan. It would be very useful to have the option to search for products that are Fairly Traded AND Organic AND Vegan instead.

I see some cases where an OR is the only way to filter, like for instance Sizing (Child OR Adult), or Pricing (one price band OR another), but in my cases I'd really like to search for products which have one or more attribute option values.

There is another attribute I use; Music Style. Here, a product could have the attribute values Indian AND Dance, for instance - or Children AND World AND Christmas.

Is this possible?

Regards,
Gavin

20 May 2012, 5:10 PM
#54
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I recently discovered this mod, I think it helps take Zencart up to Magento level.

Don't yet have it live anywhere and it's not on a current test site of mine. But do not all attributes show in the filter? That is, everything you mention, will they not appear?

Anyway, since I also recently discovered (after 6 years with zencart) that we can make Read Only attributes, this filter has great potential for us, as we can filter by dress type (long, short, halter, ballgown etc.) without them being selectable attributes.

sph
prommart com

zencart 1.5 testing site:
http://www.prom-mart.com/demo-2/

Steve
prommart.com

20 May 2012, 7:40 PM
#55
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I agree, it's a great mod - but I don't think I've explained myself clearly enough.

Let's say I have an attribute 'ETHICS', with attribute values FAIRTRADE Mark, Organic, Vegan, Vegetarian, Eco-Friendly. Let's then say I select 'FAIRTRADE Mark' AND 'Vegan'. When the filter is run, this will return products that have the value 'FAIRTRADE Mark' AND the products that have the value 'Vegan'. So far so good - however, what I actually want is for the filter to return ONLY the products which have BOTH the values 'FAIRTRADE Mark' AND 'Vegan'; true AND logic.

Put more simply; the filter returns any product which satisfies condition 'A' OR condition 'B'. It does not return the products which satisfy conditions 'A' AND 'B'.

So - the question remains - I assume the answer is yes - is there any way to have the filter function as an AND filter, rather than an OR? I'm afraid my SQL is pretty much less than basic, so can't figure it out for myself, sorry.

21 May 2012, 7:05 AM
#56
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I tested this filter on a test demo site just enough to see it's potential, then deleted my test site when it blew-up for other reasons. Haven't yet gotten back to this filter on my new demo test sites.

I am not yet familiar enough with this filter to know.

sph
prommart com

Steve
prommart.com

21 May 2012, 7:32 AM
#57
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

No worries SPH - just hoping Damian can help me out when he gets back from wherever he's been :-) BTW, I've got a problem with the left cols misaligning as well - even copying the code over hasn't helped for me...

Gavin

22 May 2012, 4:31 PM
#58
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Gavin,
Off the top of my head, if you look in the new files folder includes/modules/YOUR_TEMPLATE/dynamic_filter.php you'll see where the ORs are generated. Change these to ANDs and you should be good to go.
This will mean all the filters all be ANDed together though, no way to say you want some ANDing and others ORing I'm afraid

22 May 2012, 5:09 PM
#59
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi Damian - Ha! Why didn't I think of that? A search for 'OR'. OK, I'll take a look at that when I have a few mins - busy re-coding something else at the moment. Pretty addictive, this Zen Cart-ery. Great feeling when I get something right and things move about the way I'd like them :-)

I realise it's going to be either 'AND' or 'OR', unless a fancy switch was put in with another bit of code to display (maybe for the future...), but in my case, 'AND' is what is most useful for my purposes. I'll let you know how I get on.

Thanks for your help,

Gavin

22 May 2012, 10:30 PM
#60
gavwright avatar

gavwright

New Zenner

Join Date:
Jul 2010
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi Damian,

That works great - now I can look for foods that are Fairtrade AND Organic AND Vegan (or whatever). For some reason, I didn't actually have that file locally - only on my server - which is how I missed it. Must. Remember. Keep. Files. Synced!

Thanks a lot for your help. (BTW, is there a semi-simple way to have number of items per attribute in brackets after the attribute in the filter listing, as per my other thread? Just asking....).

Cheers,

Gavin