I have a couple of problems with your plugin. Just to get the hang of it. I have three groups in your plugin: Customer, Bronze, Silver, Gold. And I have rules set there, see picture.
Problem 1. For some incomprehensible reason, when a customer makes an order (not yet completed), it immediately moves the customer to a better group without paying. Example. I made an order for 985000 CZK and after completing the order it immediately moved the customer to Silver group (which is not even the target group for this amount, it should be gold.). However, after the order is paid and completed, the customer is moved to the Gold group. So I would need to resolve the issue here, so that the customer is not immediately, after completing the order at checkout, moved to a better group, which they shouldn't even be in.
Problem 2. When the customer cancels the order, the group is not downgraded. Example: A customer has made a purchase for 500 000 CZK. The order is paid and completed. The customer is automatically moved to a better group. But it may happen that for some reason the order is cancelled. This means that the customer should be automatically moved to a worse group (if not the basic group). But this does not happen and the customer is still in the better group, even though he is not entitled to it.
Problem 3 I would need every new customer (no exceptions) to be given a B2B Customer group immediately. New customers are automatically moved to the B2c group. But unfortunately I can't work with this group within your group rules. Or if the B2C group could be used within the rules in B2b king, that would be great. Then also use it as a base group in the following code provided by your colleague.
First, I apologize for the delayed response and thank you for your patience.
Let me address your issues one by one:
3. Looking at your site (jimar.cz), I noticed you're using a custom registration form popup. This is why B2BKing can't automatically set users as B2B. If you replace it with the standard B2BKing registration form using the shortcode [b2bking_b2b_registration], all new registrations can then be set as B2B automatically.
2. Unfortunately, automatic group downgrades for cancelled orders isn't currently a feature of group rules. If you'd like, I can try to provide a custom code snippet for it to trigger a recalculation when an order is cancelled or refunded - but please note it would need some testing as this is not currently a standard feature here.
1. Is the idea that here that you'd like only orders with the "completed" status to be counted towards the group change? I think the problem might be that the code snippet referenced also counts Processing and On-Hold orders (so it would also count orders that have just been placed).
If you need to only use completed orders and exclude processing ones, use this code snippet instead: https://pastecode.io/s/wsh93h2c - I believe this would solve the issue.
Hello,
I have a couple of problems with your plugin. Just to get the hang of it. I have three groups in your plugin: Customer, Bronze, Silver, Gold.
And I have rules set there, see picture.
Problem 1.
For some incomprehensible reason, when a customer makes an order (not yet completed), it immediately moves the customer to a better group without paying.
Example. I made an order for 985000 CZK and after completing the order it immediately moved the customer to Silver group (which is not even the target group for this amount, it should be gold.). However, after the order is paid and completed, the customer is moved to the Gold group. So I would need to resolve the issue here, so that the customer is not immediately, after completing the order at checkout, moved to a better group, which they shouldn't even be in.
Problem 2.
When the customer cancels the order, the group is not downgraded.
Example:
A customer has made a purchase for 500 000 CZK. The order is paid and completed. The customer is automatically moved to a better group. But it may happen that for some reason the order is cancelled. This means that the customer should be automatically moved to a worse group (if not the basic group). But this does not happen and the customer is still in the better group, even though he is not entitled to it.
Problem 3
I would need every new customer (no exceptions) to be given a B2B Customer group immediately. New customers are automatically moved to the B2c group. But unfortunately I can't work with this group within your group rules. Or if the B2C group could be used within the rules in B2b king, that would be great. Then also use it as a base group in the following code provided by your colleague.
https://pastecode.io/s/7jqio4pt (Ticket Number #3814659)
Thank you for your help
Sincerely
Dd
Attached files: Screenshot_13.png
Hi Dominik,
First, I apologize for the delayed response and thank you for your patience.
Let me address your issues one by one:
3. Looking at your site (jimar.cz), I noticed you're using a custom registration form popup. This is why B2BKing can't automatically set users as B2B. If you replace it with the standard B2BKing registration form using the shortcode [b2bking_b2b_registration], all new registrations can then be set as B2B automatically.
2. Unfortunately, automatic group downgrades for cancelled orders isn't currently a feature of group rules. If you'd like, I can try to provide a custom code snippet for it to trigger a recalculation when an order is cancelled or refunded - but please note it would need some testing as this is not currently a standard feature here.
1. Is the idea that here that you'd like only orders with the "completed" status to be counted towards the group change? I think the problem might be that the code snippet referenced also counts Processing and On-Hold orders (so it would also count orders that have just been placed).
If you need to only use completed orders and exclude processing ones, use this code snippet instead: https://pastecode.io/s/wsh93h2c - I believe this would solve the issue.
Kind regards,
Stefan