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.
tim-reynolds/magento-qconfig When I started using Magento the System Configuration section made me feel a little dumb — so many options, but no easy way to search for things. I’d always forget where a particular option was. After a few months of using grep and ack to search though the system.xml files and work backwards to figure [...]
astorm
Magento system.xml hint tag. Some background on an abandoned “hint” tag for Magento’s system configuration form fields.
astorm
Barely Magento related — mainly a tab sweep to capture some Stack Overflow questions where I’m re-familiarizing myself with DBA concepts as part of a Magento upgrade project. Optimizing ALTER TABLE Debugging errno: 150 More errno: 150
astorm
Replay SQL Log An interesting project (also forked and improved by Magento stalwart fbrnc) that lets you replay the contents of Magento’s database log for the purpose of improving performance during a Setup Resource upgrade. I haven’t tried using it, but it looks useful. Also, if there’s any computer science teachers [...]
astorm
Vinai Koop (author of Grokking Magento) pointed me towards the magento-hackathon/composer-command-integrator Magento package (in a GitHub thread). This packages adds a deploy-all command to the Firegento Magento composer project which (presumably) allows users to explicitly trigger an installation of their packages into their Magento [...]
astorm
Magento Community Edition (CE) 1.9 Release Notes Pretty solid release notes for the Magento 1.9 release.
astorm
In his soon to be referenced widely Magento Infinite Theme Fallback Fix, Eric Wiese notes that layout update XML files added via theme.xml are ignored by the parent/child theme inheritance. An XML file added to a parent’s theme.xml will not be added automatically to the child theme’s layout. Eric’s solution is a custom [...]
astorm
One of the things Magento 1.9 brings to the table is unlimited theme fallback via a parent/child theme mechanism. If you ever need to find the current theme’s parent programmatically, here’s what you’ll want to do. $design = Mage::getDesign(); $config = Mage::getSingleton('core/design_config'); $area = [...]
astorm
Magento – Knowledge Base – Magento CE 1.9 and EE 1.14 Responsive Web Design Developer’s Guide – eCommerce Software for Growth A deep dive from eBay on the new Magento responsive theme.
astorm
Magento Infinite Theme Fallback Fix Covers Magento 1.9’s new parent/child theme concept, and offers an extension for more Magento 2 like merging of theme files (vs. complete file replacement)
astorm
I’m still digging into the new Magento 1.9 CE responsive web design (RWD) theme, but one thing I noticed immediately (since it conflicted with my new Custom Checkout Step extension) is how the theme needed to replace a method in the Prototype JS Checkout class. #File: skin/frontend/rwd/default/js/opcheckout_rwd.js [...]
astorm
Here’s a fun little heisenbug I had to deal with. I was working in a Magento block observer — specifically the core_block_abstract_to_html_after event. If the block was a specific block, I wanted to change its output slightly. $transport = $observer->getTransport(); $block = $observer->getBlock(); [...]
astorm
Use Reflection to find the class that a method belongs to Some reflection and PHP token parsing to get to the actual class with a method definition (or, by way of inference, if a method is magic or not)
astorm
Slow Indexing in Magento EE Main Takeaway: If you mix strings/integers in your WHERE clauses for numbers, MySQL can’t use its indexes.
astorm
Create Dummy Orders An n98-magerun add on that adds a order:create:dummy command. Useful for the freelancer “I need sample data to do your ERP project/We don’t trust you with our order information until you’ve done some work for us” catch-22.
astorm
Cross Area Session Access Speaking of sessions, I whipped up a quick proof of concept for accessing admin sessions from the frontend of Magento — useful if you want to restrict frontend access using backend session ACL rules. Right now it works with file and db session storage — memcache, redis, etc. would need their own Loader model [...]
astorm
I gave this little bit of Magento code an ugh on Twitter. #File: app/code/core/Mage/Core/Model/Resource/Session.php public function __destruct() { session_write_close(); } Why? Because PHP automatically calls __destruct when it cleans up memory for an object, which means this code could potentially close and save the session before the [...]
astorm
Magento Design Patterns – Cool Ryan Twelve part series on the “design patterns” used by Magento 1.
astorm
How to convert Magento quote into backend order An article explaining how to turn an existing customer’s cart (i.e. “quote”) into a Magento order via the backend. The number of workflows Magento has built in for this sort of thing are surprising — I often wonder how often someone’s taken on a custom development [...]
astorm
Solr and PCI Compliance Blog post form Inchoo on compiling the latest Solr to work around PCI compliance issues. The lesson? Vendor support for Enterprise Edition comes mainly from Magento partners, and not Magento/eBay itself.
astorm