Support » Plugin: Custom Shipping Methods for WooCommerce » Require categories

  • Resolved Handstand

    (@handstand)


    Hi, Thanks for the great plugin!

    Is there a way to require all category ids listed be present in order for the shipping method to show?

    At the moment only one of the category ids listed needs to be present. However, I want all the listed id’s to be present for it to work.

    For example, I want to show the method if category id’s 17 & 18 are present. If only 17 is present, it won’t show. If only 18 is present, it wont show.

    Thanks in advance for your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi @handstand,

    Ok, please give me a couple of days to implement it. One question though – what happens if there is one more additional category in cart, e.g. category ID 19 – do we still want method to show up?

    That would be fantastic!
    To answer your question, if there is one more category in the cart, I don’t want the method to show.
    Thanks again for your help and the quick response.

    Hi @handstand,

    Ok, got it. Will get back to you asap.

    Hi @handstand,

    As promised, we’ve released new plugin version 1.6.2 today, where I’ve added new “Require type” option to each custom method’s settings (it’s a select box at the bottom of the “Availability” settings section). I believe in your case you need to set it to “All and only the required products have to be in cart”.

    Please take a look and let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving me a rating.

    Hi, Thanks so much for adding this feature so quickly!
    Unfortunately I can’t get it to work.
    If I have 1 required product category id specified, it works. However, as soon as I put in 2 required category id’s, it stops working. I don’t know what I’m doing wrong.
    Thanks

    Hi again, @handstand,

    Hmm… How many categories do your products have? Is it one category for product? Or product has multiple categories at once?

    Thanks for the quick reply.
    I have 2 top level categories, which are the 2 categories that both have to be in the cart to activate the shipping method. Within each of those categories are a number of subcategories. My products are only ever in 1 of the top level categories.
    Thanks

    @handstand,

    Sorry, but I’m still not sure if I understood it correctly. For example, if your product A has categories 1 (top level) and 2 (subcategory), and your product B has categories 3 (top level) and 4 (subcategory), then in your case you need to set the “Required product categories” to 1,2,3,4 (i.e. all categories, including sub). Could you please confirm that it’s still not working? Or do you need it to be top-level categories only (i.e. ignore subcategories)?

    I’m so sorry, it appears it is actually working correctly. My problem is I’m using a “shipping package” plugin to separate the shipping methods of category 1 from category 2, so people can have their total order shipped in multiple ways, depending on the products selected. When I turn the package plugin off, your plugin is working correctly. When I turn it back on, it stops the plugin from allowing the 2 categories to be required.
    I’ll try something else for the split packaging.
    Thanks again for all your help and implementing this great new feature! Much appreciated.

    Thanks for your help, I’m marking it as resolved 🙂

    @handstand,

    Happy to hear it’s solved! Please let me know if you have any more questions and/or ideas.

    P.S. And thank you for the review, I really appreciate it!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Require categories’ is closed to new replies.