Magento为什么在生成ID后无法保存客户? [英] Why would Magento fail to save a customer after generating an ID?

查看:72
本文介绍了Magento为什么在生成ID后无法保存客户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查找导致客户在结帐时选择注册的罕见错误(喜欢那些间歇性错误)的原因,但是当订单完成时,Magento某种程度上无法保存客户记录.这导致没有电子邮件地址的孤立订单,从而使客户服务困难.

这是我到目前为止的调查结果:

  • adminhtml中的销售订单视图报告该客户是访客,电子邮件地址为空白.帐单和收货地址可见.
  • customer_is_guestsales_flat_order
  • 中为假
  • sales_flat_order条目链接到sales_flat_order_address中的有效记录.
  • sales_flat_order_address记录包含customer_idcustomer_address_id的值,但是这些链接的记录不存在.
  • 客户信息,订购的产品,付款方式中没有可识别的模式.
  • system.log,exception.log,apache错误日志,var/report或我知道的任何其他日志中没有相关条目.

想法:

  • 客户保存的进度足够快,可以生成ID.
  • customer_save_after上有一个观察者,导致保存的回滚吗?
  • 低级数据库错误导致保存失败.

有人对如何进行追踪有任何建议吗?

版本为Enterprise 1.9.

解决方案

我会添加很多额外的日志记录,尝试将其记录得足够好以捕获该错误-如果可以检测到该错误,则保存这些日志.

一旦您的日志显示了该错误,就可以更轻松地隔离出有问题的代码.

为此,您可能需要记录数据库查询,但不幸的是,如果数据量很大和/或受到隐私保护,这可能会很棘手.

I'm attempting to track down the cause of a rare bug (love those intermittent bugs) where a customer selects to Register at time of checkout, but when the order is completed, Magento somehow fails to save the customer record. This results in an orphan order with no email address, a difficult customer service situation.

Here are the results of my investigations so far:

  • The Sales Order View in adminhtml reports that the customer is a Guest and the email address is blank. Billing and Shipping addresses are visible.
  • customer_is_guest is false in sales_flat_order
  • The sales_flat_order entry links to a valid record in sales_flat_order_address.
  • The sales_flat_order_address record contains values for customer_id and customer_address_id however those linked records do not exist.
  • There is no discernible pattern in customer information, products ordered, payment methods.
  • There are no relevant entries in system.log, exception.log, apache error logs, var/reports or any other logs that I'm aware of.

Thoughts:

  • the customer save is progressing far enough that an ID is generated.
  • there is an observer on customer_save_after that is causing a rollback of the save?
  • a low-level database error is causing the save to fail.

Does anyone have any suggestions on how to track this down?

Version is Enterprise 1.9.

解决方案

I would add lots of extra logging, try to log it well enough to capture the bug - and to save those logs if the bug can be detected.

Once you have logs that show the bug, you can then isolate the problematic code more easily.

For this, you may need to log the database queries, which might, unfortunately, be tricky if the volume of data is high and/or subject to privacy concerns.

这篇关于Magento为什么在生成ID后无法保存客户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