Add customer comment (#26)

This commit is contained in:
Dmitry Mamontov 2018-01-12 14:05:04 +03:00 committed by Alex Lushpai
parent 3d3d55a9d1
commit 30e53fa5c6

View File

@ -410,6 +410,14 @@ class RetailCRM extends Module
}
$orderdb = new Order($params['order']->id);
$comment = $orderdb->getFirstMessage();
if ($comment !== false) {
$order['customerComment'] = $comment;
}
unset($comment);
foreach ($orderdb->getProducts() as $item) {
if (isset($item['product_attribute_id']) && $item['product_attribute_id'] > 0) {
$productId = $item['product_id'] . '#' . $item['product_attribute_id'];