shish hace 3 años
padre
commit
db97907862
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      biz-ghs/product/classes/ProductClass.php

+ 7 - 0
biz-ghs/product/classes/ProductClass.php

@@ -132,6 +132,13 @@ class ProductClass extends BaseClass
             //今日特价、会员价
             $price = self::getFinalPrice($v, $level, $priceMap, $addPriceMap);
 
+            //零售做特价时的原价
+            if ($level == 0) {
+                $currentAddPriceField = $addPriceMap[$level] ?? 'addPrice';
+                $currentAddPrice = $v[$currentAddPriceField] ?? 0;
+                $list[$k]['prePrice'] = bcadd($v['price'], $currentAddPrice, 2);
+            }
+
             $list[$k]['price'] = $price;
             $list[$k]['bigPrice'] = $price;
             $smallRatio = $v['smallRatio'] ?? 0;