From dde75ae85d0199f52960012bafa534b7856913ab Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Thu, 28 Oct 2021 08:13:18 +0600 Subject: [PATCH] 1.3.3: https://github.com/mage2pro/core/issues/163 --- .../App/FrontControllerInterface.php | 29 +++++++------------ composer.json | 4 +-- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Plugin/Framework/App/FrontControllerInterface.php b/Plugin/Framework/App/FrontControllerInterface.php index 1a706ad..274210a 100644 --- a/Plugin/Framework/App/FrontControllerInterface.php +++ b/Plugin/Framework/App/FrontControllerInterface.php @@ -1,9 +1,7 @@ country())) /** @var string $c */ { - $s2->country($c = (df_is_localhost() ? 'HR' : df_visitor()->iso2())); + $s = Sess::s(); /** @var Sess $s */ + if (!($c = $s->country())) /** @var string $c */ { + $s->country($c = (df_is_localhost() ? 'HR' : df_visitor()->iso2())); } - if (!$s2->redirected()) { + if (!$s->redirected()) { if (df_url_path_contains(Switcher::PATH)) { - $s2->redirected(true); + $s->redirected(true); } else { # «При первичном посещении клиента с IP адресом из Германии, Австрии, Швейцарии - @@ -66,7 +60,6 @@ function aroundDispatch(Sb $sb, \Closure $f, IRequest $r) { $res = df_o(Response::class); $res->setRedirect(df_url_frontend(Switcher::PATH, Switcher::params($c))); } - $s->setDfeFrugueRedirectStarted(!!$res); } } } diff --git a/composer.json b/composer.json index 1d0e666..c379eff 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "frugue/store" - ,"version": "1.3.2" + ,"version": "1.3.3" ,"description": "A custom store module for frugue.com" ,"type": "magento2-module" ,"homepage": "https://github.com/frugue/store" @@ -11,7 +11,7 @@ ,"homepage": "https://mage2.pro/users/dmitry_fedyuk" ,"role": "Developer" }] - ,"require": {"frugue/core": ">=0.3.2", "mage2pro/core": ">=5.6.9", "mage2pro/flag": ">=1.0.5"} + ,"require": {"frugue/core": ">=0.8.2", "mage2pro/core": ">=7.8.8", "mage2pro/flag": ">=1.0.5"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Frugue\\Store\\": ""}} ,"keywords": ["Magento 2"] }