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

Dynamic Filter [Support Thread]

Views: 652,518

Results 341 to 360 of 809
02 Sep 2013, 11:37
#341
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Dynamic Filter [Support Thread]

Solved - All of these niggles were actually symptoms of something fairly simple (as always). The names of my options and values were in a bit of a mess because of the previous Product Filter setup I was using. I've cleaned/tidied/rationalised and all seems to work perfectly.

02 Sep 2013, 20:49
#342
laksh0302 avatar

laksh0302

New Zenner

Join Date:
Aug 2013
Location:
India
Posts:
7
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi there

I have been reading the thread to resolve the PHP Warning: strlen() expects parameter 1 to be string error but to no avail.

I have tried and done each and every thing mentioned in the thread.

I have a zen cart 1.5.1 (upgraded version) and major mods installed are: IH4, Multi cross sell and Dynamic filter. URL: http://artemisia.com/store/

The problem is when I click Add to Cart button, it gives me a blank page with the warning.

Hosting Details:

Server OS: Linux 2.6.18-238.19.1.el5PAE
Database: MySQL 5.0.96-log
PHP Version: 5.3.24 (Zend: 2.3.0)
PHP Memory Limit: 64M
PHP Safe Mode: Off
PHP File Uploads: On
Max Size: 32M
Database Data Size: 7,920 kB

Following is what my functions_general.php file looks like:

// Return all HTTP GET variables, except those passed as a parameter
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {

if (!is_array($exclude_array)) $exclude_array = array();

$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
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);

return $get_url;
}

Please help me out.

Thanks

02 Sep 2013, 21:18
#343
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

laksh0302:

Hi there

I have been reading the thread to resolve the PHP Warning: strlen() expects parameter 1 to be string error but to no avail.

I have tried and done each and every thing mentioned in the thread.

I have a zen cart 1.5.1 (upgraded version) and major mods installed are: IH4, Multi cross sell and Dynamic filter. URL: http://artemisia.com/store/

The problem is when I click Add to Cart button, it gives me a blank page with the warning.

Hosting Details:

Server OS: Linux 2.6.18-238.19.1.el5PAE
Database: MySQL 5.0.96-log
PHP Version: 5.3.24 (Zend: 2.3.0)
PHP Memory Limit: 64M
PHP Safe Mode: Off
PHP File Uploads: On
Max Size: 32M
Database Data Size: 7,920 kB

Following is what my functions_general.php file looks like:

// Return all HTTP GET variables, except those passed as a parameter
function zen_get_all_get_params($exclude_array = '', $search_engine_safe = true) {

if (!is_array($exclude_array)) $exclude_array = array();

$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
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);

return $get_url;
}

> 
> Please help me out.
> 
> 
> Thanks

The code for 1.5.1 should be:```php
// bof dynamic filter 1 of 3
        if ( (!in_array($key, $exclude_array)) && (is_string($value) && 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
          }
        }
      }
    }
    while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
    while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);

    return $get_url;
  }
02 Sep 2013, 21:44
#344
laksh0302 avatar

laksh0302

New Zenner

Join Date:
Aug 2013
Location:
India
Posts:
7
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

The code for 1.5.1 should be:```php
// bof dynamic filter 1 of 3
if ( (!in_array($key, $exclude_array)) && (is_string($value) && 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
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);

return $get_url;

}



Thanks a lotfor the correct code.

I just made changes to my functions_general.php file.
However, the add to cart still shows a blank page with a warning.

I checked the log files and following is what it showed me:

[02-Sep-2013 14:34:50 America/Phoenix] PHP Fatal error:  1146:Table 'artemisiacartdem.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist :: select stock_id from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK where products_id = '47' in /home/content/b/a/r/barbschulman/html/store/includes/classes/db/mysql/query_factory.php on line 120

Please tell me if anything was wrong with the upgrade?
02 Sep 2013, 21:45
#345
laksh0302 avatar

laksh0302

New Zenner

Join Date:
Aug 2013
Location:
India
Posts:
7
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

