Forums / Addon Sideboxes / Dynamic Filter [Support Thread]

Dynamic Filter [Support Thread]

Views: 653,483

Results 121 to 140 of 809
24 Aug 2012, 2:09 AM
#121
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Dynamic Filter [Support Thread]

Perhaps.

But since the problem doesn't happen with original code, the most efficient way to find out where your specific problem exists is to do the comparison.
Thankfully automated tools like WinMerge make it simpler.

.
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.

24 Aug 2012, 7:33 AM
#122
boby avatar

boby

New Zenner

Join Date:
Sep 2010
Posts:
21
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I have made a lot of changes and added a lot of addons to my sites (multisite addon also), from 2 or 3 years,
The update is made by someone who I found at freelancers site in india (I haven't a good experience with that),

So should I check all changes and for that I must remove and reinstalle each addon !

thanks

24 Aug 2012, 7:34 AM
#123
boby avatar

boby

New Zenner

Join Date:
Sep 2010
Posts:
21
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I have made a lot of changes and added a lot of addons to my sites (multisite addon also), from 2 or 3 years,
The update is made by someone who I found at freelancers site in india (I haven't a good experience with that),

So should I check all changes and for that I must remove and reinstalle each addon !

thanks

24 Aug 2012, 4:52 PM
#124
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

If you upgraded to 1.5.0 from any other version, you need to check EVERY add-on because some are not yet compatible. You probably should double check them all anyway but absolutely if you moved to 1.5.

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

27 Aug 2012, 5:56 AM
#125
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I ended up uninstalling the Dynamic Filter completely and reverting the functions_general.php file back to the zen-cart original because my CPU usage went through the roof. It was up to 88% yesterday. I'm lucky my hosting company is being really understanding and letting me sort through the trouble. If it isn't the DF mod that drove it up then it will most likely be something in IH4 because those were the last two mods installed when the CPU usage spiked. :blink:

Any other ideas about what it could be are greatly appreciated.

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

27 Aug 2012, 7:37 AM
#126
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Dynamic Filter [Support Thread]

CPU spikes are often caused by a "while" loop that's iterating through database results without specifying a MoveNext call ... resulting in an endless loop that spins out of control until the server kills it for running too long or killing CPU.

.
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.

28 Aug 2012, 5:52 AM
#127
shartlesville avatar

shartlesville

New Zenner

Join Date:
Jul 2009
Location:
Roswell, NM, USA
Posts:
103
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

DrByte:

CPU spikes are often caused by a "while" loop that's iterating through database results without specifying a MoveNext call ... resulting in an endless loop that spins out of control until the server kills it for running too long or killing CPU.

Thank you, I just wish I understood what that means, :blush:.

After removing the DF mod the cpu usage dropped back down to 3% so something in that mod was mis-configured. I think I misunderstood part of the directions and installed an extra jscrip.jquery file (it said to download it and rename it...). I'm just guessing though.

I re-installed IH4 and it seems to not be affecting the CPU negatively at all.

I'll live with the default filter for the time being. :wink:

Thank you!

Blessings,
Krisann

I donate to the Zen Team do you?
My current project: BestSewingDeals.com;

11 Sep 2012, 9:00 PM
#128
evan_ausman avatar

evan_ausman

New Zenner

Join Date:
Jan 2011
Posts:
5
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

We have a customized Zen Cart 1.5 web site. We are trying to add the Dynamic Filter plugin.
From the following URL:
http://www.zen-cart.com/downloads.php?do=file&id=1361

We managed to get the filter choices (Price and Color) to be shown in the left sidebox, but the products were not displayed in the main part of the window.

The code in the 'template file overrides\includes\index_filters\MY_TEMPLATE' folder, in the file 'default_filter.php' does not display any products and presents the following error where the products would be listed:

WARNING: An Error occurred, please refresh the page and try again.


We pasted the code for 'we show them all' from the existing 'default_filter.php' file into the new 'default_filter.php' file and got the products to list, but the filtering does not effect the list. Apparently the 'show them all' code is the only code that is being executed because of the filter conditions are not being met.
I have a link to a short video showing the product list does not change when the filter settings are changed.
http://screenr.com/B3J8

Below is the code that was pasted into our 'default_filter.php' file.
Below that is the 'We show them all' code that works from the old 'default_filter.php' file.

  • We want to get the filtering code to work with the appropriate fields so that it references the field list and performs the sql query that shows the items that fit the filter selection.

Please provide a code fix so we can get the filter to work.

Filter code that does not work on our site.

// bof dynamic filter 2 of 2
if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']) || isset($_GET[DYNAMIC_FILTER_PREFIX . $categoryGroup])) {
// We are asked to show only a specific category
$listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id,
p.manufacturers_id, m.manufacturers_name, p.products_price, p.products_tax_class_id, pd.products_description,
if(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = 1, s.specials_new_products_price,
p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
p.products_qty_box_status";

  $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
   " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
   " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
   " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
   " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
   ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
   (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

  $listing_sql .= " WHERE p.products_status = 1" .
   " AND m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
   " AND pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
   $filter .
   " GROUP BY p.products_id " .
   $having .
   $alpha_sort;
} else {

// We show them all
$listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id,
p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as
specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price,
p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status";

  $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
   " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
   " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
   " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
   ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
   (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

  $listing_sql .= " WHERE p.products_status = 1
   and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
   and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'" .
   $filter .
   " GROUP BY p.products_id " .
   $having .
   $alpha_sort;
}

} else {
// show the products in a given category
if (isset($_GET['filter_id']) && zen_not_null($_GET['filter_id']) || isset($_GET[DYNAMIC_FILTER_PREFIX . $manufacturerGroup])) {
// We are asked to show only specific manufacturer
$listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id,
p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as
specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price,
p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status";

  $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
   " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
   " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
   " LEFT JOIN " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id" .
   " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
   ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
   (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

  $listing_sql .= " WHERE p.products_status = 1" .
   " and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'" .
   " and p2c.categories_id = '" . (int)$current_category_id . "'" .
   $filter .
   " GROUP BY p.products_id " .
   $having .
   $alpha_sort;
} else {

// We show them all
$listing_sql = "SELECT DISTINCT " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id,
p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1,
s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price,
p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
p.products_qty_box_status";

  $listing_sql .= " FROM " . TABLE_PRODUCTS . " p" .
   " LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id" .
   " LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id" .
   " JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id" .
   ($filter_attr == true ? " JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " p2a on p.products_id = p2a.products_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS . " po on p2a.options_id = po.products_options_id" .
   " JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on p2a.options_values_id = pov.products_options_values_id" .
   (defined('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK') ? " JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " p2as on p.products_id = p2as.products_id " : "") : '');

  $listing_sql .= " WHERE p.products_status = 1
   and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
   and p2c.categories_id = '" . (int)$current_category_id . "'" .
   $filter .
   " GROUP BY p.products_id " .
   $having .
   $alpha_sort;
}

}
// eof dynamic filter 2 of 2

The working code for the 'We show them all' that is from the 'good' default_filter.php (file without the dynamic filter):

// We show them all
$listing_sql = "select " . $select_column_list . " p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$alpha_sort;

Thank you

25 Sep 2012, 5:26 PM
#129
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Dynamic Filter on two zencarts:

  1. http://www.promdressesglobal.com/products_all.html
    zc 1.5.0
    All products shows minimum price at $20. This looks okay, except we don't have anything priced that low.

  2. http://www.findmypromdress.com/all-products/
    zc 1.3.9h
    All products shows minimum price at $178. But this is not correct, as we have products at $99 and down to $69.

Now, our Quickship on this site does show lower prices, down to $58:

http://www.findmypromdress.com/quickship-dresses-26/view-all-quickship-dresses-330/

$58 is more accurate, although we don't know where the filter is getting the $58

Questions:

  1. Why the price difference in the filter results between Quickship and All Products?

  2. How or where is the filter getting it's lowest price? (since we do not have prices that low.)

Thanks.

Steve
prommart.com

1 Oct 2012, 4:53 AM
#130
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

EDIT: Okay, we found the $20 price on the zencart 1.5 site where the filter works okay.

Still a problem on our main site - zencart 1.3.9h - where All Products is not picking up the lowest prices on the site:

http://www.findmypromdress.com/all-products/

Still shows lowest price as $178, but we have products at $69 as shown here:

http://www.findmypromdress.com/quickship-dresses-26/view-all-quickship-dresses-330/

Our theory: price conscious customers will look at All Products then look for their price range in the filter, but it doesn't show lowest prices.

Thanks for any help.

Steve
prommart.com

2 Oct 2012, 8:49 PM
#131
darion avatar

darion

Zen Follower

Join Date:
Sep 2012
Posts:
169
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hello,

Here is my question I have just installed the dynamic filter plug-in which is fine the question is this how do I page over ride so that the left column or right column show on the pages with products but not the home page itself. Please help me with this!!

Id like to have no columns on home page but still have columns on the other pages!!

If you need to see the site:mysterydrawer.com (please be advised this is an adult products site)

Thank you for all your help and responses!!

2 Oct 2012, 8:58 PM
#132
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Dynamic Filter [Support Thread]

Have a look at the documented file tpl_main_page.php

Make a copy for your template

You would then from your admin enable left & right columns and disable them for the home page in that file

Zen-Venom Get Bitten

2 Oct 2012, 9:21 PM
#133
darion avatar

darion

Zen Follower

Join Date:
Sep 2012
Posts:
169
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Im sorry Im not seeing the code Im needing to do this function!!

2 Oct 2012, 9:57 PM
#134
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Dynamic Filter [Support Thread]

/includes/templates/template_default/common/tpl_main_page.php
Copy to your custom template folder.
The comments at the top of the file describe numerous possible customized behavior tweaks. You may have to mix & match parts of the instructions for your particular situation. Look for $flag_disable_left etc.

2 Oct 2012, 9:59 PM
#135
darion avatar

darion

Zen Follower

Join Date:
Sep 2012
Posts:
169
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Nevermind I found out what was wrong thank you for your help Kobra!! Thank you for your help as well gjh42!!

2 Oct 2012, 10:09 PM
#136
darion avatar

darion

Zen Follower

Join Date:
Sep 2012
Posts:
169
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Have a question about the dynamic filter now it seems it is only filtering by price what do I need to do to setup other options. It does not say in the instructions!! Thanks

17 Oct 2012, 10:50 PM
#137
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

.......

17 Oct 2012, 10:55 PM
#138
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Found some other issues with the filter.

Issue#1 - It does not appear to be working correctly from the All Products link.

We sell prom dresses. Customers will want to shop by style and color, not necessarily within a category of Designer. But when you click on All Products link and choose a read only attribute it does not bring up all the products that are assigned that attribute.

Example:
Go here and click on Many Beads or Sequins under By Other Features:
http://www.promdressesglobal.com/products_all.html (it takes quite a while to come up which is also a speed problem)

This is the result:
http://www.promdressesglobal.com/products_all.html?fltOtherFeatures%5B%5D=Many+Beads+or+Sequins&disp_order=6

Only 24 products come up. There should be 206 products which is the number of products that include this attribute. Here is one that does not come up on the filter:
http://www.promdressesglobal.com/short-sequin-homecoming-dress-flirt-pf4121-p-12618.html (even thought you can see on the product page it does include this attribute.

Another thing I noticed is if you use the drop down at the top to Sort by Product, you still get on 24 products, but different products.
http://www.promdressesglobal.com/products_all.html?fltOtherFeatures%5B%5D=Many+Beads+or+Sequins&disp_order=1

It appears that it is limiting to 24 products on this specific attribute on the filter. When I tested other attributes the number of products limit was different. So it's not just globally limiting All Products to 24 on the Filter. The limit changes depending on the Filter tested.

Issue# 2 - I noticed that when clicking on the filter High Low under By Length: section, it give the option to also choose Straight, A-Line and Fit and Flare under section By Skirt:
These are mutually exclusive. It can't be both High Low AND Straight. So it goes to a no products page. It really should not give the option to choose when there is no applicable product.

I hope you can help with this issue because I really like the filter but would like to use it on the All Products page.

I am actually the sister of SPH, the previous post.

Thank you,
Nancy Fallat

18 Oct 2012, 2:01 AM
#139
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Filter [Support Thread]

I see 6 $69.00 products on the first link ...

I see 6 $69.00 products on the second link ...

Did you fix this?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Oct 2012, 3:29 AM
#140
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I thought I did by manipulating the Free price to show as $1 (set as something like $.50) to show from $1. But now I see All Products no longer shows lowest prices; perhaps due to my sister's filter to show lowest to highest price...don't know.

To clarify, we're speaking about the By Price filter in the left side-box, not our header3 banner.

Anyway, we're having further problem with the Dynamic Filter and All Products, as my sister recently posted here:

http://www.zen-cart.com/showthread.php?201244-Dynamic-Filter-Problem-with-All-Products

It might be helpful if all Dynamic Filter posts could be in one support thread to easier locate and see any other issues and solutions.

Steve
prommart.com