From 292cf1487c4a60475e9f36e1ae5b6b5d343b31a0 Mon Sep 17 00:00:00 2001 From: maxrip Date: Sat, 21 Nov 2015 12:48:19 +0300 Subject: [PATCH] Update apihelper.php Add export option in crm --- system/library/intarocrm/apihelper.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/library/intarocrm/apihelper.php b/system/library/intarocrm/apihelper.php index ba3c7af..7e9a780 100644 --- a/system/library/intarocrm/apihelper.php +++ b/system/library/intarocrm/apihelper.php @@ -122,6 +122,16 @@ class ApiHelper $orderProducts = isset($data['products']) ? $data['products'] : $data['order_product']; foreach ($orderProducts as $product) { + $properties = array(); + if(isset($product['option']) && count($product['option']) > 0){ + foreach ($product['option'] as $option) { + $properties[]=array( + "code" =>$option['product_option_id'] + ,"name" =>$option['name'] + ,"value"=>$option['value'] + ); + } + } $order['items'][] = array( 'productId' => $product['product_id'], 'productName' => $product['name'],