How to use controller to redirect customers to another URL in Magento 2
In Magento 2, you can use the following code to redirect customers to another URL with the help of controller: 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

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 |

Mage::Registry in Magento 2 is very similar to the registry of Magento 1. You can find it here: \Magento\Framework\Registry
Utilize dependency injection for adding it to the constructor. As a result, you will be able to use both $registry->register($key, $value) and $registry->registry($key) methods to store / access data.

In this Magento 2 vs Bigcommerce review we take a look at both platforms to show which of these ecommerce solutions is best suited for the needs of online retail. Please note that this blog post will be updated when we will get more information about Magento 2.