Shopware 6: How to URL in emails

A couple of weeks ago, I wrote about URLs:

and today I discovered, that:

{{ seoUrl() }} is broken in emails, because it doesn’t contain the domain!

To have proper emails we now use {{ rawUrl() }}, it works like seoUrl but you can add the domain to it as third parameter.

An example from the order confirmation:

{{ rawUrl('frontend.account.order.single.page', { 'deepLinkCode': order.deepLinkCode }, salesChannel.domains|first.url) }}

One thought on “Shopware 6: How to URL in emails

Leave a Reply