Merge branch 'feature/vehicle_new_sku' into develop
This commit is contained in:
@@ -44,12 +44,16 @@ class VehicleNewAttributesController extends BaseController
|
||||
$result = [
|
||||
'id' => $item['id'],
|
||||
'status' => $item['status'],
|
||||
'category_id' => $item['category_id'],
|
||||
'input_type' => $item['input_type'],
|
||||
'is_img' => $item['is_img'],
|
||||
'attribute_name' => isset($item['translation']) ? $item['translation']['attribute_name'] : '',
|
||||
];
|
||||
|
||||
foreach ($item['value'] as $value) {
|
||||
$valueRes['id'] = $value['id'];
|
||||
$valueRes['attribute_id'] = $value['attribute_id'];
|
||||
$valueRes['color_code'] = $value['color_code'];
|
||||
$valueRes['value_name'] = isset($value['translation']) ? $value['translation']['value_name']:'';
|
||||
$result['value'][] = $valueRes;
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ class VehicleNewAttributesService extends BaseService
|
||||
return [
|
||||
'filters' => [
|
||||
],
|
||||
'fields' => ['id','status'],
|
||||
'fields' => ['id','status', 'input_type', 'category_id', 'is_img'],
|
||||
'relations' => [
|
||||
'translation' => ['attributes_id', 'locale', 'attribute_name'],
|
||||
'value' => ['id', 'attribute_id', 'sort_order'],
|
||||
'value' => ['id', 'attribute_id', 'color_code', 'sort_order'],
|
||||
'value.translation' => ['id', 'values_id', 'locale', 'value_name'],
|
||||
],
|
||||
'sorts' => [
|
||||
@@ -68,10 +68,10 @@ class VehicleNewAttributesService extends BaseService
|
||||
'filters' => [
|
||||
['field'=>'id', 'operator'=>'=', 'value'=> $params['id']],
|
||||
],
|
||||
'fields' => ['id', 'status'],
|
||||
'fields' => ['id', 'status', 'input_type', 'category_id', 'is_img'],
|
||||
'relations' => [
|
||||
'translation' => ['attributes_id', 'locale', 'attribute_name'],
|
||||
'value' => ['id', 'attribute_id', 'sort_order'],
|
||||
'translation' => ['attributes_id', 'locale', 'attribute_name'],
|
||||
'value' => ['id', 'attribute_id', 'color_code', 'sort_order'],
|
||||
'value.translation' => ['id', 'values_id', 'locale', 'value_name'],
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user