Zen Cart Logo
Forums / Addon Sideboxes / Dynamic Filter [Support Thread]

Dynamic Filter [Support Thread]

Views: 652,517

Results 301 to 320 of 809
26 May 2013, 17:34
#301
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Dynamic Filter [Support Thread]

Kevin205:

Same here.

I tried escaping the " and or '. No luck.

The only thing that does **not ** produce an error, is the following format:

But try to tell a shop owner to look at the following and do your additions, deletions, edits and audits and etc.

How is that for head spin?

I am trying to figure out a way also.

Thanks.

ps. Spaces between & and # are left out, so it displays here.

Here's a quick solution,

find in includes/modules/YUOR_TEMPLATE/dynamic_filter.php

          $having .= ' FIND_IN_SET("' . $key . $value . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';

replace with:

          $value = preg_replace('/"/','\\"',$value);
          $value = preg_replace('/&acute/','\\&acute',$value);
          $having .= ' FIND_IN_SET("' . $key . $value . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';

more values can be added if needed :smile:

26 May 2013, 18:21
#302
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I will test your solution in my environment.

And this is what I came up with. It seems to be working for all attributes.
before

          }
          $having .= ' FIND_IN_SET("' . $key . $value . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
		  $filter_attr = true;
		  $prvHaving = $key;
        }
      }
	}
  }
  if($filter != '') $filter .= ')';

After

          }
$var1 = addslashes($value);
          $having .= ' FIND_IN_SET("' . $key . $var1 . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
		  $filter_attr = true;
		  $prvHaving = $key;
        }
      }
	}
  }
  if($filter != '') $filter .= ')';

What do you think?

I don't know whether it will have issues later on!

26 May 2013, 18:31
#303
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

Very nice !

