Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › BOGO, B2G2, B4G4, etc. – advanced restrictions
- This topic has 8 replies, 2 voices, and was last updated 1 month, 1 week ago by Soft79.
February 14, 2023 at 7:50 pm #19560
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”.
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% discountedFebruary 14, 2023 at 8:47 pm #19561
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.February 17, 2023 at 9:50 am #19569
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.February 17, 2023 at 10:56 am #19570
Also, how can I add extra limits for BOGO offers.. for example:
– Cart size is at least $300
– There are at least 2 items in the cart
– Maximum amount of discounted/free items should be 3February 17, 2023 at 2:46 pm #19574
“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. */February 20, 2023 at 11:31 am #19586
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. 😐February 20, 2023 at 3:29 pm #19587
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.February 20, 2023 at 5:50 pm #19588
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.February 21, 2023 at 6:16 pm #19593
I’m sorry you feel like that. We maintain our software and I think we ask a fair price for it.
- You must be logged in to reply to this topic.