|
|
@@ -843,6 +843,7 @@ class OrderForm extends Model
|
|
|
$goodsType = ShopGoods::getGoodType();
|
|
|
$hasInstalment = 0;
|
|
|
$userId = Info::getUserIdByUserName($this->userName);
|
|
|
+ $exchangeRate = floatval(Cache::getSystemConfig()['exchangeRate']['VALUE'] ?? 0); // 汇率
|
|
|
foreach ($this->goodsNum as $k => $v) {
|
|
|
if ($v) {
|
|
|
$goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
|
|
|
@@ -854,10 +855,12 @@ class OrderForm extends Model
|
|
|
$discount = $goodsType[$goods['TYPE']]['discount'];
|
|
|
$realPrice = $goods['SELL_PRICE'] * $discount/100;
|
|
|
$realPv = $goods['PRICE_PV'] * $discount/100;
|
|
|
+ $realPriceStandard = $goods['SELL_PRICE_STANDARD'] * $discount/100;
|
|
|
} else {
|
|
|
$discount = $goods['SELL_DISCOUNT'];
|
|
|
$realPrice = $goods['SELL_PRICE'] * $discount;
|
|
|
$realPv = $goods['PRICE_PV'] * $discount;
|
|
|
+ $realPriceStandard = $goods['SELL_PRICE_STANDARD'] * $discount;
|
|
|
}
|
|
|
$totalAmount += $realPrice * intval($v);
|
|
|
$totalPv += $realPv * intval($v);
|
|
|
@@ -872,6 +875,12 @@ class OrderForm extends Model
|
|
|
'SKU_CODE' => $goods['GOODS_NO'],
|
|
|
'GOODS_TITLE' => $goods['GOODS_NAME'],
|
|
|
'STANDARD_PRICE' => $goods['SELL_PRICE_STANDARD'],
|
|
|
+ 'TAX_RATE' => $goods['TAX_RATE'],
|
|
|
+ 'CATEGORY_TYPE' => $goods['CATEGORY_TYPE'],
|
|
|
+ 'PAY_TYPE' => $this->payType ?? '',
|
|
|
+ 'EMAIL' => $this->email ?? '',
|
|
|
+ 'REAL_STANDARD_PRICE' => $realPriceStandard,
|
|
|
+ 'EXCHANGE_RATE' => $exchangeRate,
|
|
|
];
|
|
|
}
|
|
|
if($goods['INSTALMENT']>0){ // 如果有分期付款商品,检查用户的分期付款状态
|