Category: Programming Quickies
Back 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.
Save Simple Data in Magento with Flags – Cool Ryan Magento has a base Mage_Core_Model_Flag (core/flag) model you can extend to save simple flag data in and out of Magento without needing to create a new table/data-store. I’d never seen these before today, despite the feature going back as far as Magento 1.3. Something [...]
astorm
Magento Deployments with Capistrano Mentioned in a tweet by Aaron Bonner, I wasn’t aware of Alistair Stead’s Capistrano/Magento project.
astorm
In response to a retweet of adam_webdev by kalenjordan Magento’s flexible layout system makes adding a javascript library like handlebars a cinch. First, download the latest version of handlebars and drop it in your root javascript folder js/handlebars-v1.3.0.js Next, add the following to your local.xml file. <layout> <!-- [...]
astorm
Anatomy of the Magento PHP 5.4 Patch Blog post by yours truly, going into the technical details of Magento’s recent PHP 5.4 patch.
astorm
How QuarkXPress became a mere afterthought in publishing I’m a sucker for anything that reminds of late 80s to late 90s computer/Internet culture — add in some publishing and how can I not link it? Great insights on how a business, even with a rock solid lock on their market, can only ignore the flaws in its product for so long.
astorm
Magento’s configuration includes a hard coded field for the base site URL. This often creates headaches when a user migrates a system to a new server/URL, but hasn’t updated the URL entries in the core_config_data table. These headaches are compounded by The fact that the entries in core_config_data are cached by Magento Most [...]
astorm
Magento Router Configuration One of those things I wasn’t concretely aware of — each named Magento <routers/> configuration is associated with a specific router object. You specify the router object you want to associate your <routers/> configuration with via the <use>...</use> tag. This is always standard [...]
astorm
Somewhere in the past few dev releases Magento 2 got rid of the MagentoAppDir class/object. The MagentoFilesystem object (and its getPath method) seem to be a reasonable replacement
astorm
Tracking down Foreign Key Errors A Stack Exchange question where I walk though how to track down foreign key constraints in Magento/MySQL. The subtext here: Turning off MySQL foreign key checks and/or randomly typing things in you read on the Internet usually leads to pain.
astorm
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