Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Waiting for user confirmation] View Filter by Product Attribute

$
0
0

Hi Caridad,

Actually, I have a follow-up question, one that shouldn't be affected by my local configuration.

If you create a copy of your Bootstrap Commerce site with no changes, you will see that there is a Color product attribute defined.

Now go to Types -> Custom Fields Control, and you will see that there is an attribute_pa_color custom field control, which is not under Types control. I initially assumed that this was created by PHP in WooCommerce, hence the label indicating that it is not under Types control.

However, if you create a second product attribute through the WooCommerce interface, a custom field control will not be created for that attribute. This leaves those of us trying to learn with a little mystery. If the attribute_pa_color field control isn't created through the interface, then how was it created? Did the Bootstrap Commerce developer take some other action to create it?

Now let's go to the second part of my confusion. If you go into a View, say the Search Filter View created by you guys. Now try to add a new field to the filter. When you do this, you will see that attribute_pa_color shows up as a candidate filter field. Select this field and accept the default setup, such that you end up with this statement added to your query filter: "AND attribute_pa_color = URL_PARAM(attribute_pa_color)".

Now save everything and go to the site. Here, you will see that attribute_pa_color shows up as a query field in your parametric search interface. It seem to work perfectly re: selecting query criteria. However, if you execute a search with a value selected for color, you will see that it doesn't return anything. I suspect that this is explained by Luoy's observation above, i.e. that it is not possible to filter by product attributes due to the fact that the data is stored in an array. But if this is the case, why does the Query filter wizard present that custom field as a filter option?

Sorry to be persistent with this, but these are the sorts of mysteries/inconsistencies which I need to clarify in order to understand.

Thanks,

Wayne


Viewing all articles
Browse latest Browse all 20145

Trending Articles