$store_id=htmlentities($_REQUEST["store_id"]);
$name_eng=htmlentities($_REQUEST["name_eng"]);
$value=htmlentities($_REQUEST["value"]);
-$provider_id=intval($_REQUEST["provider_id"]);
+//$provider_id=intval($_REQUEST["provider_id"]);
$color=htmlentities($_REQUEST["color"]);
$store_id=htmlentities($_REQUEST["store_id"]);
$name_eng=htmlentities($_REQUEST["name_eng"]);
$value=htmlentities($_REQUEST["value"]);
-$provider_id=intval($_REQUEST["provider_id"]);
+//$provider_id=intval($_REQUEST["provider_id"]);
$color=htmlentities($_REQUEST["color"]);
AND store_id=? AND field_name=? AND field_id=? AND color=? LIMIT 1",[$product_id,$id,$store_id,$name_eng,$fieldId,$color]);
$value_old=str_replace('.000','',$value_old);
$sql="INSERT INTO store_orders_fields_data ($upFields) VALUES ($valuesFields) ON CONFLICT (order_id, product_id, store_id, field_id, field_name, color) DO UPDATE SET $pole='$value'";
-
$db::sql($sql);
//echo'сохранили '.$name_eng.' store_id='.$store_id.' '.$name_eng.' color='.$color.' value='.$value.' ';
if($field_name=="color_percent") {
//$tip="string";
//$value="p=$productId store= $storeId v=".$FiledsData[$field_name][$productId][$storeId][$color];
- $value=round($FiledsData[$field_name][$productId][$storeId][$color],2);
+ $value=round($FiledsData[$field_name][$productId][$storeId][$color] ?? 0,2);
}
//print_r($dostup_fields); exit();
$fieldId=$fieldsRows[$fieldName]["id"];
- $dostup=$dostup_fields[$fieldId];
- $bg=$bg_fields[$fieldId];
+ $dostup=$dostup_fields[$fieldId] ?? '';
+ $bg=$bg_fields[$fieldId] ?? '';
// $dostup="edit";
$data=$db::getRows($sql);
foreach($data as $row) {
$shipments_group_id=$ProductsOptions[$row["product_id"]]["shipments_group_id"];
- $data_field[$row["field_name"]][$shipments_group_id] +=$row["value"];
+ $data_field[$row["field_name"]][$shipments_group_id] = ($data_field[$row["field_name"]][$shipments_group_id] ?? 0) + $row["value"];
}