Before running your store in production mode it’s very important to check as many Magento 2 performance aspects as possible, since even a minor performance issue might cost time and money in the future. Formally, a web application’s performance can be classified using two parts: frontend performance and backend performance.
During our work with the Magento 2 Rich Snippets module, we noticed numerous errors on the product list page when switched to list mode. The errors were generated by the standard Magento 2 Luma theme, when attempting to aggregate rating markup rendering for each product in the product list. This article outlines a configurable solution to address this issue. We will have an opportunity to disable this fix for any custom theme which doesn’t have this error or in case the next Magento 2 version has a fix for this included.
When discussing bottlenecks in Magento backend implementations, we often refer to the built-in profiler, which allows us to view the loading times of specific backend functional elements. There are two general factors of such bottlenecks: heavy (or repetitive) database calls or slow PHP operations such as loops and similar cases.
Scheduled background processes are important in any large system. Clean ups and keeping cache and indexes up to date allow to keep your system healthy, while some processes are simply need to be stretched in time in order to avoid high system load, memory leaks or certain services overload (massive emails sending). Setting up a cron job for such processes and for the processes that should be repeated from time to time is always a good idea. In this blog post we will describe how to set a certain part of code as a cron job in Magento 2.
One of Magento 2 goals is to enable performance for all and scalability for Enterprise customers. Page Cache plays an important role in Magento 2. Starting from Magento 2.0.0 release Page Cache functionality (it is also known as Magento Full Page Cache) is available for Magento 2 Community Edition.
As we all know, the page’s HTML <head> section contains different meta tags, CSS and JS files definition, pieces of JS code etc. As a rule, we don’t need any complex logic to add some proper content there. However, let’s imagine the situation when we need to insert some element that depends on the system configuration or so into the head section.
We remember the time when we were waiting for Magento 2 release and were so excited when it happened. Magento team put a lot of effort into that release and delighted us with new improvements. Since that time, many store owners come curious to know if they should migrate the store from Magento 1 to Magento 2 and if so – when it should happen.
Have you ever edited a CMS page? Perhaps you’ve inserted a custom image or just added a link to another page of your store. What did you do for that? We assume that you simply copy-pasted the link from your browser and inserted it to the CMS page directly. Then, you have edited one more CMS page or block in the same way. It looks like a good solution. However, imagine that one day you will need a solution for changing, let’s say, a domain name of your store. You will need to fix the old domain name in each of the edited CMS pages and blocks to prevent redirect to it. This is not good approach and, to improve that process, we should use directives.
When we need to update information for products, we can do it directly on the edit product page – however, this process requires much time in case we work with hundreds of products. And there is another way to do it as both Magento 1 and Magento 2 have the ability of massive update of related products, up-sells and cross-sells. Let’s find out more information in this article.
We are going to talk about event system approach in development. The event is a very flexible way to extend application logic. This approach is actual in both Magento 1 and Magento 2. Let’s go ahead and check how it works.