Page 68 of 81 FirstFirst ... 1858666768697078 ... LastLast
Results 671 to 680 of 808
  1. #671
    Join Date
    Sep 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: Dynamic Filter [Support Thread]

    Hi, I am wondering if anyone can help me. I do like the dynamic filter however, it causes my manufacturer/category & alpha sort filters (built in) to not work at all. I am using zencart 1.5.1 and have winchester black template by picaflor installed. The dynamic filter works perfectly (I installed the code around the modified files manually), but now the built in filters do not work at all. I am in need of having a "category" filter otherwise I must uninstall this mod as this is crucial for my particular site. Thanks.

  2. #672
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Hi. You had given me a great suggestion a while ago about how to filter the products on my website by different food allergies: gluten free, nut free, etc. I have created an Option Name of Allergies (display-only), with Option Values of: Gluten Free, Tree Nut Free, Peanut Free, and Lactose Free. I have put the Allergies attribute on 2 products in the Snacks category.
    1) Don't Go Nuts Blueberry Blast is: Gluten Free, Peanut Free, and Tree Nut Free.
    2) Monk Pack Apple Quinoa is: Gluten Free and Lactose Free.
    I'm using the multiple checkboxes style. People might have multiple allergies, so if I check both Gluten Free and Lactose Free, I would expect that only the Monk Pack Apple Quinoa product would be returned, since it is the only product that has both options set. However, it is returning both of the products. I think it must be returning all products that have either of these options set, but instead, I want it to return only the products that have both of these options set. Is there any way for me to get that to happen?

    In case you want to see it in action, I have this running on my test site, test "dot" kosher4health "dot" com. You can go to the snacks category to see it work.

    Thanks very much for any help with this! It's a great mod, and I know it will be a great addition to my site.

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

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Quote Originally Posted by earth-friendly View Post
    Hi. You had given me a great suggestion a while ago about how to filter the products on my website by different food allergies: gluten free, nut free, etc. I have created an Option Name of Allergies (display-only), with Option Values of: Gluten Free, Tree Nut Free, Peanut Free, and Lactose Free. I have put the Allergies attribute on 2 products in the Snacks category.
    1) Don't Go Nuts Blueberry Blast is: Gluten Free, Peanut Free, and Tree Nut Free.
    2) Monk Pack Apple Quinoa is: Gluten Free and Lactose Free.
    I'm using the multiple checkboxes style. People might have multiple allergies, so if I check both Gluten Free and Lactose Free, I would expect that only the Monk Pack Apple Quinoa product would be returned, since it is the only product that has both options set. However, it is returning both of the products. I think it must be returning all products that have either of these options set, but instead, I want it to return only the products that have both of these options set. Is there any way for me to get that to happen?

    In case you want to see it in action, I have this running on my test site, test "dot" kosher4health "dot" com. You can go to the snacks category to see it work.

    Thanks very much for any help with this! It's a great mod, and I know it will be a great addition to my site.
    I am on vacation right now, but as soon as I'm back (2 asks)I will take a look. Or else please remind me.

  4. #674
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Quote Originally Posted by earth-friendly View Post
    Hi. You had given me a great suggestion a while ago about how to filter the products on my website by different food allergies: gluten free, nut free, etc. I have created an Option Name of Allergies (display-only), with Option Values of: Gluten Free, Tree Nut Free, Peanut Free, and Lactose Free. I have put the Allergies attribute on 2 products in the Snacks category.
    1) Don't Go Nuts Blueberry Blast is: Gluten Free, Peanut Free, and Tree Nut Free.
    2) Monk Pack Apple Quinoa is: Gluten Free and Lactose Free.
    I'm using the multiple checkboxes style. People might have multiple allergies, so if I check both Gluten Free and Lactose Free, I would expect that only the Monk Pack Apple Quinoa product would be returned, since it is the only product that has both options set. However, it is returning both of the products. I think it must be returning all products that have either of these options set, but instead, I want it to return only the products that have both of these options set. Is there any way for me to get that to happen?

    In case you want to see it in action, I have this running on my test site, test "dot" kosher4health "dot" com. You can go to the snacks category to see it work.

    Thanks very much for any help with this! It's a great mod, and I know it will be a great addition to my site.
    Design75, no need to look into this issue. I found a way to solve this problem.
    I created each of these allergies as a separate Option Name, and each Option Name has a single Option Value.
    So I have an Option Name: Gluten Free, and that Option has 1 Option Value, which I also call Gluten Free.
    Then I have another Option Name: Peanut Free, and that Option has 1 Option Value, which I call Peanut Free, and so on.
    Now, if you want to find products that are both Gluten Free and Peanut Free, you click on both checkboxes, and it does it correctly.
    Previously, I just had one Option Name, Allergies, and a bunch of different Option Values for that option (Gluten Free, Peanut Free, etc.) When I clicked on 2 different option values, it found the products that were either Gluten Free or Peanut Free. I can understand that in some cases you might want this behavior. For example, if you have clothing that comes in different colors, you might want to find all clothes that are either red or purple. But in my case, I want to find products that are both Gluten Free and Peanut Free, so this solution seems to work well for that.
    I fixed up the styling so that the option names don't display, and I tightened up the spacing.
    I have implemented this on my live site, so you can see it working there if you'd like.
    http://www.kosher4health.com .
    Thanks again for a great mod! I think this will be very helpful for my customers.

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

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    glad you figured it out. I am sure it will help others.

  6. #676
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    I have discovered a problem.
    If you go to my website, http://www.kosher4health.com, and go to the "Snacks" category, and then click on the checkbox for "Gluten Free", and then at the top right, instead of going to the next page, click "View All",
    then I get: "There are no products to list in this category." even though there are products.
    There is a debug file, and it has a bunch of stuff, but I think the main thing is that it is trying to divide by zero in split_page_results.php, on line 100. (I can give you the complete debug file if that will be helpful.)
    This is line 100:
    Code:
     $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);
    This means that
    Code:
    $this->number_of_rows_per_page
    is zero.
    Higher up in the file we have:
    Code:
    $this->number_of_rows_per_page = $max_rows;
    and a little above that we have:
    Code:
        if ($page == 'all') {
          $this->page_all = true;
          $override = $db->Execute($query);
          $max_rows = $override->RecordCount();
        }
    So it looks like the query is not returning any results.

    I'm not sure where I should go from here. I could work in my test site, and turn on debugging for sql statements. Or, does anyone have any ideas about what might be going wrong and how to fix it?
    I am using zen-cart 1.5.5a, and the Winchester Responsive template.
    I did my best to modify split_page_results.php for this mod, but there were some significant differences between this file and my version, probably because of both 1.5.5a and Winchester Responsive.
    Thanks in advance for any help with this issue!

  7. #677
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Quote Originally Posted by earth-friendly View Post
    I have discovered a problem.
    If you go to my website, http://www.kosher4health.com, and go to the "Snacks" category, and then click on the checkbox for "Gluten Free", and then at the top right, instead of going to the next page, click "View All",
    then I get: "There are no products to list in this category." even though there are products.
    There is a debug file, and it has a bunch of stuff, but I think the main thing is that it is trying to divide by zero in split_page_results.php, on line 100. (I can give you the complete debug file if that will be helpful.)
    This is line 100:
    Code:
     $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);
    This means that
    Code:
    $this->number_of_rows_per_page
    is zero.
    Higher up in the file we have:
    Code:
    $this->number_of_rows_per_page = $max_rows;
    and a little above that we have:
    Code:
        if ($page == 'all') {
          $this->page_all = true;
          $override = $db->Execute($query);
          $max_rows = $override->RecordCount();
        }
    So it looks like the query is not returning any results.

    I'm not sure where I should go from here. I could work in my test site, and turn on debugging for sql statements. Or, does anyone have any ideas about what might be going wrong and how to fix it?
    I am using zen-cart 1.5.5a, and the Winchester Responsive template.
    I did my best to modify split_page_results.php for this mod, but there were some significant differences between this file and my version, probably because of both 1.5.5a and Winchester Responsive.
    Thanks in advance for any help with this issue!
    I have sort of figured this out, but not sure if my solution makes total sense.
    The file I worked with is includes/modules/MYTEMPLATE/dynamic_filter.php
    The issue seems to be in the HAVING part of the query:
    Code:
     $having .= ' FIND_IN_SET("' . $key . addslashes($value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
    When I go to my website and click on the snacks category,
    http://www.kosher4health.com/snacks-c-1.html
    and then I click on "Gluten Free" to filter by that,
    everything works fine. The value of $having at that point is:
    Code:
    HAVING ( 
    FIND_IN_SET("GlutenFreeGluten Free", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))
    However, if I then click on the "View All" link in the top right (instead of going to a particular page number), it says there are no products to list in this category. The query that is being run returns no records. And, the value of $having at that point is:
    Code:
    HAVING ( 
    FIND_IN_SET("GlutenFreeGluten%20Free", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))
    So in other words, the option value that it is searching for in the database, after clicking on "Gluten Free", is "Gluten Free".
    But after clicking on "View All", the option value that it is searching for is "Gluten%20Free".

    I also noticed that the urls are a bit strange:
    After clicking on the checkbox for "Gluten Free", the url is:
    Code:
    http://www.mydomainname.com/snacks-c-1.html?main_page=index&cPath=1&fltGlutenFree%5B%5D=Gluten+Free
    and after clicking on "View All", the url is:
    Code:
    http://www.mydomainname.com/snacks-c-1.html?fltGlutenFree%5B%5D=Gluten%2520Free&sort=20a&page=all
    It looks like extra encoding happens during this process.

    The solution I came up with in my test site is to remove both a space and "%20" in $value, and then in the db search, also remove spaces from the products_options_values_name, in the same way that spaces are being removed from the search on products_options_name.
    So, I replaced :
    Code:
    $having .= ' FIND_IN_SET("' . $key . addslashes($value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
    with
    Code:
              $having_value = str_replace(" ","",$value);
              $having_value = str_replace("%20","",$having_value);
              $having .= ' FIND_IN_SET("' . $key . addslashes($having_value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), REPLACE(pov.products_options_values_name, " ", ""))))'
    And now, after clicking on the checkbox for Gluten Free, the value of $having is:
    Code:
    HAVING ( 
    FIND_IN_SET("GlutenFreeGlutenFree", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), REPLACE(pov.products_options_values_name, " ", ""))))
    and after clicking on "View All", the value of $having is:
    Code:
    HAVING ( 
    FIND_IN_SET("GlutenFreeGlutenFree", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), REPLACE(pov.products_options_values_name, " ", ""))))
    I haven't put this on my live site yet. I was hoping that perhaps Design75, you could please look it over to make sure it is a reasonable change.
    Also, I wonder if anyone else has had this problem, or if it has to do with the template I am using.
    Thanks in advance for your help with this!!

  8. #678
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Just to let you know, the changes described above didn't completely solve the problem. I found that if I filtered by "Gluten Free", and then clicked to go to page 2, then to page 3, it would still double encode the space in "Gluten Free" in the url, and I would end up with finding no results.
    The solution I came up with had the following changes:
    1) In includes/modules/mytemplate/dynamic_filter.php
    Replace
    Code:
     $having .= ' FIND_IN_SET("' . $key . addslashes($value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))';
    with
    Code:
     // BOF LEFP fix to remove spaces before searching for attribute values
             $having_value = str_replace(" ","",$value);
             $having_value = str_replace("%20","",$having_value);
               $having .= ' FIND_IN_SET("' . $key . addslashes($having_value) . '", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), REPLACE(pov.products_options_values_name, " ", ""))))';
    // EOF LEFP fix
    2) In includes/templates/mytemplate/sideboxes/tpl_dynamic_filter.php
    Right before:
    Code:
     if ($attributes->fields['products_options_values_name'] != $savValue)
    add:
    Code:
    // BOF LEFP fix to remove spaces before searching for attribute values
             $value_without_spaces = str_replace(" ","",$attributes->fields['products_options_values_name']);
    Then, everywhere within the "if" statement, replace
    Code:
    $attributes->fields['products_options_values_name']
    with
    Code:
    $value_without_spaces
    EXCEPT where we are actually printing it out, because we want "Gluten Free" to show up with the space on the page:
    Code:
    htmlspecialchars(html_entity_decode($attributes->fields['products_options_values_name'], ENT_QUOTES)) .' 
    Also, replace
    Code:
     $savValue = $attributes->fields['products_options_values_name'];
    with
    Code:
     $savValue = $value_without_spaces;
    Note: I am using the single checkbox method, so I only made those changes in my file, so I'm not sure if the changes are identical for the other methods.
    Anyway, those are the changes I made, and it seems to work ok. I have it on my live site now, http://www.kosher4health.com. I'd love to hear comments about whether or not this change is ideal. I hope this helps someone
    I'm still not sure if this was a problem for everyone, or just for me because of the template I am using. Perhaps everyone else has single-word attribute values, and I am the first person to have an attribute value with a space?

  9. #679
    Join Date
    Aug 2016
    Location
    Greece
    Posts
    3
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    Good afternoon, and hello to all zen-guys! im new to zen-cart and one of my clients e-shop is on zen-cart 1.5.4. with the megashop template installed on it. I can see that the dynamic filter works on the special and feature page but it does not seem that it works on the categories and sub-category pages as requested. Can anyone help? the sites url is : http://eudatahost.com/heliland/catal...ain_page=index Thanxs in advance,

  10. #680
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Dynamic Filter - Left Col Boxes Misaligned

    I'm playing with this mod on my WAMP test site, zc 1.5.5a with Responsive Sheffiled Blue and many mods.

    On the install.sql - the big chunk at the beginning of this file installs via phpMyAdmin. But I get error on the last bit for zencart 1.5 mods.

    Specifically, the values for main_page_parms and sort order.

    Code:
    DELETE FROM zen_admin_pages WHERE page_key='configDynamicFilter';
    INSERT INTO zen_admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configDynamicFilter','BOX_CONFIGURATION_DYNAMIC_FILTER','FILENAME_CONFIGURATION',CONCAT('gID=',@cid), 'configuration', 'Y', @cid);
    My zen_config_group installed from the first part of sql has config group id and sort order of 2828. I tried substituting those values in place of the @cid, to no avail.

    There are no extra columns in my zen_admin_pages.

    Initial error msg was those values (as in install.sql) can't be null. Attempt to insert the 2828 gives syntax error.

 

 
Page 68 of 81 FirstFirst ... 1858666768697078 ... 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