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

Dynamic Filter [Support Thread]

Views: 652,516

Results 221 to 240 of 809
26 Feb 2013, 14:59
#221
kevin205 avatar

kevin205

Totally Zenned

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

Dynamic Filter [Support Thread]

philip937:

There would be no point having filter by category when you are already viewing a category. Similarly on manufacters pages category filter shows but manufacters filter does not.

I think there is a point to it.
Let say you have a top category T-Shirts and you have 20 different brand of T-Shirts as sub-categories. With one of the T-shirt styles being V-Neck.

If you click on the top category T-Shirts, you will get 20 sub-category (brands) below the T-Shirts, under the categories window (in the left Cat window). As it is now.

So how would you filter, if you are looking for v-neck T-shirts among T-shirts->and 20 manufacturer?

Unless I am missing something or doing something wrong, top categories should be filterable also.

Again the filter is being utilized in

index.php?main_page=products_all 
```and ```php
index.php?main_page=products_new
```I don't understand why it can't be invoked in the top categories?
26 Feb 2013, 15:07
#222
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Unless I'm missing something it's sounds like you want it to filter the subcategories. It will only filter products.

Post a link to the site and ill take a look see if I can understand what you mean

26 Feb 2013, 15:22
#223
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

I can't it is being tested on a local server.

26 Feb 2013, 15:36
#224
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Screenshot??

26 Feb 2013, 16:05
#225
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

Here you go.

Attachment 12001

26 Feb 2013, 16:28
#226
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

so you have both brand/manufacturer Arrow AND a category called Arrow??

so when you are at category level you see the sub cat arrow, and there are no products so therefore nothing to filter.

if what you are saying is that you want a filter to be able to filter categories that contain products with Vnecks then thats some serios additional coding and way above my abilty.

02 Mar 2013, 10:09
#227
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi All,

Ive just done an install of this mod on a clean version of Zencart but something isnt happening. Admin works fine but the fron end just shows a colpeltely blank screen. I have gone through and verified all of the files for the upload. where should i start?

Paul

02 Mar 2013, 10:41
#228
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

Wilkesy:

Hi All,

Ive just done an install of this mod on a clean version of Zencart but something isnt happening. Admin works fine but the fron end just shows a colpeltely blank screen. I have gone through and verified all of the files for the upload. where should i start?

Paul

Are there any errorlogs in the cache / log folder ?
what version of ZC?

02 Mar 2013, 11:02
#229
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Ive just gone through every file deleting to see if it affects the shop and the functions_general.php file is the reason. There is something in here that is causing to shop not to load properly.

Paul

02 Mar 2013, 11:04
#230
wilkesy avatar

wilkesy

Zen Follower

Join Date:
Jul 2004
Location:
stroud, gloucestershire
Posts:
198
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi,

Always forget about the error logs.

The error shows

PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /home/rattanga/public_html/includes/functions/functions_general.php:626) in /home/rattanga/public_html/includes/functions/password_funcs.php on line 86

I am running Zencart 1.5.1

02 Mar 2013, 11:38
#231
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

Wilkesy:

Hi,

Always forget about the error logs.

The error shows

PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /home/rattanga/public_html/includes/functions/functions_general.php:626) in /home/rattanga/public_html/includes/functions/password_funcs.php on line 86

I am running Zencart 1.5.1

there are som differences btween the functions_general.php of 1.5.0 and 1.5.1
use the default functions_genral.php from ZC 1.5.1
Just merge the parts below:

find ```php
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {

if (!is_array($exclude_array)) $exclude_array = array();
$exclude_array = array_merge($exclude_array, array(zen_session_name(), 'main_page', 'error', 'x', 'y'));
$get_url = '';
if (is_array($_GET) && (sizeof($_GET) > 0)) {
  reset($_GET);
  while (list($key, $value) = each($_GET)) {
    if (is_array($value) || in_array($key, $exclude_array)) continue;
    if (strlen($value) > 0) {
      $get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
    }
  }
}

replace by:

```php
  function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {

    if (!is_array($exclude_array)) $exclude_array = array();
    $exclude_array = array_merge($exclude_array, array(zen_session_name(), 'main_page', 'error', 'x', 'y'));
    $get_url = '';
    if (is_array($_GET) && (sizeof($_GET) > 0)) {
      reset($_GET);
      while (list($key, $value) = each($_GET)) {
// bof dynamic filter 1 of 3
        if ( (!in_array($key, $exclude_array)) && (strlen($value) > 0 || is_array($value) && array_filter($value) ) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') ) {
// eof dynamic filter 1 of 3
          if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
//    die ('here');
            $get_url .= $key . '/' . rawurlencode(stripslashes($value)) . '/';
          } else {
// bof dynamic filter 2 of 3
            if (is_array($value)) {
              foreach($value as $arr){
                $get_url .= zen_sanitize_string($key) . '[]=' . rawurlencode(stripslashes($arr)) . '&';
              }
            } else {
// eof dynamic filter 2 of 3
              $get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
// bof dynamic filter 3 of 3
      }
// eof dynamic filter 3 of 3
          }
        }
      }
    }
15 Mar 2013, 21:03
#232
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

Is there a way to control the display of prices in the filter,
instead of
Attachment 12172

to the following,
$25 -- $50
$51 -- $75
$76 -- $100
$100 and over

15 Mar 2013, 21:30
#233
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:

Is there a way to control the display of prices in the filter,
instead of
Attachment 12172

to the following,
$25 -- $50
$51 -- $75
$76 -- $100
$100 and over

Not that I know of. It would be useful :)
Also keep in mind that the price used/shown in the filter is the one without tax/vat.

25 Mar 2013, 12:32
#234
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

Not that I know of. It would be useful :)
Also keep in mind that the price used/shown in the filter is the one without tax/vat.

cant you set the price limits in the admin settings for dynamic filter?

25 Mar 2013, 20:00
#235
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

I don't think you can.

25 Mar 2013, 20:11
#236
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Kevin205:

I don't think you can.

Maximum Number of Price Ranges ??

25 Mar 2013, 20:57
#237
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

philip937:

Maximum Number of Price Ranges ??

Yes you can, but on the front end the box is showing the ranges in prices excluding tax. So you get price ranges that make no sense.

05 Apr 2013, 20:39
#238
flernebunu avatar

flernebunu

New Zenner

Join Date:
Mar 2013
Posts:
32
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi ,
I've just noticed after introducing manufacturers the following error for dynamic filter:
[05-Apr-2013 20:37:49 UTC] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (1,2) ORDER BY' at line 1 :: SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(), 'Y', 'N') as flag FROM manufacturers WHERE manufacturers_id IN (1,2) ORDER BY manufacturers_name in C:\xampp\htdocs\zencart\includes\classes\db\mysql\query_factory.php on line 120

Anyone knows how to fix it?
The code is here:
$manufacturers = $db->Execute("SELECT manufacturers_id, manufacturers_name, IF(manufacturers_id IN(" . implode(',', $filteredManufacturers) . "), 'Y', 'N') as flag" .
" FROM " . TABLE_MANUFACTURERS .
" WHERE manufacturers_id IN (" . implode(',', $unfilteredManufacturers) . ")" .
" ORDER BY manufacturers_name");

09 Apr 2013, 20:30
#239
ikzaghet avatar

ikzaghet

New Zenner

Join Date:
Jan 2013
Location:
Harlingen / The Netherlands
Posts:
8
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

My appologizes for my maybe incorrect English, i hope you will understand me.

I have a problem with the dynamic filter. As i understand, you made this filter.

The search by price option, are prices excluding VAT/TAX.

So with a search from 10 till 20, products above 20 (we have 21% tax). So a product with a price of 24 will be shown in the list 10 till 20.
We have been scripting a while now, but can't figure out how we can get to filter for prices including tax.
Is there a way to solve this problem?

16 Apr 2013, 07:23
#240
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Does anyone know of its possible to get Dynamic filter to take into account sale and special prices when filtering by price? It seems to only filter to the products base price currently??

Thanks