can anyone tell me how I can find out if the registration of a new customer is done during the checkout or not. I need to know this information in the accountcontroller.
Edit:
My aim is to get rid of the message "If you are a registered VAT customer, please…" in success.phtml, but only if the customer was registered during the checkout.
Because I've disabled "account confirmation" and forwarding to "account overview" the customer can complete the purchase and after that this message appears – but doesn't make sense any more.
So in short I've got two use cases:
- 1.) normal registration -> message added to queue (in AccountController->_welcomeCustomer) -> message displayed after finishing registration -> OK
- 2.) checkout -> registration -> message added to queue (in AccountController->_welcomeCustomer) -> next steps in checkout-> purchase -> message displayed after purchase -> NOT OK
Thanks.
Best Answer
You can try this logic.
Get the first order of the customer.
Get the quote object of the order.
Check the checkout method of the quote.
Something like this:
I didn't test the code but the idea seams ok to me.