7

I'm working on this requirement from my EU client. We are on Magento 1.9.1
We have set up VAT validation and auto-group change based for valid and invalid VAT IDs and its working fine.

Now the twist is, we want to validate VAT for customers who are not logged in and move them to a customer group say "Not-Logged-in-Valid-VAT"

Is it possible to assign guest to a customer group since guest is not actually a full customer entity ? Is it possible to replicate the concept of Not-Logged-in customer group ?

2

Putting no customer in a customer group doesn't make sense at all :-)

But the whole VAT thing afaik is based on the customer group and what you might do is, fake this.

Save the VAT to the session, validate it beforehand. Then when the check is done, make sure that Mage::getSingleton('customer/session')->getCustomerGroup() returns your desired value. Either by rewriting it, or better by setting the customer group. But I'm not sure, whether there is always an empty customer object, which can be misused.

Good luck. Tell me how it works, I think I have to do the same soon.

2
  • Any news if this was a good option?
    – Wouter
    Dec 4 '17 at 14:22
  • At least not from my side. Dec 4 '17 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.