Jelajahi Sumber

feat: NG-15: 新会员注册时增加国家与语言选项.

kevin 1 tahun lalu
induk
melakukan
15833ef37b
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      common/models/forms/ShopGoodsForm.php

+ 3 - 3
common/models/forms/ShopGoodsForm.php

@@ -275,15 +275,15 @@ class ShopGoodsForm extends Model
             // 商品属性
             foreach ($this->nature as $item) {
                 // 国家
-                $country = Countries::getById($item['countryId']);
+                $country = Countries::getById($item['ID']);
                 // 转换美元汇率
-                $rate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
+                $productRate = CurrencyConversions::getToUSDRate($country['LOCAL_CURRENCY_ID']);
 
                 $shopGoodsNature = new ShopGoodsNature();
                 $shopGoodsNature->GOODS_ID = $model->ID;
                 $shopGoodsNature->COUNTRY_ID = $item['ID'];
                 $shopGoodsNature->LOCAL_CURRENCY_ID = $country['LOCAL_CURRENCY_ID'];
-                $shopGoodsNature->MARKET_PRICE = $model->SELL_PRICE_STANDARD * $rate;
+                $shopGoodsNature->MARKET_PRICE = $model->SELL_PRICE_STANDARD * $productRate;
                 $shopGoodsNature->SELL_PRICE = $item['sellPrice'];
                 $shopGoodsNature->TAX_RATE = $item['taxRate'];
                 if (!$shopGoodsNature->save()) {