修改购物车商品分组价格查询

This commit is contained in:
DESKTOP-GMUNQ1B\Administrator 2024-12-09 17:18:13 +08:00
parent a7a1c0bff4
commit e3cff35799

View File

@ -76,6 +76,7 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
$find = StoreProduct::where(['id' => $item['product_id']])
->field($field)
->find();
$find = StoreProductGroupPrice::resetProductPrice($find, $user_ship);
if ($find) {
if ($off_activity == 1) {
$this->activity_price = bcadd(bcmul($find['cost'], $item['cart_num'], 2), $this->activity_price, 2);
@ -93,7 +94,6 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
$item['unit_name'] = StoreProductUnit::where('id', $find['unit'])->value('name');
}
}
$list = StoreProductGroupPrice::resetProductsPrice($list, $user_ship);
return $list;
}