Zen Cart Logo
Forums / Addon Sideboxes / Dynamic Filter [Support Thread]

Dynamic Filter [Support Thread]

Views: 652,516

Results 141 to 160 of 809
27 Oct 2012, 02:34
#141
lqqkey avatar

lqqkey

New Zenner

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

Dynamic Filter [Support Thread]

can some one help me dynamic Filter mod is not working By Size: it comes up

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

http://barkingstud.com/index.php?main_page=index&cPath=19_20

27 Oct 2012, 15:56
#142
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Dynamic Filter [Support Thread]

Check your /logs folder (or /cache for Zencart version 1.3.9) for error log files.

29 Oct 2012, 09:51
#143
gowzel avatar

gowzel

New Zenner

Join Date:
Jun 2011
Posts:
41
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I installed dynamic filter on my 1.51 store yesterday, and it seems to work OK. Just been checking my usually empty logs and surprised that its very full. They are all the same and state:

[29-Oct-2012 09:32:56] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by' at line 7 :: select p.products_image, pd.products_name, p.products_quantity, 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 products p left join specials s on p.products_id = s.products_id, products_description pd, manufacturers m
where p.products_status = 1
and pd.products_id = p.products_id
and pd.language_id = '1'
and p.manufacturers_id = m.manufacturers_id
and m.manufacturers_id = '1' order by pd.products_viewed DESC order by in /home/sites/xxxxxxxxx.co.uk/public_html/store/includes/classes/db/mysql/query_factory.php on line 120

Help please as this is totally over my head
Thanks

29 Oct 2012, 13:08
#144
gowzel avatar

gowzel

New Zenner

Join Date:
Jun 2011
Posts:
41
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I guess its coming from the default_filter.php that I installed from the Dynamic Filter package. Hre are the suspect lines:

if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (isset($_GET['alpha_filter_id']) && (int)$_GET['alpha_filter_id'] > 0) {
//$alpha_sort = " and pd.products_name LIKE '" . chr((int)$_GET['alpha_filter_id']) . "%' ";
$filterid = (int)$_GET['alpha_filter_id'];
switch($filterid)
{

		case 1:
			$alpha_sort = " order by pd.products_viewed DESC";
			break;
		case 2:
			$alpha_sort = " order by p.products_price";
			break;
		case 3:
			$alpha_sort = " order by p.products_price DESC";
			break;
		case 4:
			$alpha_sort = " order by pd.products_name";
			break;
		case 5:
			$alpha_sort = " order by p.products_ordered DESC";
			break;
		case 6:
			$alpha_sort = " order by p.products_date_added DESC";
			break;
		case 7:
			$alpha_sort = " order by p.products_date_added";
			break;
	
}

} else {
$alpha_sort = " order by pd.products_viewed DESC";
$filterid = 1;
}

29 Oct 2012, 13:36
#145
gowzel avatar

gowzel

New Zenner

Join Date:
Jun 2011
Posts:
41
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

OK just noticed that before I installed this mod that the only thing in the filter by drop down box was 'items beginning with'

That is still there in the dropdown box, I dont think it should be, is it that that is causing the error?

29 Oct 2012, 14:12
#146
gowzel avatar

gowzel

New Zenner

Join Date:
Jun 2011
Posts:
41
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Also noticed that the url at top of web browser shows:

main_page=index&cPath=6&sort=&alpha_filter_id=0

when first going to a category page, from the above default_filter.php there is no id=0

When the filter by box is used then the filter_id changes to a 1 or what ever filter is selected as defined in the .php

02 Nov 2012, 10:08
#147
dan123 avatar

dan123

New Zenner

Join Date:
Apr 2008
Posts:
82
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Hi everybody!
I just installed Dynamic Filter mod but I get a bunch of errors:

Warning: array_filter() expects parameter 1 to be array, string given in /includes/modules/MYTEMPLATE/dynamic_filter.php on line 15
Warning: in_array() expects parameter 2 to be array, string given in /includes/templates/MYTEMPLATE/sideboxes/tpl_dynamic_filter.php on line 210
Warning: in_array() expects parameter 2 to be array, string given in /includes/templates/MYTEMPLATE/sideboxes/tpl_dynamic_filter.php on line 279
Warning: in_array() expects parameter 2 to be array, string given in /includes/templates/MYTEMPLATE/sideboxes/tpl_dynamic_filter.php on line 298
Warning: in_array() expects parameter 2 to be array, string given in /includes/templates/MYTEMPLATE/sideboxes/tpl_dynamic_filter.php on line 298

