How can extensions show / hide blocks conditionally in Magento 2
In Magento 2 there are several ways of showing and hiding blocks conditionally. If its visibility depends on a configuration settings value, use the
In Magento 2 there are several ways of showing and hiding blocks conditionally. If its visibility depends on a configuration settings value, use the
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.
Magento and osCommerce are widely used by all possible merchants to run online retail. Both platforms come with numerous features allowing store owners maintain their ecommerce websites with minimum effort. But what about Magento 2? The new version of the platform offers much more features than its predecessor, so it should have more competitive advantages in comparison with osCommerce. Learn details in the following blog post.
SlideShare is the biggest source of worthy presentations. There, you can find tons of useful materials covering various topics, including Magento 2. The new version of the ecommerce platform is quickly rising in popularity, so there are enough presentations for creating this blog post. Continue Reading