The plugin doesn't have a way to do this by default I'm afraid - no such dynamic rule.
Since you mentioned hooks, this is a little complicated to achieve, and will need quite a bit of coding, but you can probably achieve it like this:
For dynamic rules with "Show discount as sale price" checked, the plugin saves a comma separated list of Rule IDs in the option 'b2bking_have_discount_everywhere_rules_list_ids'
So you could filter that and REMOVE the rule for all users that DO NOT have at least $1000 in previous orders.
So you could create a rule, and then add a code snippet where you filter the list of available rules
It would look like this:
add_filter( 'option_b2bking_have_discount_everywhere_rules_list_ids', function($list){
// filter the list here and remove the ID if the current user does not meet the condition
}, 10, 1);
Yes, it make sense, I can work on this solution you suggested.
Just in case the website owner (my client) would like to manage discount rules without my intervention: is Discount Rules for Woocommerce by Flycart* - that haves the requested feature - compatible with B2Bking?
Generally speaking, I'm afraid you will often see conflicts about price when using discount plugins. What may happen is you may see an incorrect price in cart, minicart, subtotals, etc, because both B2BKing and the discount plugins would try to modify price at the same time.
I don't know specifically about Flycart, but generally I would recommend to you to avoid other discount plugins if possible.
Or if you want to use other discount plugins, in that case we would recommend you not to use B2BKing discount or pricing functionalities.
Hello,
really a great plugin!
I have a question: is there a dynamic rule to obtain purchase history based discount?
E.g. Users who spent $1000 in previously orders get 10% discount from now on - or for next order.
I can't see a similar option in rules.
If not, is there an hook to obtain this behaviour?
Thanks,
Simone
Hi Simone,
Thank you for purchasing the plugin,
The plugin doesn't have a way to do this by default I'm afraid - no such dynamic rule.
Since you mentioned hooks, this is a little complicated to achieve, and will need quite a bit of coding, but you can probably achieve it like this:
For dynamic rules with "Show discount as sale price" checked, the plugin saves a comma separated list of Rule IDs in the option 'b2bking_have_discount_everywhere_rules_list_ids'
So you could filter that and REMOVE the rule for all users that DO NOT have at least $1000 in previous orders.
So you could create a rule, and then add a code snippet where you filter the list of available rules
It would look like this:
Hope that makes sense,
Kind regards,
Stefan
Thank you Stefan for your precious reply.
Yes, it make sense, I can work on this solution you suggested.
Just in case the website owner (my client) would like to manage discount rules without my intervention: is Discount Rules for Woocommerce by Flycart* - that haves the requested feature - compatible with B2Bking?
https://www.flycart.org/products/wordpress/woocommerce-discount-rules
Thanks again,
Simone
Hi Simone,
Generally speaking, I'm afraid you will often see conflicts about price when using discount plugins. What may happen is you may see an incorrect price in cart, minicart, subtotals, etc, because both B2BKing and the discount plugins would try to modify price at the same time.
I don't know specifically about Flycart, but generally I would recommend to you to avoid other discount plugins if possible.
Or if you want to use other discount plugins, in that case we would recommend you not to use B2BKing discount or pricing functionalities.
Kind regards,
Stefan
Thank you Stefan for your kind reply.
I think the Client could manage this by moving customers manually from a group to another - and manage purchase history discounts by groups.
Thanks again for the support.
Kind regards,
Simone