Database schema upgrade
The following Magento 2 tutorial will help you upgrade script for a new version of your extension by adding new tables and columns to a database. Continue Reading

The following Magento 2 tutorial will help you upgrade script for a new version of your extension by adding new tables and columns to a database. Continue Reading

In Magento 2, you can use the following code to redirect customers to another URL with the help of controller: Continue Reading

There are at least two use cases in this situation. In Magento 2 you can custom mini-libraries with such short popular global functions as rm_customer_logged_in(): Continue Reading

In Magento 2 there are several ways of showing and hiding blocks conditionally. If its visibility depends on a configuration settings value, use the expression in your layout file: Continue Reading

Unfortunately, Magento 2 offers a more complicated solution for checking whether you are in the admin panel.

To include the module name in Magento 2, you should use the following code: Continue Reading

Magento 2 has been released, so we are trying to dig more useful materials related to the new version of the popular ecommerce platform. This time, our attention has been drawn to related to Magento 2 testing, so we’ve also decided to cover this topic on the Firebear blog. For those developers willing to improve the quality of their Magento 2 projects, testing is mandatory; therefore, we propose you to examine the following Magento 2 guide, which is based on the aforementioned article, , as well as our own experience related to both the Magento 2 platform and testing.
UPD (11.02.16): Magento 2 code katas and Getting your hands dirty testing Magento 2

To get access to working directories in Magento 2, you can declare the class in __constract: Continue Reading

Since Magento 2 relies on the concept of resources to interact with database, you can easily get the global resource and use it for playing with SQL queries or execute directly. Continue Reading

To execute the Magento 2 cron job, use the following code:
|
1 |
php <path to magento root>/bin/magento cron:run |
If you want to automate the process, add it to /etc/crontab. For instance:
|
1 |
*/30 * * * * www-data php /var/www/firebear.com/store/bin/magento cron:run |