Run n98-magerun2 from everywhere
Are you still copying the n98-magerun2.phar to your project root? There is a better way to run the tool. I created a small video to show you your options.
Are you still copying the n98-magerun2.phar to your project root? There is a better way to run the tool. I created a small video to show you your options.
GraphQL Mesh is a powerful tool that allows you to use GraphQL query language, regardless of the source’s original format. It can be used with REST APIs, gRPC, SOAP, and more. In this blog post, we’ll explore how to set up and use GraphQL Mesh in your projects. Warning: The article requires a bit of NodeJS knowledge. The examples are tested with NodeJS 16.We also define a environment variable MAGENTO_ACCESS_TOKEN containing a a Magento Bearer Token. to access the API….
Introduction In some projects the amount of related products can be significant. In my case there were more than 300 related products and upsell products on some product detail pages. The consequence of this was a high time to first byte on product detail pages. In the mentioned project it was about 15 seconds for some of the products. So we searched for a possible optimization. We finally decided to implement asynchronous loading of product recommendations via AJAX. At the…
When a Magento shop – or any other PHP application – is required to request data from or transmit data to a remote server, it is often necessary to redirect the traffic through a Http-proxy server. In my case this was essential because the called endpoint allows only certain IP addresses to access the requested ressource. Since I am working from various locations, each having a different IP address, I had to find a way that certain Http-requests are routed…
Last month we received an invitation by our friends of Atwix to attend their Barcamp in Lviv/Ukraine. My colleague Oleksandr and me were happy to join it. Oleksandr was the perfect mate, because he was grown up in Ukraine and so he knows everything about the traditions and local specialities. Our journey started in Frankfurt. After a stopover in Munich we arrived on site with enough energy to explore the beautiful city of Lviv. Oleksandr introduced me to the local…
Sometimes one wrong line of code can break your site. In the following I will describe a mistake in a Magento 2 custom carrier implementation, which causes a massive overloading of server resources (CPU, RAM, DB processes) and even can cause an outage of your Magento store. The one line of code The following line of code is the reason for the problems, if used in the collectRates() method, or in methods, called from collectRates() in the Carrier class: $quote…
Composer is a great tool for requiring third party modules and software packages for your project. It’s an essential part of the current Magento 2 project structure. Because of the possibility to add more and more modules it is also getting more and more difficult to keep track of relevant security updates. That is especially the case when required modules have further requirements. Here are 3 tips how to improve your project’s security 1. Subscription of third party repositories (when…
This post is part of series: Part 1: Overview Part 2: Request and URI Part 3: Response Part 4: File Uploads Part 5: HTTP-Client Part 6: Server Request Part 7: Middleware Part 8: Usage in a Magento module In Part 3 we already discovered the RequestInterface which is used on client side. In this part, we have a more detailed look on the server side. The Server Request inherits all methods of the RequestInterface and has 13 additional methods. Six methods are available to…
This post is part of series: Part 1: Overview Part 2: Request and URI Part 3: Response Part 4: File Uploads Part 5: HTTP-Client Part 6: Server Request Part 7: Middleware Part 8: Usage in a Magento module The fifth part of the PSR-7 series describes the HTTP Client. The HTTP client is tool which sends a request to a server and returns the response. Sadly PSR-7 does not contain an interface for the HTTP client. The Standard contains only the HTTP messages. The…
With the recent update to version 63 for Chrome they introduced a feature, that redirects all *.dev calls from HTTP to HTTPS. If you are using *.dev domains to access your development machine, this behaviour is probably not what you want for all your local urls. Configuring dnsmasq At netz98 we are using dnsmasq to redirect all *.dev calls to our localhost. dnsmasq has a setting where you can easily change this to another domain like *.localhost . First of locate…