|
|
@@ -188,6 +188,12 @@ class SiteController extends BaseController
|
|
|
$adminCountry = AdminCountry::getCountry($adminId);
|
|
|
|
|
|
$countries = array_filter($countries, fn($country) => in_array($country['ID'], $adminCountry));
|
|
|
+ $countries = array_values($countries);
|
|
|
+// foreach ($countries as $key => $country) {
|
|
|
+// if (!in_array($country['ID'], $adminCountry)) {
|
|
|
+// unset($countries[$key]);
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -203,12 +209,6 @@ class SiteController extends BaseController
|
|
|
$country['CURRENCY_PRODUCT_RATE'] = $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0;
|
|
|
}
|
|
|
|
|
|
-// $countries = array_map(fn($country) => [
|
|
|
-// ...$country,
|
|
|
-// 'LOCAL_CURRENCY_NAME' => $currencies[$country['LOCAL_CURRENCY_ID']]['NAME'] ?? '',
|
|
|
-// 'CURRENCY_PRODUCT_RATE' => $currenciesConversions[$country['LOCAL_CURRENCY_ID']]['PRODUCT_RATE'] ?? 0,
|
|
|
-// ], $countries);
|
|
|
-
|
|
|
return static::notice(['data' => $countries]);
|
|
|
}
|
|
|
|