Items are not selected
-
Hello.
Items are not filtered for some values of attribute(It is brand), but items has brand.https://prnt.sc/y9fn62 – URL has $_GET parameter, but message says, that “items not found”.
I print hook “filter_berocket_aapf_listener_taxonomies” in screen. For some reason, the array (pa_proizvoditel) is empty. In page filtered with other brand, this array has term_id of current brand.
Why is this array empty?So far I have applied this code (but It’s no good):
function filter_berocket_aapf_listener_taxonomies( $taxonomies ) { if($taxonomies['pa_proizvoditel'] && !$taxonomies['pa_proizvoditel'][0]) { $pa_proizvoditel = get_filtered_brand(); // get info for ?filters=proizvoditel[brand_name] with get_terms $taxonomies['pa_proizvoditel'][0] = $pa_proizvoditel->term_id; } return $taxonomies; }; // add the filter add_filter( 'berocket_aapf_listener_taxonomies', 'filter_berocket_aapf_listener_taxonomies', 10, 1 );This page:
https://profil21.ru/product-category/bread/mukoproseivateli/?filters=proizvoditel%5Bponimak%5D
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Items are not selected’ is closed to new replies.