Page 49 of 81 FirstFirst ... 39474849505159 ... LastLast
Results 481 to 490 of 808
  1. #481
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter - filter does not work on product listing

    Quote Originally Posted by RodG View Post
    This may help (changes in blue) :

    // File /modules/custom/dynamic_filter.php
    ------------------------------------------------------------
    / Price Range/Attribute filter
    $manufacturerGroup = str_replace(' ', '', DYNAMIC_FILTER_MANUFACTURER_GROUP);
    $categoryGroup = str_replace(' ', '', DYNAMIC_FILTER_CATEGORY_GROUP);
    $priceGroup = str_replace(' ', '', DYNAMIC_FILTER_PRICE_GROUP);
    $prvKey = '';
    $prvHaving = '';
    $filter = '';
    $having = '';
    $filter_attr = false;


    reset($_GET);
    while(list($key, $value) = each ($_GET)) {
    // if(!is_array($value)) { // skip if not array // RodG

    if(substr($key,0,strlen(DYNAMIC_FILTER_PREFIX)) == DYNAMIC_FILTER_PREFIX && array_filter($value)) {
    $key = str_replace(DYNAMIC_FILTER_PREFIX, '', $key);
    foreach ($value as $value) {

    if($key == $manufacturerGroup || $key == $categoryGroup || $key == $priceGroup) {
    if($key != $prvKey) {
    if($prvKey != '') {
    $filter .= ') and (';
    } else {
    $filter .= ' and (';
    }
    } else {
    $filter .= ' or ';
    }
    }
    // manufacturer
    if($key == $manufacturerGroup) {
    $filter .= "m.manufacturers_id = '" . (int)$value . "'";
    $prvKey = $key;
    // category
    } else if($key == $categoryGroup) {
    $filter .= "p2c.categories_id = '" . (int)$value . "'";
    $prvKey = $key;
    // price range
    } else if($key == $priceGroup) {
    list($low,$high) = explode("--",$value);
    // Updated to include GST by RodG
    $filter .= 'p.products_price_sorter>=' . ($low - ($low / 11)) . ' and ' . 'p.products_price_sorter<=' . ($high - ($high / 11));
    // $filter .= 'p.products_price_sorter>=' . $low . ' and ' . 'p.products_price_sorter<=' . $high; // original code //
    $prvKey = $key;
    // attributes
    } else {
    if($key != $prvHaving) {
    if($prvHaving != '') {
    $having .= ') and (';
    } else {
    $having .= 'HAVING (';
    }
    } else {
    $having .= ' or ';
    }
    $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 .= ')';
    if($having != '') $having .= ')';
    if($filter_attr == true && defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK')) $filter .= ' AND p2as.quantity > 0 AND FIND_IN_SET(p2a.products_attributes_id, p2as.stock_attributes)';

    --------------------------------------------------------------------------------------------------------

    OK, so it isn't going to be *exactly* what you want. This was a quick n dirty fix I added to a customers site to account for a 10% GST.
    It shouldn't be hard to replace these hard coded calculations with variables obtained from the Tax tables though.

    Cheers
    RodG
    Thx, I'll go and test it right away.

  2. #482
    Join Date
    Sep 2012
    Posts
    27
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    Hey guys,

    Thanks for the answers!

    Would it be possible to set the filter so it searches in subcategories too? For example I have binoculars on my site. Category is binoculars and the subcategories are the brands (Zeiss Leupold etc). So if a customer sets a price range filter in the binoculars category, I want him to get the result of all brands in that price range.

    Thanks for the answers in advance!

  3. #483
    Join Date
    Dec 2011
    Location
    Emmen, The Netherlands
    Posts
    85
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    please dont push a update without fixing the big problems surrounding this plugin when working with large amounts of attributes...

    search through the topic there are a lot of people with this problem!

  4. #484
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter - filter does not work on product listing

    Quote Originally Posted by wrickspam View Post
    please dont push a update without fixing the big problems surrounding this plugin when working with large amounts of attributes...

    search through the topic there are a lot of people with this problem!
    I don't think there is a lot that can be done about that. In my opinion, and knowledge, this has to do with the server resources that are available for your site. Large amounts of attribute require large amounts of memory and cpu. But if someone knows a solution for that please help out.

  5. #485
    Join Date
    Oct 2014
    Location
    Sydney
    Posts
    2
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    Hi,

    I'm not sure if this is a problem with dynamic filter or not as it was previously working but I have exhausted every possibility I can think of other than contacting my hosting company to see if they have changed anything. On my website www.eliterugs.com.au I have had dynamic filter installed for about a month, I had previously tested it and everything was bullet proof. Yesterday I noticed that the sort by price option returns a 403 forbidden error. All the other options work fine in any combination but as soon as you add the price it fails.

    I was wondering if anyone had any idea what could be causing this. As far as I can remember all I have worked on in the last couple of days was adding some dynamic remarketing and analytics code and I upgraded my google merchant centre code.

    There are no error logs generated by zen cart or my website and I have double checked my database against a backup from a month ago and it still looks the same.

    I am open to any any and all suggestions at this stage as I have run out of ideas.

    Thanks.

  6. #486
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter - filter does not work on product listing

    Quote Originally Posted by Eerin View Post
    Hi,

    I'm not sure if this is a problem with dynamic filter or not as it was previously working but I have exhausted every possibility I can think of other than contacting my hosting company to see if they have changed anything. On my website www.eliterugs.com.au I have had dynamic filter installed for about a month, I had previously tested it and everything was bullet proof. Yesterday I noticed that the sort by price option returns a 403 forbidden error. All the other options work fine in any combination but as soon as you add the price it fails.

    I was wondering if anyone had any idea what could be causing this. As far as I can remember all I have worked on in the last couple of days was adding some dynamic remarketing and analytics code and I upgraded my google merchant centre code.

    There are no error logs generated by zen cart or my website and I have double checked my database against a backup from a month ago and it still looks the same.

    I am open to any any and all suggestions at this stage as I have run out of ideas.

    Thanks.
    Haven't seen that error before, but it is quit possible it is caused by this mod. The price filtering has always been buggy.
    What happens if you use a different filter style?

  7. #487
    Join Date
    Oct 2014
    Location
    Sydney
    Posts
    2
    Plugin Contributions
    0

    Default Re: Dynamic Filter - filter does not work on product listing

    Thanks for the reply, after an extremely long day yesterday looking through all the code and undoing everything that I had worked on over the last 3 days trying to find the problem. I got onto my web host this morning and it turns out they had done a security update and turned on a new mod_security setting (341245) that was blocking this feature. They have now turned it off for me and everything is working perfectly once again. Hopefully this may help someone in the future if they experience a similar issue. The code it's self is still as bullet proof as ever. Thanks.

  8. #488
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Dynamic Filter - filter does not work on product listing

    Quote Originally Posted by Eerin View Post
    Thanks for the reply, after an extremely long day yesterday looking through all the code and undoing everything that I had worked on over the last 3 days trying to find the problem. I got onto my web host this morning and it turns out they had done a security update and turned on a new mod_security setting (341245) that was blocking this feature. They have now turned it off for me and everything is working perfectly once again. Hopefully this may help someone in the future if they experience a similar issue. The code it's self is still as bullet proof as ever. Thanks.
    Thanks Eerin, for your feedback, saves me time going over the code to find an error

  9. #489
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Ceon URI mappings issue

    Some of my Option Values contain html code. This code is recognised and displayed correctly on the Product Info page but is not displayed correctly in the Dynamic sidebox - the complete code is shown instead of the formatted text.

    I'm having difficulty in identifying the lines of Dynamic Filter code that control this - any suggestions?

  10. #490
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Ceon URI mappings issue

    Quote Originally Posted by simon1066 View Post
    Some of my Option Values contain html code. This code is recognised and displayed correctly on the Product Info page but is not displayed correctly in the Dynamic sidebox - the complete code is shown instead of the formatted text.

    I'm having difficulty in identifying the lines of Dynamic Filter code that control this - any suggestions?
    Never mind, found it, at last.

 

 
Page 49 of 81 FirstFirst ... 39474849505159 ... LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. Empty Dynamic Filter
    By LadyoftheCave in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 6 Jun 2016, 12:47 PM
  3. v150 Dynamic filter
    By Dinoleix in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 13 Aug 2013, 10:23 AM
  4. v150 Dynamic filter - All pages
    By Okkwebmedia in forum Addon Sideboxes
    Replies: 0
    Last Post: 8 Jul 2013, 08:52 AM
  5. v138a Dynamic Filter
    By SoftCorpse in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 18 Jun 2012, 01:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR