|
|
@@ -622,7 +622,14 @@ class ProductClass extends BaseClass
|
|
|
$discountPrice = $product['discountPrice'] ?? 0;
|
|
|
if ($discountPrice > 0) {
|
|
|
if ($level == 0) {
|
|
|
- $price = $discountPrice;
|
|
|
+ $skMore = $product['skMore'] ?? 0;
|
|
|
+ $addPrice = $product['addPrice'] ?? 0;
|
|
|
+ $diff = bcsub($skMore,$addPrice, 2);
|
|
|
+ if ($diff > 0) {
|
|
|
+ $price = bcsub($discountPrice, $diff, 2);
|
|
|
+ } else {
|
|
|
+ $price = $discountPrice;
|
|
|
+ }
|
|
|
}
|
|
|
if ($level == 1) {
|
|
|
$price = $discountPrice;
|