Update apihelper.php

Add export option in crm
This commit is contained in:
maxrip 2015-11-21 12:48:19 +03:00
parent 72919a236b
commit 292cf1487c

View File

@ -122,6 +122,16 @@ class ApiHelper
$orderProducts = isset($data['products']) ? $data['products'] : $data['order_product']; $orderProducts = isset($data['products']) ? $data['products'] : $data['order_product'];
foreach ($orderProducts as $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( $order['items'][] = array(
'productId' => $product['product_id'], 'productId' => $product['product_id'],
'productName' => $product['name'], 'productName' => $product['name'],