mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 07:20:56 +00:00
批量修改商品时候选择运费设置不修改特殊类型商品
This commit is contained in:
parent
2e0326b5d9
commit
aff05dc85c
@ -2017,13 +2017,15 @@ class StoreProductServices extends BaseServices
|
||||
break;
|
||||
case 2:
|
||||
foreach ($ids as $product_id) {
|
||||
$batchData[] = [
|
||||
'id' => $product_id,
|
||||
'logistics' => implode(',', $data['logistics']),
|
||||
'freight' => $data['freight'],
|
||||
'postage' => $data['freight'] == 2 ? $data['postage'] : 0,
|
||||
'temp_id' => $data['freight'] == 3 ? $data['temp_id'] : 0
|
||||
];
|
||||
if ($this->dao->value(['id' => $product_id], 'virtual_type') == 0) {
|
||||
$batchData[] = [
|
||||
'id' => $product_id,
|
||||
'logistics' => implode(',', $data['logistics']),
|
||||
'freight' => $data['freight'],
|
||||
'postage' => $data['freight'] == 2 ? $data['postage'] : 0,
|
||||
'temp_id' => $data['freight'] == 3 ? $data['temp_id'] : 0
|
||||
];
|
||||
}
|
||||
}
|
||||
if (count($batchData)) $this->dao->saveAll($batchData);
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user