This post describes how to update Magento 2 to the latest available version. Below, you will find all the necessary information related to the procedure, including some vital prerequisites. So, the version of your platform is a little bit outdated? Find out how to update it with the following Magento 2 tutorial.
In this Magento 2 tutorial, I explain how to uninstall Magento 2 modules. You have several uninstallation options, such as removing the modules’ code, database data, and database schema. I highly recommend you to create backups before doing any changes, because you will leave a chance to recover the data if something goes wrong.
Maintenance mode is a crucial part of every site launch; besides, there are tons of other situations when you can use it. Being an essential part of Magento 1.x development, maintenance mode is also available in Magento 2. Below, I will tell you how to enable it in a case of new platform.
Have you ever thought about why E-Commerce is more powerful than conventional retail? What makes it so powerful? Let’s recall the most evident reasons .
First, E-Commerce allows retailers to simultaneously reach millions of customers all over the world thanks to significant advances in the sphere of modern technologies. Second, E-Commerce provides the most convenient shopping experience allowing customers to purchase goods anywhere and anytime just in one click. However, there is even more potential here that yet needs to be revealed. And that is personalization. Continue Reading
The process is almost similar to Magento 1, but you only have to rename local.xml.sample to local.xml within your pub/errors directory. Continue Reading
Unfortunately, the process is not as easy as in Magento 1 ($crumbs = Mage::app()->getLayout->getBlock(‘breadcrumbs’);). In Magento 2, it depends on where you are going to instantiate it from. To create an instance from another block, use the following code:
Please note that in a case of the model you have to create _blockFactory (a protected member), and inject a \Magento\Framework\View\Element\BlockFactory instance in the constructor, assigning it to the member var. For instance:
Since Magento strictly discourages the use of ObjectManager, there are service classes for abstracting it for all scenarios. Thus, you should use factory for all models (non-injectables):
You only have to ask a desired model’s factory in a constructor. Hence, it will be automatically generated, while you run compiler or Magento. Continue Reading
To enable Developer Mode in Magento 2, use SetEnv MAGE_MODE “developer” in your .htaccess file. Please note that this method works only in case when AllowOverride All is situated in a proper <Directory> directive. And don’t forget to check if the Apache process user has write permissions to all necessary directories. Continue Reading
You can easily enable profiler in Magento 2 by adding SetEnv MAGE_PROFILER “html” to .htaccess. Additionally, it is possible to utilize “csvfile” (is situated in your var/log) or “firebug”. Continue Reading