|
@@ -220,8 +220,15 @@ class Info
|
|
|
if ($data['price_type'] == 4) {
|
|
|
if (isset($data['goods']) && is_array($data['goods'])) {
|
|
|
foreach ($data['goods'] as $k => $v) {
|
|
|
- $data['goods'][$k]['total'] = $this->getTotal($other, -1);
|
|
|
+ $where = array();
|
|
|
+ $where['shop_id'] = $shop_id;
|
|
|
+ $where['goods_id'] = $v['id'];
|
|
|
+ $gother = Dever::db('shop/goods_sku')->getData($where);
|
|
|
+ $data['goods'][$k]['total'] = $this->getTotal($gother, -1);
|
|
|
|
|
|
+ if ($data['total'] == 0) {
|
|
|
+ $data['total'] = $data['goods'][$k]['total'];
|
|
|
+ }
|
|
|
if ($data['total'] > $data['goods'][$k]['total']) {
|
|
|
$data['total'] = $data['goods'][$k]['total'];
|
|
|
}
|