The code for 1.5.1 should be:```php
// bof dynamic filter 1 of 3
if ( (!in_array($key, $exclude_array)) && (is_string($value) && 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
}
}
}
}
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);

return $get_url;

}



Thanks a lotfor the correct code.

I just made changes to my functions_general.php file.
However, the add to cart still shows a blank page with a warning.

I checked the log files and following is what it showed me:

[02-Sep-2013 14:34:50 America/Phoenix] PHP Fatal error:  1146:Table 'artemisiacartdem.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist :: select stock_id from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK where products_id = '47' in /home/content/b/a/r/barbschulman/html/store/includes/classes/db/mysql/query_factory.php on line 120

Please tell me if anything was wrong with the upgrade?
03 Sep 2013, 07:12
#346
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

laksh0302:

Thanks a lotfor the correct code.

I just made changes to my functions_general.php file.
However, the add to cart still shows a blank page with a warning.

I checked the log files and following is what it showed me:

[02-Sep-2013 14:34:50 America/Phoenix] PHP Fatal error: 1146:Table 'artemisiacartdem.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist :: select stock_id from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK where products_id = '47' in /home/content/b/a/r/barbschulman/html/store/includes/classes/db/mysql/query_factory.php on line 120

Please tell me if anything was wrong with the upgrade?

Apparently you are running products with attribute stock, but do not have the tables installed

03 Sep 2013, 09:47
#347
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi,

Zencart v1.51
Dynamic Filter v1.2
With Multisite v0.4.2

This problem is to do with the display of the product count (next to the option value name) in the dynamic filter sidebox, the issue I believe may be related to the Multisite add-on although I can't be certain.

Category product listing pages - correct number of products listed in the center column, correct product count shown next to option value name

Featured and Advanced Search Results pages (I don't use specials, new or all) - correct number of products listed in the center column, incorrect product count shown next to option value name. The product count shows the total number of all products of all multisite sites that use the option value.

I had thought that there might be a cat_filter missing after the core file merges of the header_php.php files for Featured and Advanced Search Results pages but I have checked, and in any event the products listed in the center column of these pages are displayed correctly according to multisite settings.

It seems strange that the sidebox option values on the Category product listing pages 'count' correctly but those on the search result and featured pages do not.

Anyone have any ideas?

04 Sep 2013, 06:55
#348
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

simon1066:

Hi,

Zencart v1.51
Dynamic Filter v1.2
With Multisite v0.4.2

This problem is to do with the display of the product count (next to the option value name) in the dynamic filter sidebox, the issue I believe may be related to the Multisite add-on although I can't be certain.

Category product listing pages - correct number of products listed in the center column, correct product count shown next to option value name

Featured and Advanced Search Results pages (I don't use specials, new or all) - correct number of products listed in the center column, incorrect product count shown next to option value name. The product count shows the total number of all products of all multisite sites that use the option value.

I had thought that there might be a cat_filter missing after the core file merges of the header_php.php files for Featured and Advanced Search Results pages but I have checked, and in any event the products listed in the center column of these pages are displayed correctly according to multisite settings.

It seems strange that the sidebox option values on the Category product listing pages 'count' correctly but those on the search result and featured pages do not.

Anyone have any ideas?

This is the code I use for Dynamic fiter in combination with Multishop

file: includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_filter.php

<?php
/*
 * tpl_dynamic_filter.php
 *
 *Zen Cart dynamic filter module
 *Damian Taylor, March 2010
 *
 */

  //if (defined('CEON_URI_MAPPING_ENABLED') && CEON_URI_MAPPING_ENABLED == 1) $pageName = preg_replace('{^.*/([^\?]+)\??.*$}', '$1', $_SERVER['REQUEST_URI']);
  $pageName = substr(strrchr($breadcrumb->trail('/'), "/"), 1);
  if (empty($currency_type))
  {
    $currency_type = $_SESSION['currency'];
  }
  $currency_symbol = $currencies->currencies[$currency_type]['symbol_left'];
  $conversion_rate = $currencies->get_value($_SESSION['currency']);
  $resetParms = array();
  $display_limit = zen_get_new_date_range();
  if (FILTER_GOOGLE_TRACKING == 'Asynchronous')
  {
    $trackingStart = '_gaq.push([\'_trackEvent\', ';
    $trackingEnd = ']);';
  }
  else if (FILTER_GOOGLE_TRACKING == 'ga.js')
  {
    $trackingStart = 'pageTracker._trackEvent(';
    $trackingEnd = ');';
  }

// draw filter form
  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
  $content .= zen_draw_form('product_filter_form','', 'get');

// draw hidden fields
  reset($_GET);
  while(list($key, $value) = each ($_GET))
  {
    if ( ($key != 'main_page' || $key == 'main_page' && (!defined('CEON_URI_MAPPING_ENABLED') || CEON_URI_MAPPING_ENABLED == 0 || $current_page_base == 'advanced_search_result')) && ($key != zen_session_name()) && ($key != 'error') && ($key != 'currency') && ($key != 'x') && ($key != 'y') && ($key != 'filter_id') )
    {
      if ((substr($key,0,strlen(DYNAMIC_FILTER_PREFIX)) != DYNAMIC_FILTER_PREFIX) )
      {
        $content .= zen_draw_hidden_field($key, $value);
      }
    }
  }

// use $listing_sql to populate dynamic filter
  $query_lower = strtolower($listing_sql);
  $pos_from = strpos($query_lower, ' from', 0);
  $pos_where = strpos($query_lower, ' where', 0);
  $pos_group = strpos($query_lower, ' group by', 0);
  $pos_to = strlen($query_lower);
  if ($pos_group == 0)
  {
    $pos_group = $pos_to;
  }

// list filtered and unfiltered products for category
  $unfiltered_sql = str_replace(array($filter, $having), array("",""), "SELECT p.products_id, p.products_price_sorter, p.master_categories_id, p.manufacturers_id" . substr($listing_sql, $pos_from, ($pos_where - $pos_from)) . substr($listing_sql, $pos_where, ($pos_group - $pos_where)));
// bof Multi site
  $unfiltered = $db->Execute(cat_filter($unfiltered_sql));
// eof Multi site

  $filtered_sql = "SELECT p.products_id, p.products_price_sorter, p.master_categories_id, p.manufacturers_id" . substr($listing_sql, $pos_from, ($pos_where - $pos_from)) . substr($listing_sql, $pos_where, ($pos_to - $pos_where));

// bof Multi site
  $filtered = $db->Execute(cat_filter($filtered_sql));
// eof Multi site
  if ($filtered->RecordCount() == 0)
  {
    $filtered_sql = str_replace(array($filter, $having), array("",""), "SELECT p.products_id, p.products_price_sorter, p.master_categories_id, p.manufacturers_id" . substr($listing_sql, $pos_from, ($pos_where - $pos_from)) . substr($listing_sql, $pos_where, ($pos_group - $pos_where)));
// bof Multi site
    $filtered = $db->Execute(cat_filter($filtered_sql));
// eof Multi site
  }

// retrieve filtered and unfiltered product options
  $min = 0;
  $max = 0;
  while (!$unfiltered->EOF)
  {
    if ($min == 0 or round($unfiltered->fields['products_price_sorter'], 2) < $min)
    {
      $min = round($unfiltered->fields['products_price_sorter'], 2);
    }
    if (round($unfiltered->fields['products_price_sorter'], 2) > $max)
    {
      $max = round($unfiltered->fields['products_price_sorter'], 2);
    }
    $unfilteredProducts[] = $unfiltered->fields['products_id'];
    $unfilteredManufacturers[] = $unfiltered->fields['manufacturers_id'];
    $unfilteredCategories[] = $unfiltered->fields['master_categories_id'];

    $unfiltered->MoveNext();
  }
  while (!$filtered->EOF)
  {
    $priceArray[] = round($filtered->fields['products_price_sorter'], 2);
    $filteredProducts[] = $filtered->fields['products_id'];
    $filteredManufacturers[] = $filtered->fields['manufacturers_id'];
    $filteredCategories[] = $filtered->fields['master_categories_id'];

    $filtered->MoveNext();
  }

  if (count($unfilteredManufacturers) > 1)
  {
    $unfilteredManufacturers = array_filter(array_unique($unfilteredManufacturers));
  }
  if (count($unfilteredCategories) > 1)
  {
    $unfilteredCategories = array_filter(array_unique($unfilteredCategories));
  }
  if (count($unfilteredProducts) > 1)
  {
    $unfilteredProducts = array_filter(array_unique($unfilteredProducts));
  }
  if (count($filteredManufacturers) > 1)
  {
    $filteredManufacturers = array_filter(array_unique($filteredManufacturers));
  }
  if (count($filteredCategories) > 1)
  {
    $filteredCategories = array_filter(array_unique($filteredCategories));
  }
  if (count($filteredProducts) > 1)
  {
    $filteredProducts = array_filter(array_unique($filteredProducts));
  }
  if (count($priceArray) > 1)
  {
    $priceArray = array_filter(array_unique($priceArray));
  }

/*
 * start manufacturer/category drop down/link/check boxes
 */

// Only display if standard zen cart category/manufacturer dropdown is disabled
  if (PRODUCT_LIST_FILTER == 0)
  {
    if (isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] != '' || $current_page_base == 'products_all' || $current_page_base == 'products_new' || $current_page_base == 'specials' || $current_page_base == 'featured_products' || $current_page_base == 'advanced_search_result')
    {
      if (count($unfilteredCategories) > 0)
      {
        $group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', DYNAMIC_FILTER_CATEGORY_GROUP);
        $resetParms[] = $group;
        $parameters = zen_get_all_get_params();
        $dropdownDefault = str_replace('%n', DYNAMIC_FILTER_CATEGORY_GROUP, DYNAMIC_FILTER_DROPDOWN_DEFAULT);

// BOF language fix by a_berezin
// bof Multi site
        $categories = $db->Execute(cat_filter("SELECT categories_id, categories_name, IF(categories_id IN (" . implode(',', $filteredCategories) . "), 'Y', 'N') as flag" .
                              " FROM " . TABLE_CATEGORIES_DESCRIPTION .
                              " WHERE categories_id IN (" . implode(',', $unfilteredCategories) . ")" .
                              " AND language_id=" . (int)$_SESSION['languages_id'] .
                              " ORDER BY categories_name"));
// eof Multi site
// EOF language fix

        $content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . DYNAMIC_FILTER_TEXT_CATEGORY . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
        if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
        if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
        else $content .= '<ul' . (count($unfilteredCategories) > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
        while (!$categories->EOF)
        {
          if (isset($_GET[$group]) && in_array($categories->fields['categories_id'],$_GET[$group]))
          {
            $linkClass = 'selected';
          }
          else if ($categories->fields['flag'] == 'N')
          {
            $linkClass = 'disabled';
          }
          else
          {
            $linkClass = 'enabled';
          }

          $onClick = '';
          if (FILTER_GOOGLE_TRACKING != 'No')
          {
            $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . DYNAMIC_FILTER_CATEGORY_GROUP . '=' . $categories->fields['categories_name'] . '\'' . $trackingEnd;
          }
          if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';

          if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled')
          {
            $hrefLink = $group . '[]=' . $categories->fields['categories_id'];
            switch(strtok(FILTER_STYLE, " "))
            {
              case 'Checkbox':
                $content .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $categories->fields['categories_id'], (isset($_GET[$group]) && in_array($categories->fields['categories_id'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . $categories->fields['categories_name'] . '</li>';
                break;
              case 'Link':
                $content .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . $categories->fields['categories_name'] . '</a></li>';
                break;
              case 'Dropdown':
                $content .= '<option value="' . $categories->fields['categories_id'] . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' .  $categories->fields['categories_name'] . '</option>';
                break;
            }
          }
          $categories->MoveNext();
        }
        if (strtok(FILTER_STYLE, " ") == 'Dropdown')
        {
          $content .= '</select>';
        }
        else
        {
          $content .= '</ul>';
        }
        if (FILTER_OPTIONS_STYLE == 'Expand' && count($unfilteredCategories) > FILTER_MAX_OPTIONS)
        {
          $content .= '<a class="dFilterToggle" href="#">' . TEXT_DYNAMIC_FILTER_SHOW_MORE . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', TEXT_DYNAMIC_FILTER_SHOW_MORE, '', '', 'class="dFilterToggleImg"') . '</a>';
        }
        $content .= '</div></div>';
      }
    }
    if (!isset($_GET['manufacturers_id']))
    {
      if (count($unfilteredManufacturers) > 0)
      {
        $group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', DYNAMIC_FILTER_MANUFACTURER_GROUP);
        $resetParms[] = $group;
        $parameters = zen_get_all_get_params(array($group));
        $dropdownDefault = str_replace('%n', DYNAMIC_FILTER_MANUFACTURER_GROUP, DYNAMIC_FILTER_DROPDOWN_DEFAULT);

// BOF fix by a_berezin
        if (sizeof($filteredManufacturers) > 0)
          {
            $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");
        }
        else
        {
          $manufacturers = $db->Execute("SELECT manufacturers_id, manufacturers_name, 'N' as flag" .
                 " FROM " . TABLE_MANUFACTURERS .
                 " WHERE manufacturers_id IN (" . implode(',', $unfilteredManufacturers) . ")" .
                " ORDER BY manufacturers_name");
        }
// EOF fix

        $content .= '<hr width="90%" size="0" />';
        $content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . DYNAMIC_FILTER_TEXT_MANUFACTURER . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
        if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
        if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
        else $content .= '<ul' . (count($unfilteredManufacturers) > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
        while (!$manufacturers->EOF)
        {
          if (isset($_GET[$group]) && in_array($manufacturers->fields['manufacturers_id'],$_GET[$group])) $linkClass = 'selected';
          else if ($manufacturers->fields['flag'] == 'N') $linkClass = 'disabled';
          else $linkClass = 'enabled';

          $onClick = '';
          if (FILTER_GOOGLE_TRACKING != 'No') $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . DYNAMIC_FILTER_MANUFACTURER_GROUP . '=' . $manufacturers->fields['manufacturers_name'] . '\'' . $trackingEnd;
          if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';

          if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled')
          {
            $hrefLink = $group . '[]=' . $manufacturers->fields['manufacturers_id'];
            switch(strtok(FILTER_STYLE, " "))
            {
              case 'Checkbox':
                $content .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $manufacturers->fields['manufacturers_id'], (isset($_GET[$group]) && in_array($manufacturers->fields['manufacturers_id'],$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . $manufacturers->fields['manufacturers_name'] . '</li>';
                break;
              case 'Link':
                $content .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . $manufacturers->fields['manufacturers_name'] . '</a></li>';
                break;
              case 'Dropdown':
                $content .= '<option value="' . $manufacturers->fields['manufacturers_id'] . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' .  $manufacturers->fields['manufacturers_name'] . '</option>';
                break;
            }
          }
        $manufacturers->MoveNext();
        }
        if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
        else $content .= '</ul>';
        if (FILTER_OPTIONS_STYLE == 'Expand' && count($unfilteredManufacturers) > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">' . TEXT_DYNAMIC_FILTER_SHOW_MORE . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', TEXT_DYNAMIC_FILTER_SHOW_MORE, '', '', 'class="dFilterToggleImg"') . '</a>';
        $content .= '</div></div>';
      }
    }
  }

/*
 * end manufacturer/category drop down/link/check boxes
 */


/*
 * start price range link/check boxes
 */
  if (count($priceArray) > 0)
  {
    $priceGap = floor(($max - $min) / (FILTER_MAX_RANGES - 1));
    if (FILTER_MIN_PRICE > 0 && $priceGap < FILTER_MIN_PRICE)
    {
      $priceGap = FILTER_MIN_PRICE;
    }
    if (FILTER_MAX_PRICE > 0 && $priceGap > FILTER_MAX_PRICE)
    {
      $priceGap = FILTER_MAX_PRICE;
    }

  $group = DYNAMIC_FILTER_PREFIX . str_replace(' ', '', DYNAMIC_FILTER_PRICE_GROUP);
  $resetParms[] = $group;
  $parameters = zen_get_all_get_params();
  $dropdownDefault = str_replace('%n', DYNAMIC_FILTER_PRICE_GROUP, DYNAMIC_FILTER_DROPDOWN_DEFAULT);
  $priceCount = 0;
  $prices = '';

  for ($start = $min - 0.5; $start < $max; $start = $end + 0.01)
  {
    $end = round($start + $priceGap);
    if ($end < $max)
    {
// BOF tax fix by design75
    $text = $currency_symbol . round(zen_add_tax($start, $products_tax) * $conversion_rate) . TEXT_DYNAMIC_FILTER_DIVIDER . $currency_symbol . round(zen_add_tax($end, $products_tax) * $conversion_rate);
    }
    else
    {
      $text = $currency_symbol . round(zen_add_tax($start, $products_tax) * $conversion_rate) . TEXT_DYNAMIC_FILTER_AND_OVER;
// EOF tax fix
    }
    foreach($priceArray as $price )
    {
      if ($start <= $price && $end >= $price)
      {
        if (isset($_GET[$group]) && in_array($start . '--' . $end,$_GET[$group]))
        {
          $linkClass = 'selected';
        }
        else
        {
          $linkClass = 'enabled';
        }
        break;
      }
      else
      {
        $linkClass = 'disabled';
      }
    }

    $onClick = '';
    if (FILTER_GOOGLE_TRACKING != 'No') $onClick .= $trackingStart . '\'filterAction\', \'' . ($linkClass != 'selected' ? 'addFilter' : 'removeFilter') . '\', \'' . $pageName . ';' . DYNAMIC_FILTER_PRICE_GROUP . '=' . $start . '-' . $end . '\'' . $trackingEnd;
          if (FILTER_STYLE == 'Checkbox - Single') $onClick .= ' this.form.submit();';

          if (FILTER_METHOD != 'Hidden' || $linkClass != 'disabled')
            {
              $hrefLink = $group . '[]=' . $start . '--' . $end;
              switch(strtok(FILTER_STYLE, " "))
                {
                  case 'Checkbox':
                    $prices .= '<li class="dFilterLink">' . zen_draw_checkbox_field($group . '[]', $start . '--' . $end, (isset($_GET[$group]) && in_array($start . '--' . $end,$_GET[$group]) ? true : false), ($linkClass == 'disabled' ? 'disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Checkbox - Single' ? ' onclick="' . $onClick . '"' : '')) . $text . '</li>';
                  break;
                  case 'Link':
                    $prices .= '<li class="dFilterLink"><a class="' . $linkClass . '"' . ($linkClass != 'disabled' ? ' rel="nofollow" href="' . zen_href_link($_GET['main_page'], ($linkClass != 'selected' ? $parameters . $hrefLink : str_replace(array($hrefLink,'&'.$hrefLink), array("",""), $parameters)), 'NONSSL') . '"' . ($onClick != '' ? ' onclick="' . $onClick . '"' : '') : '') . ' >' . $text . '</a></li>';
                  break;
                  case 'Dropdown':
                    $prices .= '<option value="' . $start . '--' . $end . '"' . ($linkClass == 'selected' ? ' selected="selected"' : '') . ($linkClass == 'disabled' ? ' disabled="disabled"' : '') . ($onClick != '' && FILTER_STYLE == 'Dropdown - Single' ? ' onclick="' . $onClick . '"' : '') . ' >' . $text . '</option>';
                  break;
                }
            }
          ++$priceCount;
        }

      $content .= '<hr width="90%" size="0" />';
      $content .= '<div><div class="dFilter"><p class="dFilterHeading">' . DYNAMIC_FILTER_TEXT_PREFIX . DYNAMIC_FILTER_TEXT_PRICE . DYNAMIC_FILTER_TEXT_SUFFIX . '</p>';
      if (isset($_GET[$group]) && array_filter($_GET[$group])) $content .= '<div class="dFilterClear"><a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array($group)), 'NONSSL') . '">' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'clear_filter.png', DYNAMIC_FILTER_BUTTON_CLEAR_FILTER_ALT) . '</a></div>';
      if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '<select name="' . $group . '[]" class="dFilterDrop"' . (FILTER_STYLE == 'Dropdown - Single' ? ' onchange="this.form.submit();"' : '') . '>' . '<option value=""' . (!isset($_GET[$group]) || !array_filter($_GET[$group]) ? ' selected="selected"' : '') . '>' . $dropdownDefault . '</option>';
      else $content .= '<ul' . ($priceCount > FILTER_MAX_OPTIONS ? (FILTER_OPTIONS_STYLE == 'Scroll' ? ' class="dFilterScroll">' : ' class="dFilterExpand">') : '>');
      $content .= $prices;
      if (strtok(FILTER_STYLE, " ") == 'Dropdown') $content .= '</select>';
      else $content .= '</ul>';
      if (FILTER_OPTIONS_STYLE == 'Expand' && $priceCount > FILTER_MAX_OPTIONS) $content .= '<a class="dFilterToggle" href="#">' . TEXT_DYNAMIC_FILTER_SHOW_MORE . zen_image(DIR_WS_TEMPLATE_IMAGES . 'arrow_more.gif', TEXT_DYNAMIC_FILTER_SHOW_MORE, '', '', 'class="dFilterToggleImg"') . '</a>';
      $content .= '</div></div>';
    }

/*
 * end price range link/check boxes
 */


/*
 * start attribute link/check boxes
 */

  if(count($filteredProducts) > 0)
    {
    // Below line counts up all quantities of each item. e.g. if a glove is available in Small and Medium, quantity = 2.
    //$attributes = $db->Execute("SELECT po.products_options_name, pov.products_options_values_name, count( p2as.quantity ) as quantity" .
................................
rest of file is cut of due to post length

the 4 pieces of changed code are marked with
// bof Multi site
and
// eof Multi site

04 Sep 2013, 07:44
#349
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

You are a star, thank you

04 Sep 2013, 16:06
#350
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

One thing that might be useful to include in a future release:

At the moment the the product count - I guess it should be called quantity - displayed next to the attribute remains constant, I think it would be good to have that change dynamically as attributes are selected.

I'm not sure how much work that would mean as it's beyond my capabilities.

Just a thought.

04 Sep 2013, 18:31
#351
design75 avatar

design75

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

simon1066:

One thing that might be useful to include in a future release:

At the moment the the product count - I guess it should be called quantity - displayed next to the attribute remains constant, I think it would be good to have that change dynamically as attributes are selected.

I'm not sure how much work that would mean as it's beyond my capabilities.

Just a thought.

I know, and I had a quick look at it making the count dynamic, some time ago. For now I do not have the time to fix this.

05 Sep 2013, 07:24
#352
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Design75:

I know, and I had a quick look at it making the count dynamic, some time ago. For now I do not have the time to fix this.

Ok that's fine. Thanks for your reply

06 Sep 2013, 07:48
#353
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Another suggestion for the future

While I have been able to incorporate currency symbols that fall on the right of the value by adding the following to tpl_dynamic_filter.php

$currencies->currencies[$currency_type]['symbol_right']

I have not been able to add the 'thousands point', I have tried to extract the code needed from /classes/currencies.php without success

$rate = (zen_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value'];
      $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(zen_round($number * $rate, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];

Perhaps these two points could be included in the next version.

12 Sep 2013, 06:21
#354
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Im trying to add this plugin to my 1.5.1 fresh install, no mods are added to it yet.

It gives me a blank page and in the /logs/ file i find this;

[10-Sep-2013 11:48:17 Europe/Amsterdam] PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /var/www/vhosts/mydomain.com/httpdocs/x/includes/functions/functions_general.php:626) in /var/www/vhosts/mydomain.com/httpdocs/x/includes/functions/password_funcs.php on line 86

Is there a fix available for this? Ive googled on this error and found some other people with the same problem but no solution :(

Can somebody point me in the right direction to fix this so i can use this awesome plugin ?

19 Sep 2013, 09:13
#355
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

wrickspam:

Im trying to add this plugin to my 1.5.1 fresh install, no mods are added to it yet.

It gives me a blank page and in the /logs/ file i find this;

[10-Sep-2013 11:48:17 Europe/Amsterdam] PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in /var/www/vhosts/mydomain.com/httpdocs/x/includes/functions/functions_general.php:626) in /var/www/vhosts/mydomain.com/httpdocs/x/includes/functions/password_funcs.php on line 86

Is there a fix available for this? Ive googled on this error and found some other people with the same problem but no solution :(

Can somebody point me in the right direction to fix this so i can use this awesome plugin ?

Managed to fix it with instructions found somewhere on the web, you have to grab the functions_general.php from the original 1.5.1 zencart, then mod that with this:

Find :

 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 with:

  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
          }
        }
      }
    }  

Solution by : Design75

19 Sep 2013, 10:18
#356
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Manged to get it partially working,

Filtering works as intented on the products_all page, i can filter there for my attribute.

I have created an attribute that holds the value (vehicle the parts fits on)

On the products_all page it works great and shows me the right products with that attribute.

When i go to the category page, which shows me a list of all the products in that category, it does not work.

I Will try to explain with some screenshots..

Everything working correctly in the products_all screen:

Failing in category screen:

Hopefully somebody can point me in the right direction to get this fully functional, im possibly doing something wrong :(

Attachment 13095Attachment 13096

20 Sep 2013, 03:04
#357
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

It has been a long time since i have installed Dynamic Filter.

When you add a new attribute to a product, in this case a Read Only Attribute, named: Style. Would **Style ** automatically appear in the filter set? Or you should modify a file somewhere?

20 Sep 2013, 05:10
#358
kevin205 avatar

kevin205

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

laksh0302:

Thanks a lotfor the correct code.

I just made changes to my functions_general.php file.
However, the add to cart still shows a blank page with a warning.

I checked the log files and following is what it showed me:

[02-Sep-2013 14:34:50 America/Phoenix] PHP Fatal error: 1146:Table 'artemisiacartdem.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist :: select stock_id from TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK where products_id = '47' in /home/content/b/a/r/barbschulman/html/store/includes/classes/db/mysql/query_factory.php on line 120

Please tell me if anything was wrong with the upgrade?

Design75:

Apparently you are running products with attribute stock, but do not have the tables installed

FIXED. After the new attribute setup, SBA table had to get updated, .

Thank you Design75.

24 Sep 2013, 06:43
#359
wrickspam avatar

wrickspam

New Zenner

Join Date:
Dec 2011
Location:
Emmen, The Netherlands
Posts:
85
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

wrickspam:

snip

Managed to get it working, somehow i screwed up uploading index_filters file, after reuploading that it now works like a charm :)

so if u run into problem, make sure you uploaded index_filters to the right location

/httpdocs/Shop/includes/index_filters/your_template/

01 Oct 2013, 23:03
#360
kitten091182 avatar

kitten091182

Zen Follower

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

Re: Dynamic Filter [Support Thread]

Hi, great mod by the way. I just have one problem that i could use your help with if you dont mind.
I have dynamic filter installed on a v1.51 site, and i have just installed stock by attributes. Dynamic filter was working great before, but now the filter sidebox will only show attributes if they have stock assigned to them in the stock by attributes mod. As most my filters are read only and not meant to have stock levels this is a bit of a problem. Is there a work round this at all, or am i going to have to assign stock levels to all my read only attributes? Thanks in advance.