Page Layout Drop Downs in Magento Admin
Page Layout Drop Downs in Magento Admin A Stack Overflow thread showing how those Page Layout threads don’t always do what you think.
astormBack in they day, I ran a Tumblr blog named Magento Quickies where I’d post shorter, less in-depth posts about my travels through Magento’s source code. This Programming Quickies categories is the successor to that Tumblr blog. You’ll find all the old Magento Quickies content here, as well as new short posts about programming in general.
This section has its own RSS feed, the old Magento Quickies feed should should be redirecting, and we’re cross posting notifications for new posts over to magento-quickies.tumblr.com. In other words, you shouldn’t need to know any of this, but the duct tape that keeps the internet held together isn’t aging well, so your mileage may vary.
Below you'll find all the Programming Quickies articles on the site, followed by a chronological listing of the same. You may also browse the 7 series directly via the following links. Pestle, Four Steps to Async Iterators, Checking in on OpenMage and Magento in 2020, Text Encoding and Unicode, Shopware's Development Environment, A Sentimental Gen-X Programmer Culls his Tech Books, and, Containers, Containers, Containers.
Page Layout Drop Downs in Magento Admin A Stack Overflow thread showing how those Page Layout threads don’t always do what you think.
astormPop quiz: You’ve got your head wrapped around Magento 2’s dependency injection. You’re taking a stroll through the code base, and you see this constructor. #File: lib/Magento/PubSub/Event/QueueHandler.php public function __construct(MagentoPubSubEventQueueReaderInterface $eventQueue, MagentoPubSubJobQueueWriterInterface [...]
astormWhile the concept of The Global Config still exists in Magento, a module’s etc/config.xml is no longer the place where developers will enter most of a module’s configuration. In fact, if you try to use a Magento 1 config.xml file in Magento 2 and turn on developer mode, you’ll be greeted by the following. Invalid XML in [...]
astormMagento 2: Translation Mechanism An explanation of Magento 2’s translation mechanism. (Pro Tip; European developers will love your open source project forever it it’s easily translatable)
astormNot a comprehensive guide, and as always, let the core module’s be your guide. Router configuration has been moved from config.xml to etc/frontend/routes.xml and etc/backend/routes.xml There’s still a routerName/frontName distinction, although the router’s name is specified with an id attribute instead of the node name [...]
astormMagento 2: Auto Dependency Injection: No Comments Required Something something assumptions. It turns out the Magento 2 automatic dependency injection does not rely on PHPDoc comments. Instead, it (appears) to be reflection based. ALso worth noting — the core team is strongly discouraging direct use of the object manager.
astormClass rewrites were, in many ways, that killer developer feature of Magento 1. Killer as in “Woah, awesomely powerful thing PHP developers don’t normally get to do”, and killer as in “Oh crud, we’ve killed the site with too many rewrites that are conflicting with each other”. One of the promises of [...]
astormI looks like eBay threw another Magento 2 release over the wall into GitHub today. I’m going to start tagging entries here with a specific dev release tag as well as the generic magento2 tag. First big change? The object manager we’ve been discussing is a different class. When you want to grab an instance of it, you can use [...]
astormIn Magento 1 there were three “types” of classes which you could instantiate via Magento’s various object factories: Models, Blocks, and Helpers Mage::getModel('group/class'); Mage::helper('group/class'); Mage::getSingleton('core/layout')->createBlock('group/class'); In Magento 2, all classes are available to the [...]
astormAnother 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 = [...]
astormMagento 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 [...]
astormWhen 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 [...]
astormOpenERP 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
astormWith 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 [...]
astormRecent 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 [...]
astormmysql – 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)
astormI 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 [...]
astormPost Deployment Database Tests Interesting series of tests Copious uses to ensure a Magento deployment went as intended.
astormIf you’re not paying attention, eBay has been a little more proactive on the Magento 2 front. The code dumps are coming regularly to git. Of course, this means the shifts in architecture direction are also coming regularly to git. In Magento 1 we had module declaration files. These lived in app/etc/modules/*.xml and [...]
astormSpeaking of COPIOUS This looks like an interesting Magento instance backup script from Dann.
astorm