Shopware: Save new entity – don’t use getVars()

I’m a Magento developer and therefore I save entities. I’m used to it and using a class to set all properties on it is a great way to interact with an entity. Shopware doesn’t. To create a new entity you call create on a repository and pass an array to it. Like this example from“Shopware: Save new entity – don’t use getVars()” weiterlesen

Shopware: Automation around documents

One of our customers wanted us to import their invoices from their ERP system. And although Shopware is able to use custom pdf files for their invoices, there is no automation yet to do this. To create an invoice with a custom pdf file you need to do the following: Invocie number must be unique“Shopware: Automation around documents” weiterlesen

Shopware: BaseURL in Email Template

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: Just in case you don’t know what happens: salesChannel is imho always passed to the mails. We take the sales“Shopware: BaseURL in Email Template” weiterlesen

Shopware: Rule not showing up (Grand Total vs Total)

Today I learned… If you create rules and want to use them inside of promotions you are not allowed to use Grand Total but Total in your conditions. Which totally makes sense, because applying the promotion changes the grand total. So make sure to use Total:

Shopware: Landingpage outside of Shopware and “add to cart”

First things first: Don’t. This is a bad idea, because it lacks tracking, cookie consent and most likely more things, you just get for free if you implement either just a nice landing page inside of Shopware or if you need more liberty have your own controller and template (with all the benefits, like extending“Shopware: Landingpage outside of Shopware and “add to cart”” weiterlesen

Shopware: Debug SQL Queries on the CLI

You are trying to debug a Command, ScheduledTask or Message on the queue? Symfony Profiler and toolbar For the frontend it is easy, you can just use the Symfony Profiler – easily activated by turning on the dev mode. This can be done, by changing APP_ENV=”prod” to APP_ENV=”dev” in your .env file. And then you“Shopware: Debug SQL Queries on the CLI” weiterlesen

MessengerPass::getServiceClass() must be of the type string, null returned

You are implement a scheduled task in Shopware 6 and get a weird error message? Then you maybe copied the classnames of your TaskHandler and/or Task with a \ prefix. This is wrong: This is correct: The difference? The id: I hope this helps someone 🙂