Check signup checkbox is check or not on checkout
-
16-10-2019 - |
Question
Hello currently i am using one page checkout and i want to know that signup check-box is check or not on checkout page. How can i know that sign up is checked or not?
Solution
You can check the value of
Mage::getSingleton('checkout/session')->getQuote()->getCheckoutMethod()
This value can be:
- empty - if the customer is already logged in
register
- if the customer chose to registerquest
- if the customer selected 'Checkout as guest'
[EDIT]
To know if a customer is logged in check this:
Mage::getSingleton('customer/session')->isLoggedIn();//true if the customer is logged in
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange