Page 54 of 81 FirstFirst ... 444525354555664 ... LastLast
Results 531 to 540 of 808
  1. #531
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: upgrading this plugin

    Quote Originally Posted by Craig Freeburg View Post
    Awesome. Thanks.

    I'm assuming this is the only thread for this dynamic filter, so if I need to post this somewhere else, please let me know. But I had a question about the way this filter works. I know it uses attributes and I've gotten it to filter through the categories. On my site though, it will help to have options on some of the products as well. For example, being able to filter by shirt color, and once you're on the product info page, then having attributes to select the size before it's added to the cart. Is there a way to separate the 2 so only some attributes show up in dynamic filter, and some show up on the product info page?
    In the admin, there is an option to include/exclude certain attributes from the filter

  2. #532
    Join Date
    Dec 2011
    Posts
    23
    Plugin Contributions
    0

    Default Re: upgrading this plugin

    I've been running version 1.0 of this filter (with some issues as it doesn't work or look quite right) on a manually installed ver 1.51 of Zencart. Now that I see there's an upgrade, are there any specific upgrading instructions? I searched this thread with no results. Thank you

  3. #533
    Join Date
    Feb 2007
    Location
    Pennsylvania
    Posts
    806
    Plugin Contributions
    0

    Default Re: upgrading this plugin

    any chance a working version of this mod will be released? I can't seem to get this to work like at all. Everything about it breaks. Error logs fill up with everything from improper use of php functions to missing table names in queries. The sidebox breaks and all other sidebox contents end up all over the main page.

    What a major let down.

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

    Default Re: upgrading this plugin

    So still working on this mod from time to time, but lacking the time to fish it up.
    But I wanted to at least show you this update.

    I did by accident more or less discover how to change the number of filtered products shown between the brackets.
    If you search in file includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_filter.php.
    and change
    PHP Code:
    htmlspecialchars(html_entity_decode($attributes->fields['quantity'], ENT_QUOTES)) 
    to
    PHP Code:
    htmlspecialchars(html_entity_decode($attributes->fields['flag'], ENT_QUOTES)) 
    the number also changes to the number of products left on which to filter.
    You can see it in action here

  5. #535
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: upgrading this plugin

    Well done! Such a seemingly simple change for such a big effect. Thank you.

    (For some reason the number of products left does not decrease on one of my attributes - it actually increases, I'll need to dig deeper on that one)

  6. #536
    Join Date
    Sep 2010
    Posts
    43
    Plugin Contributions
    0

    Default Re: upgrading this plugin

    Hello, Will this dynamic filter work under ZenCart 1.5.4?
    If yes, can you please provide me with a download link?
    Thank you very much,
    Admir M.
    Sucess is the Sum of Small Efforts

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

    Default Re: upgrading this plugin

    It will work with 1.5.4. You can download the latest version of the module and use the file set for Zen Cart 1.5.1

    except for the file includes/functions/functions_general.php. There you will need to make only 1 small change
    find:
    PHP Code:
      function zen_get_all_get_params($exclude_array = 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 (!
    in_array($key$exclude_array)) {
              if (!
    is_array($value)) {
                if (
    strlen($value) > 0) {
                  
    $get_url .= zen_sanitize_string($key) . '=' rawurlencode(stripslashes($value)) . '&';
                }
              } else {
                foreach(
    array_filter($value) as $arr){
                  
    $get_url .= zen_sanitize_string($key) . '[]=' rawurlencode(stripslashes($arr)) . '&';
                }
              }
            }
          }
        }
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);

        return 
    $get_url;
      } 
    and replace with
    PHP Code:
      function zen_get_all_get_params($exclude_array = 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 1
            
    if ( (!in_array($key$exclude_array)) && (is_string($value) && strlen($value) > || is_array($value) && array_filter($value) ) && ($key != 'main_page') && ($key != zen_session_name()) && ($key != 'error') && ($key != 'x') && ($key != 'y') ) {
    // eof dynamic filter 1 of 1
              
    if (!is_array($value)) {
                if (
    strlen($value) > 0) {
                  
    $get_url .= zen_sanitize_string($key) . '=' rawurlencode(stripslashes($value)) . '&';
                }
              } else {
                foreach(
    array_filter($value) as $arr){
                  
    $get_url .= zen_sanitize_string($key) . '[]=' rawurlencode(stripslashes($arr)) . '&';
                }
              }
            }
          }
        }
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);

        return 
    $get_url;
      } 

  8. #538
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: upgrading this plugin

    Design75 ... do you mind if I challenge that?

    I'm thinking that code change is redundant. Can you help me understand what I'm missing?
    Note the things I've highlighted below, as I think your suggested code change is duplicating what's already in that function's logic:

    Code:
      function zen_get_all_get_params($exclude_array = 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 1
            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 1
              if (!is_array($value)) {
                if (strlen($value) > 0) {
                  $get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
                }
              } else {
                foreach(array_filter($value) as $arr){
                  $get_url .= zen_sanitize_string($key) . '[]=' . rawurlencode(stripslashes($arr)) . '&';
                }
              }
            }
          }
        }
        while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
        while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
    
        return $get_url;
      }
    My point is really: if no changes are needed, then it's better not to touch the file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

    Default Re: upgrading this plugin

    Quote Originally Posted by DrByte View Post
    Design75 ... do you mind if I challenge that?

    I'm thinking that code change is redundant. Can you help me understand what I'm missing?
    Note the things I've highlighted below, as I think your suggested code change is duplicating what's already in that function's logic:

    Code:
      function zen_get_all_get_params($exclude_array = 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 1
            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 1
              if (!is_array($value)) {
                if (strlen($value) > 0) {
                  $get_url .= zen_sanitize_string($key) . '=' . rawurlencode(stripslashes($value)) . '&';
                }
              } else {
                foreach(array_filter($value) as $arr){
                  $get_url .= zen_sanitize_string($key) . '[]=' . rawurlencode(stripslashes($arr)) . '&';
                }
              }
            }
          }
        }
        while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
        while (strstr($get_url, '&&')) $get_url = str_replace('&&', '&', $get_url);
    
        return $get_url;
      }
    My point is really: if no changes are needed, then it's better not to touch the file.
    I must admit I do not fully understand the code , but just compared old 1.5.1 and new 1.5.4 vanilla files end the code from the mod.
    This was the line that was left after comparing, but is you say it is not needed, (and after some better reading of that code block) I agree it seems unnecessary.
    I am going to test it right now, and will report back.

  10. #540
    Join Date
    Jul 2006
    Location
    Johannesburg
    Posts
    447
    Plugin Contributions
    1

    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.
    Thank you for pointing this out. I received a "403 page not found" error when selecting price as part of the filter. I searched high and low over the last week or so to see if I could find a solution but to no avail. After seeing this post over the weekend, I contacted my host this morning and they made some changes on their side and voila, the price filter is working again.

    Power to the people that support community based projects!

 

 
Page 54 of 81 FirstFirst ... 444525354555664 ... 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