Brand Filter not returning results when using the widget

This topic has 4 replies, 2 voices, and was last updated 11 months, 4 weeks ago ago by Andrew Mitchell

  • Avatar: James
    James
    Participant
    June 19, 2024 at 14:59

    Hello,

    Having problems with the brand filter not displaying any products.

    Example:

    This Works brand/allstar-performance/

    This Fails /?filter_brand=allstar-performance

    I’ve rebuilt the product attributes lookup tables and cleared the cache.

    I’m at a loss, the only thing i could find different between the two pages while debugging is the queries below. Note the “AND 1=0” on the query that doesnt return records.

    SELECT SQL_CALC_FOUND_ROWS  fkiavO09N_posts.ID
    					 FROM fkiavO09N_posts  LEFT JOIN fkiavO09N_term_relationships ON (fkiavO09N_posts.ID = fkiavO09N_term_relationships.object_id) LEFT JOIN fkiavO09N_wc_product_meta_lookup wc_product_meta_lookup ON fkiavO09N_posts.ID = wc_product_meta_lookup.product_id 
    					 WHERE 1=1  AND ( 
      fkiavO09N_posts.ID NOT IN (
    				SELECT object_id
    				FROM fkiavO09N_term_relationships
    				WHERE term_taxonomy_id IN (7)
    			) 
      AND 
      fkiavO09N_term_relationships.term_taxonomy_id IN (1298)
    ) AND ((fkiavO09N_posts.post_type = 'product' AND (fkiavO09N_posts.post_status = 'publish' 
    OR fkiavO09N_posts.post_status = 'private')))
    					 GROUP BY fkiavO09N_posts.ID
    					 ORDER BY  wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC 
    					 LIMIT 0, 20
    SELECT SQL_CALC_FOUND_ROWS  fkiavO09N_posts.ID
    					 FROM fkiavO09N_posts  LEFT JOIN fkiavO09N_wc_product_meta_lookup wc_product_meta_lookup ON fkiavO09N_posts.ID = wc_product_meta_lookup.product_id 
    					 WHERE 1=1  AND ( 
      fkiavO09N_posts.ID NOT IN (
    				SELECT object_id
    				FROM fkiavO09N_term_relationships
    				WHERE term_taxonomy_id IN (7)
    			)
    ) AND ((fkiavO09N_posts.post_type = 'product' AND (fkiavO09N_posts.post_status = 'publish' 
    OR fkiavO09N_posts.post_status = 'private'))) AND fkiavO09N_posts.ID IN ( SELECT fkiavO09N_term_relationships.object_id  FROM fkiavO09N_term_relationships WHERE term_taxonomy_id  IN (1296) ) AND 1=0
    					 GROUP BY fkiavO09N_posts.ID
    					 ORDER BY  wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC 
    					 LIMIT 0, 20
    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    June 19, 2024 at 15:43

    Hello, James,

    Thank you for reaching out to us. The issue you encountered was due to the presence of a product attribute with the slug “brand.” We have resolved this by replacing it with “global-brand.” Additionally, please avoid creating any category or tag with the slug “brand,” as this could also lead to similar issues.

    Best Regards,
    8Theme’s Team

    Files is visible for topic creator and
    support staff only.
    Avatar: James
    James
    Participant
    June 20, 2024 at 03:01

    Thanks Andrew, Much appreciated.

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    June 20, 2024 at 09:15

    Hello, James,

    As we continue our mission to exceed expectations, your insights become increasingly valuable. Could we, with all due respect, request your thoughtful feedback by giving our theme a deserved 5-star rating on ThemeForest?

    Click here to share your valuable perspective: https://themeforest.net/downloads

    Your time and trust are highly appreciated!

    Best Regards,
    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.