I'm experiencing a rare issue where existing customers completing checkout place the order successfully. However, the following strange behavior occurs:
- The order confirmation email is not sent,
- The order is assigned to the customer correctly, yet customer_id is set to 0, and
- If the customer places the order again, it works correctly (order confirmation email sent and customer ID assigned correctly) however, the
increment_id
assigned is precicely the same as the first order and as a result there is a duplicate order increment id, with both orders active.
As I mentioned, the issue is quite rare, we receive over 20 to 30 orders a day, and it only seems to happen once a day, if that.
Edit: as per comment, it is useful to note that I am using an extension which allows alphanumeric order increment_ids, Aschroder Set Custom Order Number, our orders follow a trend as follows: OR1000, OR1001, OR1002, OR1003, etc. We have been using this extension for over 10,000 overs without this issue appearing before.
I am also using ASchroder.com SMTP Pro Email - Free and Easy Magento Emailing for SMTP, Gmail or Google Apps email to integrate google mail support for Magento.
Update 1: Looking at exception.log
the following entry is notable which occured around the time of the incidents:
'Zend_Mail_Protocol_Exception' with message 'Unable to connect via TLS' in /html/lib/Zend/Mail/Protocol/Smtp.php:211
It seems like this could cause the order creation process not to reserve the order increment id on the quote model.
Is there a way that I can diagnose what is causing this behavior? All other orders placed seem functionally correct.
/var/log/exception.log
or/var/log/system.log
? If you have logging enabled or not. It sounds like Foreign Key restraints. Also what are you using for your session storage inlocal.xml
?<session_save><![CDATA[files]]></session_save>
. Regarding the error logs, something noteable which happened around the time of order placement wasexception 'Zend_Mail_Protocol_Exception' with message 'Unable to connect via TLS' in /html/lib/Zend/Mail/Protocol/Smtp.php:211
sales/quote
resource model (fixed during the Hackathon): here the increment is cast toint
, seeisOrderIncrementIdUsed()
. This gave us some headaches in a multistore installation.