Zen Follower
- Join Date:
- Aug 2006
- Posts:
- 127
- Plugin Contributions:
- 0
Dynamic Filter [Support Thread]
Is it possible to sort the attribute options alphabetically?
Thanks in advance.
Views: 652,529
Zen Follower
Is it possible to sort the attribute options alphabetically?
Thanks in advance.
Totally Zenned
Justrimless:
Is it possible to sort the attribute options alphabetically?
Thanks in advance.
Yes, use the same query, and find ```php
ORDER BY po.products_options_name, pov.products_options_values_sort_order";
replce this with```php
ORDER BY po.products_options_name, pov.products_options_values_name";
New Zenner
Design75:
Hi Design75,
I just wondered if it was possible to change the default attributes on the actual product page based on the selected attributes in the dynamic filter? So if for example they filter by colour "red" but the product comes in multiple colours, red could somehow be the default option on the product page attribute dropdown (to save the customer having to then pick it or worse ordering the wrong colour by accident!) The site is using zc 1.39 and latest dynamic filter plugin.
Thanks.
Totally Zenned
bluefusionweb:
Hi Design75,
I just wondered if it was possible to change the default attributes on the actual product page based on the selected attributes in the dynamic filter? So if for example they filter by colour "red" but the product comes in multiple colours, red could somehow be the default option on the product page attribute dropdown (to save the customer having to then pick it or worse ordering the wrong colour by accident!) The site is using zc 1.39 and latest dynamic filter plugin.
Thanks.
No doubt it can be done, but it will take a lot of custom coding and time. A the moment I have to much (paid) projects going to make time for trying to make this.
New Zenner
Hello, I am using ZenCart 1.5.4 and installed the latest version of the Dynamic Filter Module Version 1.3. I have never used the module on this shopping cart so it is a clean install.
The Module works great but keep getting and error in my debugging log. When I click on the Manufacturer name or Price in "Narrow Your Results" I receive the following error: [03-Oct-2015 13:28:11 America/New_York] PHP Warning: trim() expects parameter 1 to be string, array given in /home21/webserver/public_html/shopfolder/includes/functions/functions_general.php on line 63].
I've looked through the functions_general.php and the files in the Dynamic Filters and cannot figure out what is wrong, especially since Dynamic Filters Version 1.3 eliminated the functions_general.php file.
Any help would be greatly appreciated!
Administrator
It's cases like this where the myDEBUG Backtrace (https://www.zen-cart.com/downloads.php?do=file&id=1879) plugin will help. Once installed, it will cause additional information to be included in the log file, indicating who called who ... so you'll know which line of which module called functions_general's line 63, and you'll have the actual source of the issue.
New Zenner
Thank you for showing me this module.
After looking through the error log, I was able to figure out if I comment out the following from the tpl_header_currencies.php around line 19, the Dynamic Filter will work without any errors.
I do not know if it is supposed to be like that or not but it works for me right now.
:
$hidden_get_variables = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
// Comment this out -> $hidden_get_variables .= zen_draw_hidden_field($key, $value);
}
}
After going through the files I found I was able to comment
Totally Zenned
upshur57:
Thank you for showing me this module.
After looking through the error log, I was able to figure out if I comment out the following from the tpl_header_currencies.php around line 19, the Dynamic Filter will work without any errors.
I do not know if it is supposed to be like that or not but it works for me right now.
:
$hidden_get_variables = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
// Comment this out -> $hidden_get_variables .= zen_draw_hidden_field($key, $value);
}
}
>
>
>
>
> After going through the files I found I was able to comment
At the the moment I do not see what this has to do with the Dynamic filter module. The file "tpl_header_currencies.php" is not used by this mod. The line you mentioned should denfinitely not be commented. I is needed for the cart to function properly.
New Zenner
This sounds like a great mod. I'm trying to figure out if it would be appropriate for my needs.
I am working on a new site which will contain different categories of food products.
I'd like to allow the user to be able to see all the gluten-free products, and even better, to see all gluten-free products in a particular category. So I'm wondering if it makes sense to just create a new category called "Gluten-Free". But it seems to make more sense to use the idea of a filter, and for the user to be able to click on the "Gluten-Free" filter whenever they see a list of products, so it would only show them the products in that category, or from those search results, etc., that are gluten-free.
I have never used attributes, and I don't have any products with attribute variations. This would be more of a boolean. Either a product is gluten-free or it is not. I might come up with other filters, like nut-free.
So, does it make sense to use this mod to accomplish that? How would I do that? Would I create an attribute called "Gluten-Free", put it on all the products, and set it to "true" when a product is gluten-free? Does that make sense? Is that going to force the user to do anything special when they want to add a product to their shopping cart? i.e., will they have to choose a value for this attribute? Or will they see something additional show up because this attribute is there? I'd really like to just set this attribute to true or false for each product, and not have it show up in a confusing way when the user views the product, but I would like the user to be able to filter on all products that have this attribute set to true. Does that make any sense? Can attributes be used like that, and would this mod make that possible?
Thanks in advance for any help with this.
Totally Zenned
earth-friendly:
This sounds like a great mod. I'm trying to figure out if it would be appropriate for my needs.
I am working on a new site which will contain different categories of food products.
I'd like to allow the user to be able to see all the gluten-free products, and even better, to see all gluten-free products in a particular category. So I'm wondering if it makes sense to just create a new category called "Gluten-Free". But it seems to make more sense to use the idea of a filter, and for the user to be able to click on the "Gluten-Free" filter whenever they see a list of products, so it would only show them the products in that category, or from those search results, etc., that are gluten-free.I have never used attributes, and I don't have any products with attribute variations. This would be more of a boolean. Either a product is gluten-free or it is not. I might come up with other filters, like nut-free.
So, does it make sense to use this mod to accomplish that? How would I do that? Would I create an attribute called "Gluten-Free", put it on all the products, and set it to "true" when a product is gluten-free? Does that make sense? Is that going to force the user to do anything special when they want to add a product to their shopping cart? i.e., will they have to choose a value for this attribute? Or will they see something additional show up because this attribute is there? I'd really like to just set this attribute to true or false for each product, and not have it show up in a confusing way when the user views the product, but I would like the user to be able to filter on all products that have this attribute set to true. Does that make any sense? Can attributes be used like that, and would this mod make that possible?Thanks in advance for any help with this.
I think the easiest would be to set a read only attribute, because the entities are not real optional choices. First make attribute name like "allergies". Next add value like glutenfree and nut free.
Add these to the designated products.
In the front end the you will be presented a new choice in the filter box called allergies. Depending on the settings you can choose one or multiple attributes.
If you do not want to show the read only attribute in the product description, you can hide them using css
New Zenner
Thanks very much, Design75! This sounds like a great suggestion, and now I understand how attributes can be used here. I will try this.
New Zenner
Apologies if this is already covered here (tried searching for a while and not found anything)....but is there an easy way to have this filter display above the search results etc rather than in a side box? I have sideboxes disabled for the site I am working on! Cheers
Totally Zenned
fobes77:
Apologies if this is already covered here (tried searching for a while and not found anything)....but is there an easy way to have this filter display above the search results etc rather than in a side box? I have sideboxes disabled for the site I am working on! Cheers
No, the current version of the module does not. I started work on a centered box some time ago, but due to a lack of time, caused by paying customers :smile:. I have not had the time to finish it.
New Zenner
Ahh thanks! ...good to hear you are getting paid.
I'm trying to format the Sideboxes position / layout now....hopefully that will be a nice work around. Cheers
Zen Follower
I'm running zc 1.3.9 and I'm considering doing the big upgrade to 1.5 to be more compatible with mods like this.
Can I customize the attribute filters by category? For example, one category will have diameter, finish, and length, while another category will have grade and height.
Totally Zenned
fakeDecoy:
I'm running zc 1.3.9 and I'm considering doing the big upgrade to 1.5 to be more compatible with mods like this.
Can I customize the attribute filters by category? For example, one category will have diameter, finish, and length, while another category will have grade and height.
The are filters determined by the products in a category.
Zen Follower
Design75:
The are filters determined by the products in a category.
I'm not sure what you're trying to say... Does it grab all the attribute values of all products in a category and list those in the filters organized by option name? Does that go for dropdowns, checkboxes, everything else? Is there any way to exclude some?
Totally Zenned
fakeDecoy:
I'm not sure what you're trying to say... Does it grab all the attribute values of all products in a category and list those in the filters organized by option name? Does that go for dropdowns, checkboxes, everything else? Is there any way to exclude some?
Sorry for the late reply.
Yes it grabs all the attribute for the products in a category, except for download, and text attributes. The representation of the filter can be controlled through the admin settings. This is also the place where you can enter the id's of the attributes you want to exclude.
Zen Follower
When I tried to install the SQL patch, I received the following error, do you happen to know what I can do to fix this?
Succes 9 statements processed.
Foutmelding ERROR: adding "configuration_key" "" wasn't possible because it already exists.
Foutmelding ERROR: adding "configuration_key" "" wasn't possible because it already exists.
Foutmelding ERROR: adding "configuration_key" "" wasn't possible because it already exists.
Waarschuwing Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
Zen Follower
nobody? :blink:
Fields marked required must be completed.
Tell staff why this post should be reviewed.