Repository Forums Support WooCommerce Extended Coupon Features PRO BOGO, B2G2, B4G4, etc. – advanced restrictions

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #19560
    ih
    Participant

    I want to create more BOGO-type discounts.. like B2G2, B4G4, etc.
    But I can’t figure out how to limit the minimum cart quantity and the maximum FREE discounted items.

    For example, in suggested settings, the discount applies starting from 2 items in cart.
    I want to restrict to a minimum of 4 items in the cart and discount a maximum of 2 items but keep the “every 2nd product is 100% discounted”.

    Use case:
    2 items in the cart – coupon is not available (it is not meeting the 4 items in cart restriction)
    4 items in the cart – 2 are paid, and 2 (the cheapest ones) are 100% discounted
    8 items in the cart – 6 are paid, and 2 (the cheapest ones) are 100% discounted

    #19561
    Soft79
    Keymaster

    Hi, this would require customization in PHP. Take a look at https://www.soft79.nl/forums/topic/buy-5-and-get-2-cheapest-for-free/ for example; it will discount the 2 cheapest of every n items, so by setting min matching quantity to either 2 or 4 you can create B2G2, B4G4 coupons.

    #19569
    ih
    Participant

    Thank you for your response.
    Can you assist a little bit more, please?

    The referenced post is helpful.
    My question now would be about impaired numbers offers..

    For example, what if I want to create a Buy 3 Get 3 Free promotion? And to limit it to a maximum of 3 items for free. meaning if they have to cart more than 5 items, they will still receive only 3 items discounted 100%.

    We should create limit options for each type of limit? Is there a way to automate/simplify it?

    Also, where I can find documentation on the variables/php ( wjecf_get_limit_to_options, woocommerce-jos-autocoupon, _wjecf_min_matching_product_qty, etc.) so the developer knows what each means and maybe he can also come up with a solution?

    Thank you for your assistance.

    #19570
    ih
    Participant

    Also, how can I add extra limits for BOGO offers.. for example:

    – Cart size is at least $300

    AND

    – There are at least 2 items in the cart

    AND

    – Maximum amount of discounted/free items should be 3

    #19574
    Soft79
    Keymaster

    “Cart size is at least $300” is possible by using minimum spend.
    “at least 2 items in the cart” is possible by using minimum quantity of matching products.

    But combinations (minimum 2 items, but every 3rd item free) require customization.

    Search for ‘apply_filters’ in the code to find out what filters are available. Some are documented, for example this is the documentation for wjecf_get_limit_to_options:

    
    /**
    * This filter allows developers to append custom rules for 'Limit to:'
    *
    * $options = [ $key => [ 'function' => $callback_function, 'title' => $title ], ... ]
    *
    * $key = The key that identifies the 'Limit to'-rule.
    * $title = The title of the 'Limit to'-rule.
    * $function = The callback with functionality of the rule. Callback must have this signature:
    *
    * function callback_function( $coupon, $discountable_items )
    *
    * ($discountable_items are stdClass objects as generated by WC_Discounts)
    *
    * The callback must return an array with the maximum amount of items to be discounted.  [ $item_key => $discount_limit, ... ]
    * Discount-quantity of cart_items that are not in the array will not be limited.
    */
    
    #19586
    ih
    Participant

    Are there going to be any new features to the plugin? Looking at the changelog, it looks like it is abandoned. Only fixes. Other plugins already offer these features. Kind of sucks that we pay for a yearly subscription (for 4 websites) with no improvements to the plugin since 2020, and besides that, we have to customize our coupons. 😐

    #19587
    Soft79
    Keymaster

    No, it’s not abandoned, because as you see in the changelog we apply fixes every now and then. And as you can see we offer support. Customization is required because your use case is quite special.

    #19588
    ih
    Participant

    Yeah, I underestand the fixes and support. And thank you for that. But if the plugin will not be improved, why should we keep using it? The last feature was released 2 years ago (*Release Data – 2021-01-16*). Do you have an active roadmap you are working on? At this moment, regretting that we paid one year in advance for 5 sites.

    #19593
    Soft79
    Keymaster

    I’m sorry you feel like that. We maintain our software and I think we ask a fair price for it.

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