• Resolved SLV

    (@dwnl)


    Hi, Thanks for the plugin!

    I would like to exclude 1 category from being sitewide used for showing related products.
    This is why: all of my sale products are in the categories: Sale and Salehome.
    When a product is on sale and has a sale price, your plugin shows other on sale products on all product pages of products that are on sale and not the (main) category of the product itself.

    So a table is on sale and your plugin should show other tables. But it shows some random products like couches that are on sale…
    The same with a chair that is on sale… your plugin should show other chairs. But it shows the same couches that are on sale…

    I do not want to remove the category option in the globally relate products feature and edit all 800+ products by hand for this…

    Can you help me exclude this sitewide? Is there a function snippet I can use for this?

    Greetings

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @dwnl,

    Greetings from WebToffee support.

    We understand your requirements. We will look into the possibility of excluding a category from being shown on the product pages.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @dwnl,

    Thank you for your patience.

    We have made a code snippet to exclude a specific category from the Related Products widget. Please make sure to replace the number inside the function array() with the ID of the category you want to exclude.

    Kindly copy the code snippet from here and paste it into your active theme’s function.php file (WordPress Dashboard > Appearance > Theme Editor > functions.php) or you can use a Code Snippet plugin to do that for you.

    Let us know how it goes.

    Thread Starter SLV

    (@dwnl)

    Thanks for the code, it works. But…
    Without your snippet your plugin has the preference for my Salehome category.
    So a table shows 5 sofa’s as related products that are in that Salehome category. It should pick other tables from the tables category.
    Why does it take products from my Salehome category?

    If I activate your snippet with the number of the Salehome category in it, all products in that Salehome category will now not show anywere anymore.
    But those products are also in the table category or chairs etc. but are now not showing anymore…

    It should not be looking in the Salehome category in the first place… It should look in the tables category or the chair category or the sofa catagory. And if there are sale products in there it may show thoose products.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @dwnl,

    When the Salehome category is excluded, all products belonging to that category will be excluded. It won’t consider those products even if they belong to any other category.

    To help us better understand the category arrangement on your site, please share the screenshot of the product with the category information. Kindly share the WooCommerce System status report (WooCommerce -> Status -> Get system status report) as well.

    That way, we can look into the possibility of achieving this requirement through alternate solutions.

    Thread Starter SLV

    (@dwnl)

    So I solved myself!
    The Salehome category was in the root category: Sale…
    I removed it from there, so they are both root categories and the problem is solved! Whoohooooooo!

    This means I do not need your snippet anymore by the way, but thanks for the help!

    • This reply was modified 11 months, 1 week ago by SLV.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude sale products/sale categories’ is closed to new replies.