订单信息中的自定义产品属性
我有一个自定义产品属性 (style_number),我希望成为订单历史记录、面向客户的电子邮件等的一部分。
我已将其包含在我的报价中(通过将其添加到 XML 中),但是什么将其也纳入订单数据的最佳方法是什么?据我所知,我不能以同样的方式挑选和选择属性。
我看到两个方法:
Mage::getModel('sales/order').... 具有明显的性能影响。
编辑销售订单表以包含此新列,并且在将报价转换为订单时添加此数据。
已向我推荐 2,但编辑表格听起来仍然有风险。我应该继续#2,还是有更好的选择?
I've got a custom product attribute (style_number) I'd like to be part of Order History, customer-facing emails, etc.
I have included this as part of my quote (by adding it into in the XML), but what is the best way to get this into the order data as well? I cannot pick and choose attributes in this same way, from what I can tell.
I see two appraoches:
Mage::getModel('sales/order').... which has obvious performance implications.
Edit the sales order table to include this new column and, when converting a quote to an order, add in this data.
2 has been recommended to me but editing the table still sounds risky. Should I proceed with #2, or are there better alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将它们作为列添加到 sales_flat_order 和 sales_flat_quote 表中,您可以通过设置脚本执行此操作
add those to sales_flat_order and sales_flat_quote table as columns, you can do that via setup scripts