Logo BrocksiNet

BrocksiNet

Try to clean the web

Shopware 6

23.11.2022
php
shopware-6
Sometimes it is maybe useful to get the defaultTaxRate that is defined via Admin in Shopware 6. For this we have this small php function below to get the UUID from the SystemConfig and then search with the tax.repository to get the curent value. The system path to get the default UUID is core.tax.defaultTaxRate. Here is the PHP-Snippet for you ?float { $defaultTaxRateUuid = $this->systemConfig->get('core.tax.defaultTaxRate');
07.11.2022
shopware-6
Cover Image: CustomFields, Properties and Entity Extensions for Shopware 6
When you start working with Shopware 6 it can be hard to know what to use for what. So this guide will explain you the different aspects of CustomFields, Properties and Entity Extensions in Shopware 6. Disclaimer: This definition is maybe not correct in all parts, it is more less a guide to give you a feeling what to use when. Because you can solve same tasks in very different ways and maybe both will work. So feel free to comment when you think something should be changed or written in another
06.10.2022
shopware-6
PHPStan and Shopware 6 with CaptainHook as pre-commit hook
You working on a customer project and you want to make sure that you write code like a Shopware 6 core developer? Then you need all the shiny linters that the core developers are using. This guide will explain how to setup PHPStan and easy-coding-standard as a pre-commit hook with CaptainHook in a docker container setup. That's it, enjoy. 🤯 Requirement: Shopware 6 project running with docker containers. Warning: This are just local checks, you should also setup for example github
05.08.2022
shopware-6
Symfony Profiler formatted and runnable SQL-Query
There are always situations where you need to get the raw SQL query. Maybe to understand what is going on, to debug a problem on a production system or just for playing around in your favorit MySQL client to adjust the query. So let's see what kind of options you have to get the SQL query in Shopware 6. What should I use to debug the SQL in Shopware 6? Using the Symfony Profiler to debug SQL Using the FrosthDevelopmentHelper to debug SQL Using the Dbal/EntitySearcher to debug SQL Using the Symfo
30.06.2022
shopware-6
Custom field to select CMS layout on product level
The Content Management System in Shopware 6 is called Shopping Experiences. But in this post I will always talk from Content Management when I mean the Shopping Experiences, just to clarify. I will explain how you can use the Content Management to build custom product pages with Shopware 6. The idea is to connect your product (or other entities) with any CMS page and render the content from you CMS page into the DOM. At many page types and places you can add content via the administration (layou
22.03.2022
shopware-6
Screen with a lot of process.env's from vendor/shopware/administration/Resources/app/administration/webpack.config.js
With environement variabeles you can do a lot in Shopware 6. Especially when you use some build process to deploy your projects or test your plugins. So in this little post I will collect some of the important environment variables I found in Shopware 6. Maybe this will help you to find solutions for common problems. If I miss some variable that might be helpful pls leave a comment so I will update this post. Content - Environment variables in Shopware 6 Project Root App URL Mode Shopware Admin
25.01.2022
shopware-6
Shopware 6 config to disable options without results in filter navigation (category page)
In a default shopware 6 you will have filters for properties and you will have filters for manufacturer, rating, price and free shipping. But you will not have a filter for is in stock. But shopware has a nice documentation about how to add easily a listing filter. In this post I will tell you about the learnings and the troubles I had during adding this filter to the category listing. How filters work? And Troubles I had. You can scroll down to the implementation when you think you will not hav
10.01.2022
shopware-6
Required field for Shopware 6 Customer Profile Import/Export CSV
At some point in every project you need some customer data. And often it is the case that you need to import the customer data from some old source for example from WooCommerce. In this case you can use the csv import/export feature from Shopware 6 core. So this post is a small how to import/export customer data and create a profile for your needs in Shopware 6 admin. What we will do? Create a customer via administration Create a customer profile with data mapping Export existing customers via a
16.11.2021
shopware-6
Looks easy? 😉 But did you checked in detail the differences or you just use always the product.repository? Let's deep dive into the core files to fully understand the differences so you can decide what to use when. 💙 First of all there is a file called: EntityRepositoryInterface.php where you can see what kind of methodes you can use like search, update, merge and many more. You need to know that Shopware 6 uses Data Abstraction Layer (DAL) and generates for every entity the corr
08.11.2021
shopware-6
With the fresh new shopware 6 version 6.4.6.0 there is a new much awaited (!) feature the flow builder. In this blog post we will check the shopware 6 core how easy or hard it is to create own actions for the flow builder. To have an general idea what the flow builder can do for you, you should at least read the flow builder documention on shopware 6 docs. In short words: You can create custom (business) processes without coding. You can create this custom process via admin by defining triggers