Forums › Forums › Search & Filter Pro › Bad Hierarchical in taxonomy product_cat
- This topic has 21 replies, 3 voices, and was last updated 8 years ago by Ross.
-
Anonymous(Private) September 1, 2016 at 10:42 pm #56393
My english is really bad your plugin S&F is here
S&F: http://kroton.dhdinc.info/prototipo/example-page/
Another is here: http://kroton.dhdinc.info/prototipo/productos/
Please help me, only with example page. Thanks.Trevor(Private) September 2, 2016 at 4:36 am #56404Hi Ronald
You have given me the S&F page as example-page, and it has a long list of hierarchical product categories, but I have no way of knowing what that list should look like (what is child of what), because on the productos page there is no hierarchical list. Maybe there is a way to make screenshots of the category list in the wp-admin and post links to them here? That will show me what the hierarchy should look like?
Anonymous(Private) September 3, 2016 at 4:15 am #56510Hi Trevor,
I solve my problem temporally, is bad practice, but I will wait for your update with that.
file class-search-filter-taxonomy-object-walker.php:135-153
if($this->multidepth>0) { $suparent = get_term_by( 'id', $taxonomy_term->parent, 'product_cat'); $susuparent = get_term_by( 'id', $suparent->parent, 'product_cat'); if($suparent->parent==0 && $this->multidepth==3){ $this->multidepth=1; $this->multilastdepthchange = $taxonomy_term->parent; }else if(($susuparent->parent==0 && $susuparent->parent!="") && $this->multidepth==4){ $this->multidepth=2; $this->multilastdepthchange = $taxonomy_term->parent; }else if($suparent->parent==0 && $this->multidepth==5){ $this->multidepth=1; $this->multilastdepthchange = $taxonomy_term->parent; }else{ $this->multidepth--; $this->multilastdepthchange = $taxonomy_term->parent; } }
Regards.
Ross Moderator(Private) September 7, 2016 at 10:25 am #56778Hey Ronald thasnks for the updates.
Do you know a way to reliably recreate the issue – so that I may attempt to resolve this?
Thanks
Anonymous(Private) September 7, 2016 at 3:31 pm #56818Hello Ross,
Create categories with multiple sub-levels.
Example: Category->Sub-category->Sub-sub-category->Sub-sub-sub-category
Category 2->Sub-category 2->Sub-sub-category 2->Sub-sub-sub-category 2
Category 3->Sub-category 3->Sub-sub-category 3->Sub-sub-sub-category 3
and choose “checkbox” in S&F, and hierarchical mode.
Regards. -
AuthorPosts