Reputation: 1078
I want to get full current domain configured for the saleschannel of the current request.
Because Shopware also allows directory-URLs as saleschannel domain (e.g. https://www.example.com/de), it is not safe to just use the host from the request for example.
Upvotes: 2
Views: 1717
Reputation: 1078
After some digging around, I found that you can use app.request.get('sw-storefront-url')
in your TWIG template. This information is of course not only available in TWIG context, you can use it everywhere you have access to the request.
Upvotes: 4