Magento免费的一页支付插件(IWD Free One Page & One Step Checkout)安装完之后有一个comment的表单,默认在后台是关闭的,打开后好让客户能在下单的同时留言,对订单的补充。 public function addHistoryComment($data) { $comment = Mage::getSingleton('customer/session')->getOrderCustomerComment(); $comment = trim($comment); if (!empty($comment)) { $data['order']->addStatusHistoryComment($comment)->setIsVisibleOnFront(true)->setIsCustomerNotified(false); //added these lines: $order = $data->getEvent()->getOrder(); $order->setCustomerComment($comment); $order->setCustomerNoteNotify(true); $order->setCustomerNote($comment); } } 如果没反应,在修改邮件模板 app/locale/en_US/template/email/sales/下 order_new.html order_new_guest.html 在里边找适当位置添加 {{var order.getOnestepcheckoutCustomercomment()}} |