Another consequence of losing the global Mage class in Magento 2 is the loss of the getBaseDir method. Fortunatly, the team behind Magento 2 has a solution, the MagentoAppDir object. You can use this object to get the base directory of your Magento system. $object_manager = MagentoCoreModelObjectManager::getInstance(); $dir = [...]
astorm
Magento 1 was littered with translation functions. Helper objects, block objects, and the PHP global namespace all had a __ function or method. Magento 2 does away with this. Core team developers have removed the __ method from the base block and helper classes, leaving only the global __ function for translations. If that didn’t [...]
astorm
When you’re converting you Magento modules to Magento 2, make sure your helper classes have a _moduleName property. protected $_moduleName='Packagename_Modulename' I ran into an issue where the isModuleOutputEnabled method relied on this value being set. If the property isn’t there, Magento will attempt to infer a module name [...]
astorm
OpenERP Magento Connector — OpenERP Magento Connector documentation I’ve never used it, but it looks like some OpenERP folks are still supporting/developing a Magento connector. via Stefan Rijnhart
astorm
With the loss of the Mage class in Magento 2, you may be wondering how to instantiate a helper object. That is, the following will product an error in Magento 2 $helper = Mage::helper('core/data'); Similar to the object manager, Magento 2 has a helper factory which lets you instantiate helper methods. In fact, you use the object manager [...]
astorm
Recent builds of Magento 2 have done away with the global Mage class. There are pros and cons to this, and I feel a more in depth blog post stirring in my gut, but that will need to wait for another time. Of more immediate concern: without a Mage class, how does a developer instantiate model or magento-singleton object? The [...]
astorm
mysql – Force InnoDB to recheck foreign keys on a table/tables? – Stack Overflow Not strictly Magento related, but an interesting thread on Stack Overflow about checking your MySQL system for invalid foreign key data. (PostgreSQL folks: Please stop laughing)
astorm
I just grabbed the latest Magento 2 from source, and suddenly PHP was complaining about a method declaration PHP Fatal error: Declaration of MagentoCoreModelUrlProxy::setRequest() must be compatible with MagentoUrlInterface::setRequest(MagentoAppRequestInterface $request) in [...]
astorm
Post Deployment Database Tests Interesting series of tests Copious uses to ensure a Magento deployment went as intended.
astorm