Results 1 to 10 of 809

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Overrides are:

    The mod has the following overrides, which I have added.
    includes/classes/split_page_results.php
    includes/functions/functions_general.php
    includes/modules/pages/advanced_search_result/header_php.php
    includes/modules/pages/featured_products/header_php.php
    includes/modules/pages/products_all/header_php.php
    includes/modules/pages/products_new/header_php.php
    includes/modules/pages/specials/header_php.php
    includes/modules/pages/specials/main_template_vars.php
    It also askes you to add a template override includes/index_filters/YOUR_TEMPLATE/default_filter.php

    The only thing I have not done is to add
    PHP Code:
    [B]$excludeParams[] = DYNAMIC_FILTER_PREFIX 'Colour';[/B
    to includes/init_includes/init_canonical.php file, Since I am getting a white page, am not even there yet.
    Using Zen Cart 1.5.1

  2. #2
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Ok so first things first.

    Do any of the files that have be overridden been modified by any of your other mods?

    Secondly, starting to come back to me now. Pretty sure almost all if not all of the header files were out of date? Check the file version compared to the dynamic filter ones, I think I had to merge them.

    Don't worry about cannonical, that doesn't do anything at this stage. All it will do is ensure that your canonical links in the source are correct when the filters are applied.
    Phil Rogers
    A problem shared is a problem solved.

  3. #3
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Quote Originally Posted by philip937 View Post
    Ok so first things first.

    Do any of the files that have be overridden been modified by any of your other mods?
    I removed the only one that did, which was Products Listing Sorter v1.1

    Secondly, starting to come back to me now. Pretty sure almost all if not all of the header files were out of date? Check the file version compared to the dynamic filter ones, I think I had to merge them.
    Oh I have to look at that.

    Don't worry about cannonical, that doesn't do anything at this stage. All it will do is ensure that your canonical links in the source are correct when the filters are applied.

    ps. where can I get DrByte's Code revision?
    Using Zen Cart 1.5.1

  4. #4
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    So you use the 1.5.1 file and change this function re written by DrByte
    http://www.zen-cart.com/showthread.p...44#post1188244

    That should be the only function in the file that is changed for dynamic filter and that version DrByte rewrote works fine for dynamic filter
    Phil Rogers
    A problem shared is a problem solved.

  5. #5
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    OK then in:
    (1) Code from the mod - Creating the error and the white page.
    PHP Code:
      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) > || 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;
      } 

    (2)DrBytes revision:
    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 (
    is_string($value) && 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;
      } 
    (3)Code from my backup working site before Dynamic Filter
    PHP Code:
        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)) . '&';
            }
          }
        }
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);
        while (
    strstr($get_url'&&')) $get_url str_replace('&&''&'$get_url);

        return 
    $get_url;
      } 
    I just have to replace (3) with (2)?
    Using Zen Cart 1.5.1

  6. #6
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Correct replace with (2) make sure you are doing this in a clean v1.5.1 functions general file

    however I'm pretty sure that is not what is causing your error as I did not face the same thing. All this code change did was stopped some error log warnings.

    I suspect that the problem is with other files that haven't merged properly.

    You need to check the override files vs the version revisions of the 1.5.1 files they override. If they are older then they need to be merged. Will be going to bed very soon so won't be able to reply for a while. Just take it step by step one file at a time. The key is to ensure you are using the same files as version 1.5.1 uses and merge the changes dynamic filter makes.

    On the plus side, I didn't find it hard to merge any of them apart from the functions general one to make it all good which DrByte kindly stepped in a did for us.
    Last edited by philip937; 23 Feb 2013 at 11:38 PM.
    Phil Rogers
    A problem shared is a problem solved.

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 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

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