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?
-
Please clarify the method in which you would like to "know" - javascript? php? frontend? backend? on order place? on registration?– philwinkleCommented Aug 2, 2013 at 4:40
-
in PHP. i want to in quote object,,– Keyur ShahCommented Aug 2, 2013 at 4:48
-
By signup checkbox do you mean newsletter subscription opt-in? Also at what step of checkout do you want to check it?– Tim BezhashvylyCommented Aug 2, 2013 at 5:28
-
in order review step i want to checkout is sign up check or not– Keyur ShahCommented Aug 2, 2013 at 5:30
Add a comment
|
1 Answer
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
-
i am getting NULL from getCheckoutMethod() when i choose signup option and i enter password Commented Aug 2, 2013 at 6:35
-
-
on couponPostAction i want know that here customer is registered or login Commented Aug 2, 2013 at 6:56
-
the couponPostAction is not in the checkout process. Is in the cart. You don't know there if the customer is going to checkout as guest or register. You can only check if the customer is logged in.– Marius ♦Commented Aug 2, 2013 at 6:58
-
thats'right ,,here i only know that customer is lo-gin or not if lo-gin then it display is_loggined,,is there any way i know that ? Commented Aug 2, 2013 at 7:02