How can I configure the plugin so that members can buy one unit of each product?

Top WooCommerce & WordPress Plugins Forums Maximum Products per User for WooCommerce How can I configure the plugin so that members can buy one unit of each product?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100884
    Nathaniel
    Participant

    Hello, I have a store using Maximum Products per User Pro. The store has 50 products. 25 products are in category B and limited to 1 unit of each product per member plan per 365 days and not available to non-members at all; after 365 days everything resets and they can buy another unit of each product in category B. the other 25 products have no limits for anyone (members or guests).

    What is the best logic to limit the 25 products in category B such that only a member can buy one unit of each product in a 365 day period? I tried limit per category but that only allows a single product from category B not a single unit of each product in that category. I’m currently playing with per product and only setting the limit on the 25 products in category B but I’m open to other suggestions.

    Also, is it necessary to have [alg_wc_mppu membership_plan=”1″] to apply the limits just to those users in member plan 1? I’m thinking it may be redundant since the products in category B are already restricted only to the member plan in the Woocommerce Memberships settings. Thanks in advance for your suggestions.

    #100885
    Zohaib
    Participant

    Hi,

    There are a number of ways to achieve this. But here is the most efficient:

    -General > Mode > Product Quantities
    -Date Range > Last 365 days
    -Limits > Per product
    -Formula > Limits by formula > Enable

    Then use a formula such as:

    [alg_wc_mppu limit="1" membership_plan="plan_1" product_id="1,2,3,4,5,6,7,8"]
    

    In the formula, product ID put all the 25 product’s IDs. This way people with membership plan “plan_1” will only be able to buy  1 of each product from the specified list of product IDs.

    #100886
    Pablo
    Moderator
    Plugin Support

    Hi Nathaniel,

    There is also a different workaround you could try.

    The idea is to create a shortcode pretending that all of the products have 1 as limit. And then we overwrite that rule by saying that the other products don’t have that limit.

    Since you have mentioned category B for the products with limits, let’s say the other products are from category A having an ID of 6. This is what you could try:

    – General > Mode > Product Quantities

    – Limits > Per product category > Enable

    – Formula > You have to use the shortcodes in the specific order:

    [alg_wc_mppu limit="99999999" term_id="6"]
    [alg_wc_mppu membership_plan="1" limit="1"]
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.