A lot of the latest actually.

What could be wrong because I have no idea?
Thank you!

06 Nov 2012, 05:16
#148
macnerd avatar

macnerd

New Zenner

Join Date:
Oct 2012
Posts:
13
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

SPH:

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.

I concur...

BTW, did you get that pricing thing figured out?

I'm having almost the exact opposite issue - - it works fine on All products, but really croaks when used in a category. any ideas where to look? (I'm on 1.5.0)....

07 Nov 2012, 04:16
#149
su35 avatar

su35

Zen Follower

Join Date:
Oct 2011
Posts:
168
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Thanks a_berezin.

09 Nov 2012, 10:27
#150
whot avatar

whot

New Zenner

Join Date:
Oct 2012
Posts:
13
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

How to make the filter appear above the product listing going horizontal? I am trying to place it where the stock product filter is.

Which product listing php file would I have to modify. I tried both the tpl_modules_product_listings (in template folder) and product_listing (in modules folder) and have not had luck getting it to show.

12 Nov 2012, 20:41
#151
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

We have installed the Dynamic Filter addon and think that it has great potential for our site. For some products, the filter works great and for others we have an issue. Since we are just testing functionality for our site, we have not yet added attributes to all of the products.

For example, filtering for mat boards seems to work fine. The trouble we are encountering is with wood molding (currently only 12 moldings have attributes added). Say we choose to filter by color and wish to look at the gold frames (there are 4 with attributes at this time). After applying the filter, the page comes up and says "Displaying 1 to 3 (of 3 products)" but then doesn't show any of the product information.

This same thing happens regardless of which attribute (for wood molding) that is filtered. I have searched FAQ's and forum posts for this but haven't found anyone else with a similar issue. I checked my cache for errors and the only one that comes up is "PHP warning: strlen() expects parameter 1 to be string,...". In researching this issue, it seems to not be a big deal however I did try replacement code in functions_general.php as suggested. This however did not work for me since I am using a version of this file that has been modified for Dynamic Filter.

Any help in resolving this issue would be greatly appreciated. Thanks!

w w w . f r a m i n g s u p p l i e s - s h o p . c o m

using Zen Cart v1.5.0
Linux server
PHP 5.3.14
My SQL 5.1.65-cll

AddOns
FedEx
USPS
Backup_MySQL
IH4
Avonlee Contempo Template
Dynamic Filter

13 Nov 2012, 19:21
#152
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

While continuing to research this problem, I came across a forum thread that I had not found previously.

http://www.zen-cart.com/showthread.php?194506-Dynamic-Filter-1-0-not-working-for-Options

It seems like a problem that is similar to ours. So, I have attempted to follow the advice given in this post.

I added the 'die' statement to tpl_dynamic_filter.php and went to site to get the readout. This is what came up (with database prefix removed):

**SELECT DISTINCT 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 products p LEFT JOIN specials s on p.products_id = s.products_id LEFT JOIN products_description pd on p.products_id = pd.products_id JOIN products_to_categories p2c on p.products_id = p2c.products_id JOIN products_attributes p2a on p.products_id = p2a.products_id JOIN products_options po on p2a.options_id = po.products_options_id JOIN products_options_values pov on p2a.options_values_id = pov.products_options_values_id WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '3' GROUP BY p.products_id HAVING ( FIND_IN_SET("FrameColorFamilygold", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name))))
**

As suggested, I went to phpMyAdmin and entered this information into the SQL box. It returned this message "MySQL returned an empty result set (i.e. zero rows)."

This is not the same result as the person from the other thread. Does anyone have an idea as to how I should proceed? I will continue to try what was suggested in the other thread but I'm not really sure if it applies to me since I didn't get the same result.

