|
|
@@ -1170,7 +1170,7 @@ class ProductClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
//下单时计算商品的价格 lqh 2021.1.28
|
|
|
- public static function formatProductInfo($itemInfo, $level = 0, $live = 1)
|
|
|
+ public static function formatProductInfo($itemInfo, $level = 0, $live = 1, $moreParams = [])
|
|
|
{
|
|
|
$data = [];
|
|
|
if (empty($itemInfo)) {
|
|
|
@@ -1188,6 +1188,9 @@ class ProductClass extends BaseClass
|
|
|
$hdProductData = ProductClass::getByIds($hdIds, null, 'id');
|
|
|
}
|
|
|
|
|
|
+ $book = $moreParams['book'] ?? 0;
|
|
|
+ $customShopAdminId = $moreParams['customShopAdminId'] ?? 0;
|
|
|
+
|
|
|
$totalPrice = 0;
|
|
|
$totalBigNum = 0;
|
|
|
$totalSmallNum = 0;
|
|
|
@@ -1219,8 +1222,13 @@ class ProductClass extends BaseClass
|
|
|
if ($live == 1) {
|
|
|
//供货商开单可以传单价过来
|
|
|
$changePrice = isset($v['price']) && $v['price'] > 0 ? $v['price'] : 0;
|
|
|
- //今日特价、会员价
|
|
|
- $itemPrice = self::getFinalPrice($currentGhsProduct, $level, $priceMap, $addPriceMap, $changePrice, $itemNum);
|
|
|
+ //如果零售店自己下预订单,预付0.1元,有二个地方要同步修改,搜索关键词 pre0.1
|
|
|
+ if ($book == 1 && $customShopAdminId > 0) {
|
|
|
+ $itemPrice = 0.1;
|
|
|
+ } else {
|
|
|
+ //今日特价、会员价
|
|
|
+ $itemPrice = self::getFinalPrice($currentGhsProduct, $level, $priceMap, $addPriceMap, $changePrice, $itemNum);
|
|
|
+ }
|
|
|
$thisPrice = $itemPrice;
|
|
|
|
|
|
$reachNum = $currentGhsProduct['reachNum'] ?? 0;
|