but it can be written as:

          $having .= ' FIND_IN_SET("' . $key . addslashes($value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
26 May 2013, 18:32
#304
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Which one would you use, yours solution or mine?

I really appreciate your help on this.

26 May 2013, 18:37
#305
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

Kevin205:

Which one would you use, yours solution or mine?

I really appreciate your help on this.

Yours, with my improvement :laugh: (see previous post)

26 May 2013, 18:43
#306
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

Yours, with my improvement :laugh: (see previous post)
Of course.

I tested yours also, and it works perfectly as well.

Thank you. :smile:

28 May 2013, 00:03
#307
ekles avatar

ekles

New Zenner

Join Date:
Aug 2005
Posts:
73
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Over the last few days we have tried to get the Dynamic Filter to work on a vanilla 1.5.1 install to no avail.

First of all I have zipped up the Dynamic Filter files that need alteration (in fact all the Dynamic Filter Files) just so if someone has time they can see if we have screwed up somewhere. It is available here at http://www.hpgc.com.au/zen/dynamic_filter_problem.zip

I have also attached the same files to this post. A read me doc explains everything here again.

++++ Server/System Information ++++

ZenCart = Vanilla installation of 1.5.1 downloaded in the last 5 days
PHP = 5.3.17
MySQL = 5.1.68-cll
PHP Configure Command =
'./configure' '--disable-fileinfo' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-safe-mode' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'

++++ The Problem Outlined ++++

In terms of appearance Dynamic Filter appears on the screen correctly. That is all the settings within Admin function and so does the sidebox at least most of the time but I'll get to that.

We use read only attributes to control product attribute settings for the filter. In admin we have enabled under Dynamic Filter the attribute ID's we wish to use and disabled all the other attributes. Dynamic Filter appears to read these attributes at first.

Example of things that happen.

  1. Select "Specials" and all the specials appear. Select from Dynamic Filter options "Colour" a colour and you get a result of say 5 items. Just by hitting refresh you can get a different result of say 7 next time.

If you then select an option from "size" as well to further refine the results 1 of 5 things can happen
1. It reduces the available number as expected.
2. It will have a higher count so instead of 5 meeting the colour requirement we now have 7 meeting both colour and size requirements.
3. Blank screen
4. Correct or incorrect listing of a number of items that supposedly meet the criteria and now the Dynamic Filter box has disappeared entirely stopping any further requirement.
5. Several items supposedly matching the criteria but ALL side boxes, banners etc are gone and the CSS screws up in things like site background colour.

  1. Select "All Products" and it does the same as for "Specials" but generally will only allow the first selection and then goes blank if you make a second criteria choice.

There are other things but this is enough to show the erratic behaviour/results.

All these things happen wether you are using multi or single select criteria methods.

We have tried checkboxes and links.

We have also made appointments at Ashley and Martin (The hair replacement specialists) over this.

Any ideas?

Thanks in advance.

28 May 2013, 06:13
#308
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

ekles:

Over the last few days we have tried to get the Dynamic Filter to work on a vanilla 1.5.1 install to no avail.

First of all I have zipped up the Dynamic Filter files that need alteration (in fact all the Dynamic Filter Files) just so if someone has time they can see if we have screwed up somewhere. It is available here at http://www.hpgc.com.au/zen/dynamic_filter_problem.zip

I have also attached the same files to this post. A read me doc explains everything here again.

++++ Server/System Information ++++

ZenCart = Vanilla installation of 1.5.1 downloaded in the last 5 days
PHP = 5.3.17
MySQL = 5.1.68-cll
PHP Configure Command =
'./configure' '--disable-fileinfo' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-safe-mode' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'

++++ The Problem Outlined ++++

In terms of appearance Dynamic Filter appears on the screen correctly. That is all the settings within Admin function and so does the sidebox at least most of the time but I'll get to that.

We use read only attributes to control product attribute settings for the filter. In admin we have enabled under Dynamic Filter the attribute ID's we wish to use and disabled all the other attributes. Dynamic Filter appears to read these attributes at first.

Example of things that happen.

  1. Select "Specials" and all the specials appear. Select from Dynamic Filter options "Colour" a colour and you get a result of say 5 items. Just by hitting refresh you can get a different result of say 7 next time.

If you then select an option from "size" as well to further refine the results 1 of 5 things can happen
1. It reduces the available number as expected.
2. It will have a higher count so instead of 5 meeting the colour requirement we now have 7 meeting both colour and size requirements.
3. Blank screen
4. Correct or incorrect listing of a number of items that supposedly meet the criteria and now the Dynamic Filter box has disappeared entirely stopping any further requirement.
5. Several items supposedly matching the criteria but ALL side boxes, banners etc are gone and the CSS screws up in things like site background colour.

  1. Select "All Products" and it does the same as for "Specials" but generally will only allow the first selection and then goes blank if you make a second criteria choice.

There are other things but this is enough to show the erratic behaviour/results.

All these things happen wether you are using multi or single select criteria methods.

We have tried checkboxes and links.

We have also made appointments at Ashley and Martin (The hair replacement specialists) over this.

Any ideas?

Thanks in advance.

Not sure what you are tryng to tell, but in your zip-file you have not merged the spilt_page _result.php, and the functions_general.php, so obiuosly the filter will not work.

28 May 2013, 07:14
#309
ekles avatar

ekles

New Zenner

Join Date:
Aug 2005
Posts:
73
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

Not sure what you are tryng to tell, but in your zip-file you have not merged the spilt_page _result.php, and the functions_general.php, so obiuosly the filter will not work.

Actually spilt_page _result.php has been merged, just the person who did it did not add the BOF and EOF tags in.
The functions_general.php has been merged as well using , I just forgot to say in the post that we used DrBytes change to the file rather than the original alteration with the add-in. Using DT's original does no better.

Having said that what am I trying to say?

Even If you get results they are not accurate and float in terms of the result.

05 Jun 2013, 13:41
#310
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi Damian

This looks like a cool add-on and just what I'm looking for. Is the latest version of this plugin compatible with Version 1.5.1?

05 Jun 2013, 14:22
#311
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

dharrison:

Hi Damian

This looks like a cool add-on and just what I'm looking for. Is the latest version of this plugin compatible with Version 1.5.1?

You can use the one found in the download section, but it needs some careful merging on some files.

-or-

You can use this updated version, which I am currently building on github
This contains all the bug fixes mentioned in this thread. the documentation is not updated yet

13 Jun 2013, 06:40
#312
jimproz avatar

jimproz

New Zenner

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

Re: Dynamic Filter [Support Thread]

Design75:

You can use the one found in the download section, but it needs some careful merging on some files.

-or-

You can use this updated version, which I am currently building on github
This contains all the bug fixes mentioned in this thread. the documentation is not updated yet

Hey Design! Does your version for 1.5.0 have the bugs worked out of it? I have the strangest problem with this filter on my store I'm building. If I put in a size of jean it will show like for example "Showing 2 of 2 found" but there won't be any items displayed, even though they look like the database is parsing it correctly. It works on some sizes but not others. It's a big and tall men's store I'm building so there are a lot of sizes. I was wondering if your version might have this problem fixed and if so, how do I download the entire folder with the files instead of each file separately? I can't seem to figure out how to download the files without opening them up, highlighting them and then copying them to the current files in the filter folder. Thanks for your help :).

