diff --git a/src/Eccube/Controller/ShoppingController.php b/src/Eccube/Controller/ShoppingController.php index 8e99094d73c..4f532895098 100644 --- a/src/Eccube/Controller/ShoppingController.php +++ b/src/Eccube/Controller/ShoppingController.php @@ -205,11 +205,17 @@ public function redirectTo(Request $request, RouterInterface $router) // リダイレクト先のチェック. $pattern = '/^'.preg_quote($request->getBasePath(), '/').'/'; $redirectTo = preg_replace($pattern, '', $redirectTo); + //リダイレクト先にアンカーが設定されてたらflagmentに設定 + $redirectTo = explode("#",$redirectTo); + $fragment = $redirectTo[1]; + $redirectTo = $redirectTo[0]; + $result = $router->match($redirectTo); // パラメータのみ抽出 $params = array_filter($result, function ($key) { return 0 !== \strpos($key, '_'); }, ARRAY_FILTER_USE_KEY); + $params['_fragment'] = $fragment; log_info('[リダイレクト] リダイレクトを実行します.', [$result['_route'], $params]); diff --git a/src/Eccube/Resource/template/default/Shopping/index.twig b/src/Eccube/Resource/template/default/Shopping/index.twig index fcc1b4d9160..4096e2184ef 100644 --- a/src/Eccube/Resource/template/default/Shopping/index.twig +++ b/src/Eccube/Resource/template/default/Shopping/index.twig @@ -344,7 +344,7 @@ file that was distributed with this source code. -
+

{{ 'front.shopping.payment_info'|trans }}

@@ -352,7 +352,7 @@ file that was distributed with this source code. {% for key, child in form.Payment %}
{% set Payment = form.Payment.vars.choices[key].data %} - {{ form_widget(child, { 'attr': { 'data-trigger': 'change' }}) }} + {{ form_widget(child, { 'attr': { 'data-trigger': 'change', 'data-path': '/shopping#payment-method' }}) }} {% if Payment.payment_image is not null %}

{% endif %}