N98_CheckoutFilters
N98_CheckoutFilters copied to clipboard
Problem with automatic customer group assignment
There seems to be a bug that relates to Magento 1.7’s new automatic customer group assignment. First I set automatic assignment on and set all business customers with VAT number to automatically go to group A. Then I change certain customer’s group from A to B and disable automatic group assignment for that customer manually with the selection box in customer information page. Then if I try to allow certain payment method to group B only, the payment method does not show in checkout for customers that are in group B.
As I said it somehow relates to the automatic assignment function. It does work with group A and the customers in that group, if we allow the payment method to group A. However in this particular shop we desparately need it to allow payment method only to group B and customers absolutely need to be added to this group manually some time after registration.
So for some reason allowing payment methods only work if the customer’s group is the same as the automatic assignment group.
We already tried two Amasty’s quite similar extensions and they also had this problem. Amasty’s support tried to repair the extensions, but even they could not get their extensions to work as they should.
As I just spent an hour of my life tracking this down, it's a bug in CE 1.7 that was fixed in 1.8. The SalesObserver
wasn't checking if automatic group assignment was disabled when it checked the vatcode before processing an order, so it was resetting the customer's group_id
. The customer model wasn't getting saved though, so when you checked the customer, it reported that it had the right group_id
A diff from 1.7.0.2 to 1.8