How It Works: Magento 2 Partial Index

April 11, 2017 / Posted in Magento, Magento 2 by Artsem Miklashevich
How It Works: Magento 2 Partial Index

Anyone who has ever used Magento 1 or Magento 2 knows about such feature as index. It is pretty important and useful since everything that is displayed on the frontend is related to index. Indexing by itself is a pretty long process that is why partial index has been available almost since the first version of Magento. Partial index means that we index not the whole document but only the part that has been modified. (more…)

Use Case: Config.php File in Magento 2

March 23, 2017 / Posted in Magento, Magento 2 by Artsem Miklashevich
Use Case: Config.php File in Magento 2

New projects are usually developed on a separate dedicated web-server which settings may differ from those of a production server. So, to avoid mess-ups when trying to back up the production server it is required either to reassign data in the core_config table or to use a special script. The situation goes worse when there is more than one developer involved in the same project, because each developer may use its own custom set of server configurations. (more…)

How to Manage CustomerData Entity in Magento 2

January 31, 2017 / Posted in Magento, Magento 2 by Artsem Miklashevich
How to Manage CustomerData Entity in Magento 2

In my previous article I described different ways how you may use CustomerData for your own purposes. It is also possible to control data actuality from the frontend-side by describing the file sections.xml, i.e. we can define specific paths which will update specific sections of customerData upon receiving a request. But this is true only for POST and PUT types of requests. But what would you do if you needed to update some page section without using AJAX or sending any requests? That is why we need to have the possibility to control customerData sections also from the backend-side. For example, you use a system which automatically adds a product to the shopping cart once you load a specific URL. So, at first sight everything looks fine and the system is working perfectly well, however, there is one drawback: once a product is added to the shopping cart but the cart has not been updated yet on the client-side you will have no possibility to access user’s browser local storage. But in Magento 2 there is a way to update data which have been initialized in the backend. You need to use cookies for that. Let’s have a look at the following code in the file:

(more…)

Customer Data Management in Magento 2

January 3, 2017 / Posted in Magento, Magento 2 by Artsem Miklashevich
Customer Data Management in Magento 2

It happens that you are frequently facing asynchronous data loading while working with Magento 2. For example cart reloading, checkout, logging and user log in and some others are working through AJAX. In order to work with these data, Magento development team provides with a proper interface, that we are going to overview in this article. (more…)

How it Works: Cron Job in Magento 2

November 17, 2016 / Posted in Magento, Magento 2, Tips&Tricks by Artsem Miklashevich
How it Works: Cron Job in Magento 2

For the purpose of speeding up Magento frontend performance, some tasks are executed in separate processes in the background. Stock updating, cache flushing, catalog updating, product price calculating: these are very heavy and time-consuming processes, that’s why as general they are executed in the background and usually by Cron. The description of how to add 3 processes in Cron you can find in Magento 2 Developer Documentation.

(more…)

JavaScript Integration Tips in Magento 2

September 15, 2016 / Posted in Magento, Magento 2 by Artsem Miklashevich
JavaScript Integration Tips in Magento 2

One of the main differences in comparison with Magento 1 is the usage and connection of javascript in the extensions. Magento 2 involves up-to-date trends of javascript development (during Magento 2 planning). One of them is usage of RequireJs for js scripts loading as well as usage of modern frameworks that involve data binding – knokoutJs. That is why the developer who used to work with Magento 1 may have a hard time dealing with all those contemporary things. (more…)

Welcome to BelVG ecommerce blog

Our blog is a place where we share some thoughts, news and guidelines of our company developers with you. Our main topics are Magento, Prestashop and Oxid – the platforms we have mastered.

Our goal is to provide really useful information to our readers – clients, developers and e-shop owners. Feel free to look around – if you are in any way related to e-commerce, we are sure you will find some articles to your taste and interests. Moreover – don’t hesitate to comment or ask a question on any topic you see. Our authors are certified Magento developers themselves and are ready to answer you.