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 year, 6 months ago by Soft79.
-
AuthorPosts
-
February 14, 2023 at 7:50 pm #19560ihParticipant
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% discountedFebruary 14, 2023 at 8:47 pm #19561Soft79KeymasterHi, 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 #19569ihParticipantThank 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 #19570ihParticipantAlso, 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
February 17, 2023 at 2:46 pm #19574Soft79Keymaster“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 #19586ihParticipantAre 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 #19587Soft79KeymasterNo, 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 #19588ihParticipantYeah, 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 #19593Soft79KeymasterI’m sorry you feel like that. We maintain our software and I think we ask a fair price for it.
-
AuthorPosts
- You must be logged in to reply to this topic.