为什么 Magento 在生成 ID 后无法保存客户?

发布于 2024-11-09 12:31:33 字数 771 浏览 0 评论 0原文

我试图找出一个罕见错误(喜欢那些间歇性错误)的原因,其中客户选择在结账时注册,但当订单完成时,Magento 不知何故无法保存客户记录。这会导致孤儿订单没有电子邮件地址,从而给客户服务带来困难。

以下是我迄今为止的调查结果:

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

想法:

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

有人对如何追踪这个有任何建议吗?

版本是企业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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小ぇ时光︴ 2024-11-16 12:31:33

我会添加大量额外的日志记录,尝试将其记录得足够好以捕获错误 - 并在可以检测到错误时保存这些日志。

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

为此,您可能需要记录数据库查询,不幸的是,如果数据量很大和/或存在隐私问题,这可能会很棘手。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文