|
@@ -255,6 +255,11 @@ public function dp_update_combi_more(&$o, &$p_data_map, &$p_data_map_create, &$p
|
|
|
DB::p_update_row('product', $p_data_map['product'], ['id_product'=>$p_data['product']['id_product']], $p_data['product']);
|
|
|
// product_attribute_shop
|
|
|
DB::p_update_row('product_attribute_shop', $p_data_map['product_attribute_shop'], ['id_product_attribute'=>$p_data['product_attribute_shop']['id_product_attribute']], $p_data['product_attribute_shop']);
|
|
|
+ if (P_PRODUCT_CDC_DIMENSIONS) {
|
|
|
+ //var_dump($p_data_map['cdcd_product_combination_dimensions']); die();
|
|
|
+ // cdcd_product_combination_dimensions
|
|
|
+ static::p_update_row('cdcd_product_combination_dimensions', ['id_product'=>$p_data['product']['id_product'], 'id_product_attribute'=>$p_data['product_attribute_shop']['id_product_attribute']], $p_data_map, ['cdcd_product_combination_dimensions'=>['id_product'=>$p_data['product']['id_product'], 'id_product_attribute'=>$p_data['product_attribute_shop']['id_product_attribute']]], $p_data);
|
|
|
+ }
|
|
|
|
|
|
return $ret;
|
|
|
}
|
|
@@ -612,9 +617,9 @@ public function map_update_combi(&$o, &$d_data, &$p_data=[])
|
|
|
//'reference' => '', //$d_data['product']['ref'], // on laisse tel quel, c'est la liste des différentes déclinaisons
|
|
|
//'supplier_reference' => '',
|
|
|
//'location' => '',
|
|
|
- 'width' => ($d_data['product']['width'] ?$d_data['product']['width'] :0),
|
|
|
- 'height' => ($d_data['product']['height'] ?$d_data['product']['height'] :0),
|
|
|
- 'depth' => ($d_data['product']['length'] ?$d_data['product']['length'] :0),
|
|
|
+ 'width' => (!P_PRODUCT_CDC_DIMENSIONS && $d_data['product']['width'] ?$d_data['product']['width'] :0),
|
|
|
+ 'height' => (!P_PRODUCT_CDC_DIMENSIONS && $d_data['product']['height'] ?$d_data['product']['height'] :0),
|
|
|
+ 'depth' => (!P_PRODUCT_CDC_DIMENSIONS && $d_data['product']['length'] ?$d_data['product']['length'] :0),
|
|
|
'weight' => 0,
|
|
|
//'out_of_stock' => '0',
|
|
|
//'additional_delivery_times' => '0',
|
|
@@ -726,6 +731,12 @@ public function map_update_combi(&$o, &$d_data, &$p_data=[])
|
|
|
//$p_map_data['product']['supplier_direct_delivery_available'] = $d_data['product_extrafields']['supplier_direct_delivery'];
|
|
|
}
|
|
|
|
|
|
+ if (P_PRODUCT_CDC_DIMENSIONS) {
|
|
|
+ $p_data_map['cdcd_product_combination_dimensions']['width'] = ($d_data['product']['width'] ?$d_data['product']['width'] :0);
|
|
|
+ $p_data_map['cdcd_product_combination_dimensions']['height'] = ($d_data['product']['height'] ?$d_data['product']['height'] :0);
|
|
|
+ $p_data_map['cdcd_product_combination_dimensions']['depth'] = ($d_data['product']['length'] ?$d_data['product']['length'] :0);
|
|
|
+ }
|
|
|
+
|
|
|
return $p_data_map;
|
|
|
}
|
|
|
|