|
@@ -125,7 +125,7 @@ class StoreProduct extends BaseModel
|
|
|
}
|
|
}
|
|
|
if ($store_id) {
|
|
if ($store_id) {
|
|
|
$stockinfo = SystemStoreProductStock::where('product_id', $item['id'])->where('store_id', $store_id)->find();
|
|
$stockinfo = SystemStoreProductStock::where('product_id', $item['id'])->where('store_id', $store_id)->find();
|
|
|
- $item['price'] = $stockinfo ? SystemStoreProductStock::where('product_id', $item['id'])->where('store_id', $store_id)->min('price') : $item['price'];
|
|
|
|
|
|
|
+ $item['price'] = ($stockinfo && SystemStoreProductStock::where('product_id', $item['id'])->where('store_id', $store_id)->min('price') > 0) ? SystemStoreProductStock::where('product_id', $item['id'])->where('store_id', $store_id)->min('price') : $item['price'];
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
$list = count($list) ? $list->toArray() : [];
|
|
$list = count($list) ? $list->toArray() : [];
|