Also, since the filter works on some categories and not others, we tried to think of reasons why this might be. The only difference we came up with is that the categories where the filter doesn't work have an attribute where pricing by attribute is applied. We have excluded this attribute from Dynamic Filter through the configuration menu in admin so I don't think that would be the problem but since I can't come up with anything else, I just wondered.

Thanks.

14 Nov 2012, 15:34
#153
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I'm continuing to follow the instructions given in the forum thread that I mentioned in the last post but I'm still not sure how to proceed.

As suggested, I added the 'die' statement to product_listing.php (the one added by the template) to see if the number of rows returned by $listing_split is greater than zero. It came back as "I see 4".

I added another 'die' statement to product_listing.php to test the SQL statement that is generated by $listing_split. This is what I got:
**
SELECT DISTINCT p.products_model, p.products_image, pd.products_name, p.products_quantity, 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 products p LEFT JOIN specials s on p.products_id = s.products_id LEFT JOIN products_description pd on p.products_id = pd.products_id JOIN products_to_categories p2c on p.products_id = p2c.products_id JOIN products_attributes p2a on p.products_id = p2a.products_id JOIN products_options po on p2a.options_id = po.products_options_id JOIN products_options_values pov on p2a.options_values_id = pov.products_options_values_id WHERE p.products_status = 1 and pd.language_id = '1' and p2c.categories_id = '3' GROUP BY p.products_id HAVING ( FIND_IN_SET("FrameColorFamilygold", GROUP_CONCAT(CONCAT(REPLACE(po.products_options_name, " ", ""), pov.products_options_values_name)))) order by p.products_sort_order, pd.products_name limit 150**

When I put this into the SQL box in phpMyAdmin, I get this message "MySQL returned an empty result set (i.e. zero rows)."

I guess this means since the page thinks there are 4 products to show but the SQL doesn't show any that there is some kind of issue with the SQL. I don't know.

I have double checked to make sure that no files were missing from the upload of Dynamic Filter and that none of those files had been previously altered by other addons.

I will continue to plug on.

15 Nov 2012, 19:16
#154
masterrusty avatar

masterrusty

Zen Follower

Join Date:
Mar 2007
Location:
Oregon
Posts:
152
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I am setting up a new site with Zen 1.5.1. From what I can tell, your modified core files are very much different from the ver 1.5.1 files. The differences are more than just what is inside your “// bof dynamic filter x of x” and “// eof dynamic filter x of x” comments. Can you provide some guidance here?

15 Nov 2012, 21:55
#155
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

I'm still trying to solve this issue and I'm not sure where to go from here.

I have checked the assigned attributes on the site as well as in the database through phpMyAdmin. All the products that have attributes assigned show the same in both places.

Oddly, now when I apply the same filter "Gold" to the wood molding category instead of saying "Displaying 1 of 3" like it did before or "Displaying 1 of 4" like it should, it says "Displaying 1 of 2" and still doesn't show anything on the product page.

I have checked the errors in my cache and still only get "PHP Warning: strlen() expects parameter 1 to be string, array given in /includes/functions/functions_general.php on line 153". Since the forum fix I mentioned earlier did not work (it was for an unedited version of functions_general.php and Dynamic Filter changes this file), but the forum did mention that this issue was solved in 1.5.1, I downloaded the functions_general.php file from 1.5.1 and added the Dynamic Filter code to it. I don't know if that was a good idea or not but since I'm trying anything I can think of, I gave it a shot. This did not solve the filtering problem and I'm still getting the PHP warning message in my cache. Other people were getting that error with checkout and I'm getting it from filtering (timestamp is the same as when I try to filter) so I really don't know what would be causing that.

I have reverted back to the functions_general.php file that came with Dynamic Filter for v1.5.0.

I am not well-versed in php or MySQL. I don't know what else to try but would like to use Dynamic Filter. Does anyone with more knowledge on these topics have an idea of what I should try next or maybe just already have a solution to this problem.

Thanks!

16 Nov 2012, 03:57
#156
macnerd avatar

macnerd

New Zenner

Join Date:
Oct 2012
Posts:
13
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

also in 1.5...

