diff --git a/Model/Config/OpenWeather.php b/Model/Config/OpenWeather.php index 5a74e35..f4477d8 100644 --- a/Model/Config/OpenWeather.php +++ b/Model/Config/OpenWeather.php @@ -15,7 +15,7 @@ */ final class OpenWeather { - private const CONFIG_PATH_SNOWFLAKE_OPENWEATHERMAP_ENABLED = 'snowflake/api/enable_api'; + private const CONFIG_PATH_SNOWFLAKE_OPENWEATHERMAP_ENABLED = 'snowflake/api/enable'; private const CONFIG_PATH_SNOWFLAKE_OPENWEATHERMAP_API_KEY = 'snowflake/api/api_key'; private const CONFIG_PATH_SNOWFLAKE_IP_LOCATOR_API_URL = 'snowflake/api/ip_info_api_url'; diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index a4f5ae7..0fbdb50 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -21,16 +21,16 @@ - Icon to display as a snowflake `❄`️. + more emoji.]]> Opengento\Snowflake\Model\Config\Backend\EmojiConverter 1 - + Magento\Config\Model\Config\Source\Yesno - ⚠️ Display snow whatever is the weather (this makes OpenWeatherMap API useless). + 1 @@ -84,7 +84,7 @@ Force Display.]]> - + Magento\Config\Model\Config\Source\Enabledisable diff --git a/etc/config.xml b/etc/config.xml index 67c48d4..44bf1f7 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -10,7 +10,8 @@ 0 - "\u2744" + "\u2744\ufe0f" + 0 0.75 0.75 70 @@ -20,7 +21,6 @@ 6 - 0 https://ipinfo.io/json diff --git a/view/frontend/templates/snowflake.phtml b/view/frontend/templates/snowflake.phtml index 7b66cfb..805882f 100644 --- a/view/frontend/templates/snowflake.phtml +++ b/view/frontend/templates/snowflake.phtml @@ -34,7 +34,7 @@ $viewModel = $block->getData('viewModel'); [lat, lon] = response.loc.split(','); $.ajax({ url: 'getData('meteoUrl') ?>lat/' + lat + '/lon/' + lon, - type: "POST", + type: "GET", }).done(function (data) { if (data.is_snowing) { letSnow();