Magento Index Status A Magento index can have a status of pending, working, or require_reindex. However, the UI represents pending as Ready, working as Processing, and require_reindex as Reindex Required. Did I say UI? I meant Web UI. The command line UI (via shell/indexer.php uses the slightly-different-but-the-same-enough to be [...]
astorm
Magento source model conventions Pretty good answer from yours truly on the different between toOptionArray and getAllOptions.
astorm
Magento Programmer’s 404 Extension From yours truly, a Programmer’s 404 page that will diagnose why Magento skipped your custom module/controller routing.
astorm
Magento Bootstrap Framework Reset Bootstrap is the go to framework for agencies building multi-device “responsive” layouts. Kimberely Thomas’s b-responsive theme is the first Magento Bootstrap reset project I’ve seen that Has a proper open source license attached Has the goal of working with both Enterprise and [...]
astorm
Varien_Object as PHP Extension Andrey Tserkus implemented the Varien_Object class as a PHP extension to see what sort of performance improvements might lie down that path. Beyond the obvious interest to Magento developers, this project also looks like a nice “hello world” for PHP extension development.
astorm
Around CE 1.4, Magento extended their Setup Resource Migration system with the ability to have data updates as well as structure updates. That is, a setup resource upgrade/install script named like this mysql4-install-0.7.0.php mysql4-data-upgrade-0.7.63-0.7.64.php should contain structural changes to Magento’s database tables, [...]
astorm
Magento 2 Development Update Video of the Magento 2 conference call from yesterday. Covers a lot of the formal reasons for the changes in Magento 2.
astorm
Setting Parent Blocks from Layout XML Nice bit of layout XML information from Mr. Clean Ben Marks on setting a different parent block when instantiating from a Layout XML file. Here’s the bit of PHP that makes this possible #File: app/code/core/Mage/Core/Model/Layout.php if (!empty($node['parent'])) { $parentBlock = [...]
astorm
If you’re working in a PHP file that’s namespaced, and you’ve setup a simple try/catch block like this try { //do something that might throw an exception } catch(Exception $e) { echo "Caught you!"; } You may be surprised when your program doesn’t catch the thrown exception. That’s because Exceptions are [...]
astorm
I’ve been digging into the guts of Magento 1’s setup resource migration system, and I’ve run into some unexpected behavior. Unexpected is probably the wrong word, because I treated a lot of these details as black boxes until now. I’m documenting this here for myself, but reserve the right to come back later if my [...]
astorm
The Magento 2 team just threw dev-54 over the wall. One change you’ll notice quickly is they’ve removed the isAdmin method from the store object. This is the method that, in theory, allows a Magento client programmer to know if Magento is or is not running in the backend admin console. I say in theory, because “running [...]
astorm
Page Layout Drop Downs in Magento Admin A Stack Overflow thread showing how those Page Layout threads don’t always do what you think.
astorm
Pop 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 [...]
astorm
While 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 [...]
astorm
Magento 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)
astorm
Not 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 [...]
astorm
Magento 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.
astorm
Class 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 [...]
astorm
I 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 [...]
astorm
In 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 [...]
astorm