I had a very similar issue (on the "displaying 1 of 3" etc) response, and found that it did that whenever I had products of that type in the database but set Status=0.. Apparently Dynamic Filter looks at all products, but doesn't filter by status when returning results. I did an updated to status=9 (deleted them), and this was solved... Do you have products loaded which are status=0?

On a similar yet slightly variant level, i'm continuing to get highly erratic results whenever Dynamic Filter is used on a category page..
Example: Filter by attribute type X for values 1, 2, 5, and it returns items with attribute values of 1,2,3,4,5,6 and 7.... Unknown reason.

It seems to work perfectly well AS LONG AS I'm using the filter in "all products" mode...

Is this a known issue?

16 Nov 2012, 14:38
#157
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

macnerd,

Thanks for the suggestion but all my products have a status of 1. Any other ideas?

26 Nov 2012, 17:54
#158
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

Still trying to solve this problem.

The only thing I know to go on is that we keep getting "PHP Warning: strlen() expects parameter 1 to be a string, array given in..." error. Unlike other posts that I have found on the forum, we do not get this error with shopping cart checkout, but instead when trying to filter in certain categories with Dynamic Filter.

As I mentioned earlier, I did try the fix suggested by DrByte but since that was for a clean functions_general.php file (not one changed by Dynamic Filter) and presumably would be to solve the checkout problem, not a filtering one, it did not solve our issue.

However, I have continued to look and try. I found another suggestion by DrByte to debug what may be causing the issue.

http://www.zen-cart.com/showthread.php?176804-Fixed-v1-5-1-PHP-Warning-strlen%28%29-expects-parameter-1-to-be-string/page2

This is what was noted in the myDEBUG file after applying the debug and attempting to filter in the category "wood molding":

**[26-Nov-2012 17:03:30 UTC] PHP Notice: GET param found to be array: Array
(
[0] => Gold
)
--- contents of GET: Array
(
[main_page] => index
[cPath] => 1_3
[fltFrameColorFamily] => Array
(
[0] => Gold
)

)
in ***/includes/functions/functions_general.php on line 152
**

So, to me this says that the issue is definitely with filtering in this category as it returns an array when trying to filter by color family.

I tried the fix suggested by DrByte again. This time I was more careful about placement since I have the Dynamic Filter addon. It seems to have worked. I am no longer getting the PHP Warning. However, the filter still does not work.

Any ideas from someone with more experience?

Thanks!

27 Nov 2012, 03:41
#159
sph avatar

sph

Totally Zenned

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

Re: Dynamic Filter [Support Thread]

When I first discovered the Dynamic Filter I thought it potentially the greatest customer-side plugin of all time. Now I'm not so sure. We installed it on two of my sister's main sites and one site at least is having a problem with All Products. We recently turned off All Products on that site for now.

I also sometimes notice a server/site slow-down on a large category...or All Products...as the filter apparently takes awhile to "think."

Anyway, I'll see if the status mentioned in post 5 above may affect our All Products issue.

Framegirl, yes, your filter works in one category that I saw but not the other. Can you put some Read Only attributes on a couple of products in yet another category to see if it works? Just as a means of helping trouble-shoot.

I really don't know anything about coding, but I wouldn't feel comfortable trying to apply a fix for an unrelated plugin or issue. You might try pm'ing the developer to see if he will take a look at your thread here, as he may have an idea.

Steve
prommart.com
fashion-mart.biz

PS: Your site has some other customer usability issues which you might want to post on the site Reviews thread. And if you're not using your homepage ezslider you might want to disable the jscript for that so all it's code doesn't show in view source on homepage and category pages. I put a ~ at the end of the file to disable, if not deleting.

27 Nov 2012, 14:04
#160
framegirl avatar

framegirl

New Zenner

Join Date:
Nov 2012
Posts:
12
Plugin Contributions:
0

Re: Dynamic Filter [Support Thread]

SPH,

I already tried putting read only attributes on a few products in another category as a means of trouble shooting. It worked fine. The issue seems to only be in categories that have attributes with pricing attached, even though those attributes are not ones we have available for filtering.

Thanks for the suggestion of PMing the developer and disabling the ezslider. I will work on that today.

With the usability issues, do you mean the site is hard to maneuver or that there are major issues?

Thanks.