Xavier
Forum Replies Created
-
Hello again!
From what I could debug, the issue is in classes\Blocks.php line 108 when you are merging arrays
$attr = array_merge($attr, $value['attrs']);
When a parent category is pre-selected, the ‘product_cat’ in $value[‘attrs’] is already set up to the parent category, so when merging, this value is kept and not replaced by the subcategory from $attr as expected
I managed to get it working by moving the merging before retrieving the new values of product_cat/product_tag:
if($value['attrs']['blockId'] == $blockId) { $attr = $this->all_blocks[$blockRaw]->get_attributes(true); $attr = array_merge($attr, $value['attrs']); $attr['queryTax'] = $taxtype == 'product_cat' ? 'product_cat' : 'product_tag'; if (json_encode(array($taxonomy))!=='[]') { if($taxtype == 'product_cat' && $taxonomy) { $attr['queryCat'] = json_encode(array($taxonomy)); } if($taxtype == 'product_tag' && $taxonomy) { $attr['queryTag'] = json_encode(array($taxonomy)); } } echo $this->all_blocks[$blockRaw]->content($attr, true); die(); }
There might be some better way to solve it, I’m no pro in php ??
Xavier
- This reply was modified 4 years, 2 months ago by Xavier. Reason: typo
Hello,
Thanks for your reply. I tried deactivating Ubermenu, which removed the JS error, but did not solve the issue with filters.
I also updated Ubermenu which also removed the JS error, but the filters are not working as well.
I do not think this is an issue with other plugins as in one case filters are working, and in the other case the filters are not working (See demo for both cases on the linked page https://dev.haras-olympe.fr/522-2/ ). Filters were working fine before updating to the last version of the pluginThanks in advance for your help,
XavierHi!
Thanks a lot, this issue with image size is solved!Thanks for the support!
It works like a charm!
Thanks a lot for the quick help ??