PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Product Filters in Category Page using AVADA

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi, I have an AVADA woocommerce site and i have created a layout where i have placed woof shortcode and a woof_products shortcode. While I am selecting a top level category (though a link on the menu) when the page opens the products are not from that category or the child categories of that. Also when i select a chid category from the product filter, it filters correctly the products but the rest of the categories of the same level dissapear and i have to clear the filter to see them again. I want that level categories (from the top level in the URL) to always be visisble and i want only the other filters (attributes) to be hidden depending on the category i select and whether the products displayed have such attributes or not. How can i do that?

Hello Jalev

To clear details please create short video where I can see link of the site, what you do and wjat is wrong from your point of view visually. You can do it with exact linkg to the issue and by set of screenshots

Hi here is a product category page https://staging.geyer.gr/cat/labtires/ (to see the page you have to login with the credentials I have given in the private data). The subcategories on the left side are correct as they are the subcategories of the parent category labtires (slug). The product on the right are not correct though as they are just all the products of the website.

Correct Categories and Attributes filter, wrong products on the product grid

When you click on a subcategory the products on the right are filtered correclty,

 

Products come correctly on the grid, attribute filter was wrongly repalced by categories filter

 

but when you come to the top level categories via the URL or clicking a product category here https://staging.geyer.gr/products/ (not all categories have a link at the moment) it doesn't filter the products correctly.

Additionally when i click the subcategory, while i have a shortcode under the subcategories that displays watt product attribute, it comes with subcategories again.

What i want to achieve is to click in any category from the main products page https://staging.geyer.gr/products/, have the proper subcategories of the top level category i clicked (it works at the moment), have the top level category products on the right (not working until you firther click a subcategory) and have product filters by attributes depending on the category and auto hiding when they are empty.

Here is the products shortcode [woof_products taxonomies="product_cat:current" dynamic_taxonomies="1" is_ajax="1"]

here is the categories filter [woof taxonomies="product_cat:current" auto_submit="1"] and here is the watt attribute filter shortcode [woof sid='lamptires_w_68ff32df47948' autohide='1' autosubmit='1' is_ajax='1' ajax_redraw='1' start_filtering_btn='0' btn_position='b' dynamic_recount='1' hide_terms_count_txt='0' mobile_mode='0' tax_only='pa_ischys-w' ]

The shortcodes have beenn placed in the Shop Content layout section of AVADA where it set to apply in all the product archive types, prodcut categories and product tags.

 

Hello

Problem is in 'current' taxonomy, such attribute value not exists, you can see documentation here: https://products-filter.com/shortcode/woof_products

I can suggest you next: into your theme file functions.php create new shortcode which automatically catch current category and applied it correctly (I need ftp to place it, so place it).

add_shortcode('woof_products_custom', function($atts) {
    $atts = shortcode_atts([
        'dynamic_taxonomies' => '1',
        'is_ajax' => '1'
    ], $atts, 'woof_products_custom');
    if (is_product_category()) {
        $current_cat = get_queried_object();
        if ($current_cat && isset($current_cat->slug)) {
            $cat_slug = sanitize_title($current_cat->slug);
            $shortcode = sprintf(
                '[woof_products taxonomies="product_cat:%s" is_ajax="%s"]',
                esc_attr($cat_slug),
                esc_attr($atts['is_ajax'])
            );
            return do_shortcode($shortcode);
        }
    }
});
There wher you placed shortcode [woof_products taxonomies="product_cat:current" dynamic_taxonomies="1" is_ajax="1"] place shortcode [woof_products_custom]
Try it ...