Handle locale for storefrontRedirect #2562
Closed
theocerutti
started this conversation in
Ideas + Feature Requests
Replies: 1 comment
-
Thank you for reporting. I've created #2564 to track this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I had few cases were I couldn't use storefrontRedirect so I had to do my own implementation (by copy-pasting storefrontRedirect code and modify it).
The main thing is that it doesn't handle route params, e.g locale.
For example, there is a redirect configured in Shopify like following:
From: /myUrlFrom, To: /myUrlTo
The storefront redirect will not handle theses:
/fr/myUrlFrom/ -> doesn't match any redirect url
So we should have a parameter or something to deal with locale.
In my own implementation I added 2 paramaters:
Since we are not tied anymore to the request parameter we can pass everything we want. Also if we want to prefix the redirect url we can.
Beta Was this translation helpful? Give feedback.
All reactions