1

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?

4
  • Please clarify the method in which you would like to "know" - javascript? php? frontend? backend? on order place? on registration?
    – philwinkle
    Commented Aug 2, 2013 at 4:40
  • in PHP. i want to in quote object,,
    – Keyur Shah
    Commented 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? Commented Aug 2, 2013 at 5:28
  • in order review step i want to checkout is sign up check or not
    – Keyur Shah
    Commented Aug 2, 2013 at 5:30

1 Answer 1

0

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 register
  • quest - 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
6
  • i am getting NULL from getCheckoutMethod() when i choose signup option and i enter password
    – Keyur Shah
    Commented Aug 2, 2013 at 6:35
  • @KeyurShah where did you put your code?
    – Marius
    Commented Aug 2, 2013 at 6:37
  • on couponPostAction i want know that here customer is registered or login
    – Keyur Shah
    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 ?
    – Keyur Shah
    Commented Aug 2, 2013 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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