为什么用户评论不在电子邮件订单确认中 html opencart 2?

Why user comment is not in email order confirmation html opencart 2?

我注意到在 opencart 2.3.0.2 中,admin 的订单确认包含用户的评论,而用户收到的电子邮件中没有。 用户只会得到带有评论的文本版本,而不是带有评论的 HTML 版本。

2012 2013 年的问题是评论根本没有传递到电子邮件中。

https://github.com/opencart/opencart/pull/94

https://github.com/opencart-ce/opencart-ce/issues/12

看来问题只解决了一部分。

解决方法是: 编辑: catalog/model/checkout/order.php

输入此代码:

            $data['ip'] = $order_info['ip'];
            $data['order_status'] = $order_status;

            if ($comment && $notify) {
                $data['comment'] = nl2br($comment);
            } else {
                $data['comment'] = '';
            }
            if ($comment) {
                    if ($order_info['comment']) {
                        $data['comment'] = nl2br($comment) . '<br/><br/><strong>Comment:</strong><br/>' . $order_info['comment'];
                    } else {
                        $data['comment'] = nl2br($comment);
                    }
            } else {
                    if ($order_info['comment']) {
                        $data['comment'] = $order_info['comment'];
                    } else {
                        $data['comment'] = '';
                    }
            }

而不是:

            $data['ip'] = $order_info['ip'];
            $data['order_status'] = $order_status;

            if ($comment && $notify) {
                $data['comment'] = nl2br($comment);
            } else {
                $data['comment'] = '';
            }

或者你可以安装这个 mod https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=32499&filter_search=add%20comment&filter_category_id=8&filter_license=0