Page 62 of 81 FirstFirst ... 1252606162636472 ... LastLast
Results 611 to 620 of 808
  1. #611
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,296
    Plugin Contributions
    1

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

    Quote Originally Posted by Design75 View Post
    Sorry to tell you, but currently the one column feature is not yet supported by this module. It is on my (very long) to do list, but I really can't promise any time frame. I you are haing some spare time, feel free to help with this module, and I'll add your code to it.
    I've managed to get this mod to play happily with some responsive templates (stirling grand and westminster new) by using javascript to toggle the dynamicfilterContent on smaller responsive displays (I'm using max-width:767px).

    Is this something you've got planned for the next release? If not, and you think it's worth it, would it help if I package it up and send it you for including in the mod?

  2. #612
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

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

    Quote Originally Posted by simon1066 View Post
    I've managed to get this mod to play happily with some responsive templates (stirling grand and westminster new) by using javascript to toggle the dynamicfilterContent on smaller responsive displays (I'm using max-width:767px).

    Is this something you've got planned for the next release? If not, and you think it's worth it, would it help if I package it up and send it you for including in the mod?
    Greetings simon1066,

    I would be interested in your mods for the westminster new template!

    BTW, would you know how to only show the dynamic filter sidebox if there are products with attributes in a given category? It seems to display regardless and when there are no filters to list in the sidebox, it breaks the template layout!

    Thanks!
    Experience is what you get when you don’t get what you want…

  3. #613
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,296
    Plugin Contributions
    1

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

    Quote Originally Posted by kwright View Post
    Greetings simon1066,

    I would be interested in your mods for the westminster new template!

    BTW, would you know how to only show the dynamic filter sidebox if there are products with attributes in a given category? It seems to display regardless and when there are no filters to list in the sidebox, it breaks the template layout!

    Thanks!
    Hi, what I can do is to deactivate the sidebox for a given category - is that what you are looking for?
    I found it useful for document_general product category types - my template broke aswell!

  4. #614
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

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

    Quote Originally Posted by simon1066 View Post
    Hi, what I can do is to deactivate the sidebox for a given category - is that what you are looking for?
    I found it useful for document_general product category types - my template broke aswell!
    Yes, but only for the categories that have products with no attributes! It seems that the default function of the dynamic filter sidebox is to always show in categories with products regardless if they have attributes or not (shows empty sidebox with heading text).

    I guess one would need to test if a given category has products with attributes and show the filter sidebox if true. Just don't know where or how to do this? Any suggestions? I'm sure others would like this feature as well!
    Experience is what you get when you don’t get what you want…

  5. #615
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,296
    Plugin Contributions
    1

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

    Yes, I see what you mean, it would need a test to see if attributes are present. No doubt there's one hidden in the Zencart code somewhere. If you find it (or if you actually know the category that has no attributes) you can use this code to show/hide the sidebox for an 'if' statement

    Replace the contents of includes/modules/sideboxes/YOUR_TEMPLATE/dynamic_filter.php with:

    PHP Code:
    <?php
    /**
     * dynamic_filter.php
     *
     *Zen Cart dynamic filter module
     *Damian Taylor, March 2010
     *
     */

    if(FILTER_CATEGORY == 'Yes' && $current_page_base == 'index' && !$this_is_home_page && ($category_depth == 'products' || $category_depth == 'top') || FILTER_ALL == 'Yes' && $current_page_base == 'products_all' || FILTER_NEW == 'Yes' && $current_page_base == 'products_new' || FILTER_FEATURED == 'Yes' && $current_page_base == 'featured_products' || FILTER_SPECIALS == 'Yes' && $current_page_base == 'specials' || FILTER_SEARCH == 'Yes' && $current_page_base == 'advanced_search_result'){$show_dynamic_filter true;
    }
    if (
    $cPath == '14'){
    $show_dynamic_filter false;}
    if (
    $cPath == '6'){
    $show_dynamic_filter false;}
    if (
    $show_dynamic_filter == true) {
      require(
    $template->get_template_dir('tpl_dynamic_filter.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_dynamic_filter.php');

      
    $title =  BOX_HEADING_FILTER;
      
    $title_link false;

      require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
    }
    ?>
    You can either change the [if ($cPath == '??')] value to your category or replace that code with the magical attribute test we've yet to find.

  6. #616
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

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

    Quote Originally Posted by simon1066 View Post
    Yes, I see what you mean, it would need a test to see if attributes are present. No doubt there's one hidden in the Zencart code somewhere. If you find it (or if you actually know the category that has no attributes) you can use this code to show/hide the sidebox for an 'if' statement

    Replace the contents of includes/modules/sideboxes/YOUR_TEMPLATE/dynamic_filter.php with:

    PHP Code:
    <?php
    /**
     * dynamic_filter.php
     *
     *Zen Cart dynamic filter module
     *Damian Taylor, March 2010
     *
     */

    if(FILTER_CATEGORY == 'Yes' && $current_page_base == 'index' && !$this_is_home_page && ($category_depth == 'products' || $category_depth == 'top') || FILTER_ALL == 'Yes' && $current_page_base == 'products_all' || FILTER_NEW == 'Yes' && $current_page_base == 'products_new' || FILTER_FEATURED == 'Yes' && $current_page_base == 'featured_products' || FILTER_SPECIALS == 'Yes' && $current_page_base == 'specials' || FILTER_SEARCH == 'Yes' && $current_page_base == 'advanced_search_result'){$show_dynamic_filter true;
    }
    if (
    $cPath == '14'){
    $show_dynamic_filter false;}
    if (
    $cPath == '6'){
    $show_dynamic_filter false;}
    if (
    $show_dynamic_filter == true) {
      require(
    $template->get_template_dir('tpl_dynamic_filter.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_dynamic_filter.php');

      
    $title =  BOX_HEADING_FILTER;
      
    $title_link false;

      require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
    }
    ?>
    You can either change the [if ($cPath == '??')] value to your category or replace that code with the magical attribute test we've yet to find.
    OK, I see now. Most likely would want to test since I have several categories that currently don't have any attributes, but may in the future. Also, by testing, would make the dynamic filter more universal for others. May be add an admin switch to not show sidebox when products with no attributes in a category exist.

    I'll work on this to see what I can come up with. Also, still interested in your responsive mods if you have them available!

    Thanks,
    kwright
    Experience is what you get when you don’t get what you want…

  7. #617
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,296
    Plugin Contributions
    1

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

    Sounds good, adding an admin switch might be a bit beyond me though.

    I'll put together a quick and dirty post on the responsive layout. I have found that there might still be a bit of work to finalise it - mainly that the filter collapses once an attribute is selected and it needs to be opened again to select another, you'll see what I mean though. I'll do it now and post shortly.

  8. #618
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,296
    Plugin Contributions
    1

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

    Responsive template mods - this should put an expandable 'filter button' at the top of the product listing page on displays less than 767px width.

    ---------------------------------------
    in includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_filter.php

    replace:
    PHP Code:
    // draw filter form
      
    $content '';
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';
      
    $content .= zen_draw_form('product_filter_form','''get'); 
    with:
    PHP Code:
    // draw filter form
      
    $content '';
      
    $content .= '<div id="filterToggle"><a href="javascript:;" onclick="toggle_visibility(\'dynamicfilterContent\');">' zen_image_button(BUTTON_IMAGE_TOGGLE_FILTERBUTTON_TOGGLE_FILTER_ALT'class="listingBuyNowButton"') . '</a></div>';
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';
      
    $content .= zen_draw_form('product_filter_form','''get'); 
    ----------------------------------------

    in your responsive.css or responsive_default.css file (depending on the template used) add under the @media (max-width:767px) section add:
    Code:
    #dynamicfilter { display: block;visibility: visible;}
    #dynamicfilterContent{display:none;}
    #filterToggle {display: block;margin: 18px 0 0;}
    #dynamicfilterHeading {display: none;}
    in stylesheet.css add:
    Code:
    #filterToggle {display:none;}
    ----------------------------------------

    in includes/languages/english/YOUR_TEMPLATE/button_names.php add:
    PHP Code:
    define('BUTTON_IMAGE_TOGGLE_FILTER''buttonimage.gif');
    define('BUTTON_TOGGLE_FILTER_ALT''Filter results'); 
    BUTTON_TOGGLE_FILTER_ALT as well as being the image alt tag is also used for the css button text.
    BUTTON_IMAGE_TOGGLE_FILTER is an image file of the button if using images, if using css buttons this is not required but should be left blank like:

    Code:
    define('BUTTON_IMAGE_TOGGLE_FILTER', '');
    ---------------------------------------

    in /includes/modules/pages/index add the attached jscript_toggle.js

    jscript_toggle.zip

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

    and that's it.

    Quote Originally Posted by simon1066 View Post
    ... I have found that there might still be a bit of work to finalise it - mainly that the filter collapses once an attribute is selected and it needs to be opened again to select another, you'll see what I mean though.
    Now I come to think about it might be acceptable or even desirable for the filter box to collapse on page refresh especially on small screens. It would be good to know what others think.

  9. #619
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

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

    Thanks simon1066 for your help and mods!
    Experience is what you get when you don’t get what you want…

  10. #620
    Join Date
    Nov 2004
    Posts
    364
    Plugin Contributions
    0

    help question Re: Dynamic Filter - Narrow Results By In Stock Products

    Greetings,

    Thinking it would be a good feature, I would like to add an additional "Narrow Results By Products In Stock" feature to the sidebox. Looking through the tpl_dynamic_filter.php file, I'm a bit confused as to where and how I would add this?

    Code suggestions?

    Thanks
    Experience is what you get when you don’t get what you want…

 

 
Page 62 of 81 FirstFirst ... 1252606162636472 ... LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 20
    Last Post: 23 Apr 2025, 08:49 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