|
|
@@ -754,8 +754,18 @@ class ProductClass extends BaseClass
|
|
|
if (empty($product) || isset($product['price']) == false) {
|
|
|
return 0;
|
|
|
}
|
|
|
- $currentPriceField = $priceMap[$level] ?? 'price';
|
|
|
- $price = $product[$currentPriceField] ?? 0;
|
|
|
+ if ($level == 9) {
|
|
|
+ $avCost = $product['avCost'] ?? 0;
|
|
|
+ $price = $avCost;
|
|
|
+ if ($price <= 0) {
|
|
|
+ $cost = $product['cost'] ?? 0;
|
|
|
+ $price = $cost;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $currentPriceField = $priceMap[$level] ?? 'price';
|
|
|
+ $price = $product[$currentPriceField] ?? 0;
|
|
|
+ }
|
|
|
+
|
|
|
$discountPrice = $product['discountPrice'] ?? 0;
|
|
|
$hjDiscountPrice = $product['hjDiscountPrice'] ?? 0;
|
|
|
$skDiscountPrice = $product['skDiscountPrice'] ?? 0;
|