How do I set a limit per category?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #100477
    Victor Huas
    Participant

    Hi Tom,
    Thanks for the plug-ins that works well. However I have a complex demand :
    My client is doing meal delivery and offers different memberships for its clients to choose different meals. However, the meals quantity shouldn’t be limited, it’s the product category that should be.
    For exemple, if he wants to get 8 times the same meal, he could as well as getting 8 times different meals.
    Would you have a solution regarding this issue ? Thanks 🙂

    • This topic was modified 1 year, 3 months ago by Moshtafizur.
    #100478
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Victor,

    Sorry for the late reply.

    If I understood the task correctly – what you need is “Per product category” option in “WooCommerce > Settings > Maximum Products per User > Limit”. After you enable it, you will be able to set “Limit per user” option for that category (in “Products > Categories > Your category > Edit”) to the total amount you need, e.g. 8.

    Hope that helps. Please let me know if you have any questions.

    #100479
    Victor Huas
    Participant

    Hello,
    Thanks for your reply !
    However I have different type of memberships. IF I set a limit of 8 products per user, others that required 10 products couldn’t go further ! Do you get it ?
    What I was thinking was going through “formula” to create something like that :
    For 8 meals
    [alg_wc_mppu limit=”8″ membership_plan=”monthly-membership-8-meal” product_category=”meal”]

    For 9 meals
    [alg_wc_mppu limit=”9″ membership_plan=”monthly-membership-9-meal” product_category=”meal”]

    For 10 meals
    [alg_wc_mppu limit=”10″ membership_plan=”monthly-membership-10-meal” product_category=”meal”]

    Is that possible ?
    Thanks Tom

    #100480
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Victor,

    Again, sorry for the late reply. Yes, that’s possible with our “Formula” section. Only instead of product_category you have to use term_id attribute, i.e.:

    [alg_wc_mppu limit="8" membership_plan="monthly-membership-8-meal" term_id="123"]
    [alg_wc_mppu limit="9" membership_plan="monthly-membership-9-meal" term_id="123"]
    [alg_wc_mppu limit="10" membership_plan="monthly-membership-10-meal" term_id="123"] 
    

    Here 123 is term ID of “meal” category. Also, please note that to use term_id attribute in shortcodes, you have to enable “Per product category” checkbox in “Limits” settings section (in “WooCommerce > Settings > Maximum Products per User > Limits”).

    Please let me know if there any questions.

    #100481
    Victor Huas
    Participant

    Hi Tom,
    thanks for your reply, however, when I have an issue when I use this formula : [alg_wc_mppu limit=”8″ membership_plan=”monthly-membership-8-meal” term_id=”123″]

    It appears that every products from the category “123” are ALL available 8 times…
    However, I want the category choice to be limited. Means : 1 products A, 4 products B and 3 product C for example.
    Do you get what I mean ?

    Also, when the limit is reached for any limit (per products or category…), nothing blocks the discount or offer of the products.. How can you arrange it ? thanks

    #100482
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Victor,

    Actually, it should work exactly as you need, i.e. 8 products in total from that category (not 8 of each product). Would it be possible for me to log in to your site to check what’s going on (my email is [email protected])? Please let me know if sharing an account is not an option, and I will continue solving it remotely.

    As for the second part of your question – not sure if I understood it correctly, but please check what order statuses are set to be counted in “WooCommerce > Settings > Maximum Products per User > General > Order statuses”. By default, it’s set to “Completed” orders only.

    #100483
    Victor Huas
    Participant

    Hi, My bad for the first issue. I wasn’t correctly doing it !
    For the second, I set it at “in progress”. Means that when they directly order, it updates directly, even before the order is considered.
    But what I don’t understand, is that for a limit of 8 products, I can order 9 products at the same time, and I’ll have a -1 in my tab.
    How do you block it ? Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.