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 ifconfigexpression in your layout file: 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 Alan Kent’s article 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, the official documentation, 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
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
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.