Shopware: BaseURL in Email Template
Fabian Blechschmidt
You need the base url of your shopware shop, root url, domain of the sales channel – yes that is for SEO, so I find next time my own post to copy paste the solution:
{{ salesChannel.domains.first.url }}
Just in case you don’t know what happens: salesChannel is imho always passed to the mails. We take the sales channel, get the domains, take the first() (of the collection) and getUrl.
Or in other words:
$data['salesChannel']->getDomains()->first()->getUrl()
Other articles from this category
PHPStorm/IDEA, composer updates and 100% CPU
In one of our projects PHPStorm ran a while on 100% CPU, an investigation showed, that the process „checking for available composer updates“ ran and used all the resources. Most likely it got stuck somewhere. To get rid of the problem, one can turn off this feature. In IDEA Ultimate here: [Settings] -> Languages & […]
Custom Fields, dots and MySQL’s JSON_EXTRACT
We all know custom fields – hopefully – at least this is not about the basics. You can add custom fields to nearly all entites: orders, products, categories, … You can name them whatever you like, e.g. pluginname.property – but using dots . in your custom field name is a bad idea, because then you […]
gpg failed to sign the data
I was doing some work, when suddenly my git failed to commit changed. I dig a little around, asked StackOverflow but it didn’t help. Finally when running the commit manually and not through PHPStorm I got a proper error: Ah! The key is expired! Got it. Did you know you can extend a GPG key? […]