13 Jun 2013, 07:13
#313
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

jimproz:

Hey Design! Does your version for 1.5.0 have the bugs worked out of it? I have the strangest problem with this filter on my store I'm building. If I put in a size of jean it will show like for example "Showing 2 of 2 found" but there won't be any items displayed, even though they look like the database is parsing it correctly. It works on some sizes but not others. It's a big and tall men's store I'm building so there are a lot of sizes. I was wondering if your version might have this problem fixed and if so, how do I download the entire folder with the files instead of each file separately? I can't seem to figure out how to download the files without opening them up, highlighting them and then copying them to the current files in the filter folder. Thanks for your help :).

He Jimproz,

The new version contain all the fixes I could find in this thread, but it is of course very possible there are more :)
I will PM you a link to the zip file created by github.
Do you have any debug files related to your problem?

18 Jun 2013, 13:47
#314
dannyvarley avatar

dannyvarley

Zen Follower

Join Date:
Dec 2011
Posts:
287
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi Design,

I sent you a pm earlier :), I have been looking into this mod for a while now to simply to help filter by a read only attribute and I have a couple of ideas that you may like or that could be implemented (If you have the time)

  1. Ability to turn on/off product price sorter in config
  2. Ability to turn on/off Amount of products in certain filter (e.g the brackets ())
  3. I dont want to always have to click the (clear filter button) as you see here you dont have to: http://www.snowrepublic.co.uk/Body-Armour
    it just refreshes with the filter added on when one is clicked and then you can clear the filter at the bottom. Currently You have to clear every time you want to select something else.

I hope you understand what i'm getting at :P I have already done the first two just by commenting out some code but the third seems a little tricky for me. I hope someone can help!

Danny

08 Jul 2013, 07:31
#315
okkwebmedia avatar

okkwebmedia

New Zenner

Join Date:
Jul 2013
Location:
Cluj, Romania
Posts:
11
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi,

how could I add the dynamic filter to all pages on my shop, including the home page?

At the moment it's visible only on the following pages: All Product, Specials, New product, Featured product.

Zc version: 1.5.0
Dynamic filter version: 1.1 (http://www.zen-cart.com/downloads.php?do=file&id=1361)

Thanks!

09 Jul 2013, 08:41
#316
asdfwen avatar

asdfwen

New Zenner

Join Date:
May 2012
Posts:
30
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

does it work in zen cart 1.5.1? Thanks for your reply.

09 Jul 2013, 09:59
#317
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

asdfwen:

does it work in zen cart 1.5.1? Thanks for your reply.

It does, but you wil need to do some careful merging. I am working on an updated version, but lack the time to update the documentation right now.
The pre-release can be found here at Github

09 Jul 2013, 10:00
#318
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Dynamic Filter [Support Thread]

Okkwebmedia:

Hi,

how could I add the dynamic filter to all pages on my shop, including the home page?

At the moment it's visible only on the following pages: All Product, Specials, New product, Featured product.

Zc version: 1.5.0
Dynamic filter version: 1.1 (http://www.zen-cart.com/downloads.php?do=file&id=1361)

Thanks!

It should also show at your product listings.
What other pages would you want? you need product information to show the filter, otherwise what are you filtering?

09 Jul 2013, 19:02
#319
okkwebmedia avatar

okkwebmedia

New Zenner

Join Date:
Jul 2013
Location:
Cluj, Romania
Posts:
11
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

The problem is that I'm not able to make it visible the dinamic filter on the main paige (index).
The most important would be to work on index like on the products pages (All pages, Specials and Featured Products).
It has to filter the attributes of products (size, speed, pressure etc.)
The shop will sell tires.

Thanks!

17 Jul 2013, 09:54
#320
dharrison avatar

dharrison

Zen Follower

Join Date:
Mar 2009
Location:
Essex, UK
Posts:
448
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi

Going through this, the whole site falls over with the core overrides in functions_general.php

I am doing this on a fresh install and there is no mention of

  if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) )
          {
// die ('here');
            $get_url .= $key . '/' . rawurlencode(stripslashes($value)) . '/';
          }
          else
          {

In the changes between the end of section 1 and beginning of section 2

Log file displays the following:

[17-Jul-2013 09:23:52 UTC] PHP Fatal error:  Cannot redeclare zen_create_random_value() (previously declared in ...........\includes\functions\functions_general.php:626) in ...........\includes\functions\password_funcs.php on line 86

Realistically you have to copy from the bof 1 of 3 section until just before

////
// Wrapper function for round()

I hope this helps. I personally am still trying it.