Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › 2 CONDITIONS 1 COUPON
- This topic has 9 replies, 2 voices, and was last updated 5 years, 8 months ago by Soft79.
- AuthorPosts
- December 13, 2020 at 7:22 am #17010Ariela ShahafParticipant
Can i have : if he buy 100 nis he. will have one product
and if he buy from 200 up he will have the first product and another product?December 13, 2020 at 10:41 am #17012Soft79KeymasterIf they’re both the same product you can set the minimum subtotal to 100 and tick ‘allow multiplication’. If they’re different products you need to modify the snippet I sent you.
December 14, 2020 at 11:43 am #17016Ariela ShahafParticipantwill you please help me with the code modification?
December 14, 2020 at 3:30 pm #17017Soft79KeymasterPlease explain clearly how the coupon should work and include urls to the products involved.
December 14, 2020 at 4:18 pm #17018Ariela ShahafParticipantIf he buy not then 100 he gets # 3 brash
If he buy more then 200 he gets # 11 brashDecember 15, 2020 at 12:55 pm #17025Soft79KeymasterPlease explain clearly how the coupon should work and include urls to the products involved.Please try again
December 15, 2020 at 3:26 pm #17027Ariela ShahafParticipantWhen in cart we have amount of price above 100 and the customer type the coupon “מירנושקה”
The product:
https://www.anna-k.co.il/he_il/product/%d7%9e%d7%91%d7%a8%d7%a9%d7%aa-%d7%a2%d7%99%d7%a0%d7%99%d7%99%d7%9d-2/Is add to the cart automatically.
If he buy 200 up
The product:
https://www.anna-k.co.il/he_il/product/%d7%9e%d7%91%d7%a8%d7%a9%d7%aa-%d7%a2%d7%99%d7%a0%d7%99%d7%99%d7%9d-2/Will remains and the proudact:
Will be add to the cart so he will have 2 proudacts free of charge.
Thank you for your answers and help (:
December 16, 2020 at 7:21 pm #17038Soft79KeymasterConfigure the coupon so it applies both products. Try this snippet (untested):
add_filters( 'wjecf_free_products_to_apply_for_coupon', function( $selected_free_products, $coupon ) { if ( strcasecmp( $coupon->get_code(), 'COUPON_CODE' ) === 0 ) { $subtotal = WJECF_API()->get_subtotal_of_matching_products( $coupon ); if ( $subtotal < 200 ) { unset( $selected_free_products[1243] ); } } return $selected_free_products; }, 10, 2 );December 17, 2020 at 6:49 am #17046Ariela ShahafParticipantits not working
December 17, 2020 at 5:11 pm #17050Soft79KeymasterThat’s a pity. Since customization is outside the scope of support, I advise you to hire a developer to look into it. If you wish to hire us, please contact us at admin at soft79.nl
- AuthorPosts
- You must be logged in to reply to this topic.