|
|
@@ -164,9 +164,6 @@ class ShopController extends BaseController {
|
|
|
$data['SELL_DISCOUNT'] = ShopGoods::getGoodType()[$data['TYPE']]['discount']/100;
|
|
|
}
|
|
|
|
|
|
- // 商品属性
|
|
|
- $shopGoodsNature = ShopGoodsNature::findAllAsArray('GOODS_ID=:GOODS_ID', [':GOODS_ID' => $id]);
|
|
|
-// $shopGoodsNature = '';
|
|
|
// 国家
|
|
|
$countries = Cache::getCountries();
|
|
|
// 货币
|
|
|
@@ -174,12 +171,13 @@ class ShopController extends BaseController {
|
|
|
$currencies = array_column($currencies, NULL, 'ID');
|
|
|
|
|
|
foreach ($countries as &$country) {
|
|
|
+ // 货币
|
|
|
$country['LOCAL_CURRENCY_NAME'] = $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '';
|
|
|
+ // 商品属性
|
|
|
+ $country['SHOP_GOODS_NATURE'] = ShopGoodsNature::findAllAsArray('GOODS_ID=:GOODS_ID AND COUNTRY_ID=:COUNTRY_ID', [':GOODS_ID' => $id, ':COUNTRY_ID' => $country['ID']]);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- $data['SHOP_GOODS_NATURE'] = $currencies;
|
|
|
+ $data['SHOP_GOODS_NATURE'] = $countries;
|
|
|
|
|
|
return static::notice(
|
|
|
[
|