3

In my magento website, "Guest Checkout" is disabled. People need to register while they checkout. This works fine, as it is a default behaviour. But sometimes, people who register are not really registered, but considered as Guest.

This happens randomly. I don't have any idea what is going wrong. Can anyone help please?

note:

The website uses the default onepage checkout with minor modifications only in templates (jQuery additions for some attractive UI).

the output of running SELECT * FROM customer_group is:

enter image description here

running SELECT * FROM core_config_data WHERE path = 'customer/create_account/default_group' returned empty set.

  • 1
    Why do you think, they are guests? Customer-Group, status of the order? Is there an account for the customers? – Fabian Blechschmidt Jul 15 '13 at 7:38
  • customer group in order status is NOT LOGGED IN, that's why I call them Guests. – Shathish Jul 15 '13 at 9:35
  • 1
    Yeah…that doesn't sound right. :) Do you have any modules (or custom dev) which change customer behavior, anything to do with orders, etc? Lastly, could you update your question to include the output of these two SQL queries: SELECT * FROM customer_group and SELECT * FROM core_config_data WHERE path = 'customer/create_account/default_group' – davidalger Jul 15 '13 at 13:17
  • 1
    @davidalger: as you told I've added the outputs of the queries you gave me. – Shathish Jul 16 '13 at 4:54
  • 1
    Although it was (I think) initially introduced in EE, both Community and Enterprise versions of Magento allow you to create statuses and assign them to states. It's found in System -> Order Statuses – davidalger Jul 16 '13 at 13:29
1

At last found the problem, there was a custom modification, which didn't throw an exception, when already registered customer tries to register again. So, that customer was considered as a Guest [NOT LOGGED IN] customer.

The bad part is that, it was straight away done in core files, so I didn't find it until now.

I didn't want to mess up with these changes, so created an event-observer to automatically login, if the customer is already registered.

if(!Mage::helper('customer')->isLoggedIn()){
    $data = $evt->getEvent()->getControllerAction()->getRequest()->getPost('billing', array());
    $customer = Mage::getModel("customer/customer");    
    $email = $data['email']; //email entered in billing address section
    $customer->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);

    if($customer->getId()){
        Mage::getSingleton('customer/session')->loginById($customer->getId());
    }
}
  • Glad you found it! :) – davidalger Jul 16 '13 at 13:31
-3

You need to clear your cache and reindex the website. Flush all of the caches.

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.