Categories


Recent Posts


Archives


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.

Fatal error: Call to a member function getId() on a non-object in lib/internal/Magento/Framework/View/Model/Layout/Merge.php on line 745

I ran into this error Fatal error: Call to a member function getId() on a non-object in /path/to/magento/lib/internal/Magento/Framework/View/Model/Layout/Merge.php on line 745 after loading a new system’s MySQL database into my local development environment. Magento 2’s theme settings allow you to pick a specific theme from a [...]

astorm

Quote Address Creation

Here’s another gotcha to be careful of when using the sales/quote model objects. If you pass the following methods setBillingAddress, setShippingAddress, assignCustomerWithAddressChange an existing quote address object, these methods will reassign the address to the current quote (removing it from the old quote). If you were [...]

astorm

Magento 2: Registry Object

In Magento 1, it was possible to register a global variable with the static registry method. Mage::register('some_var', 'some value'); var_dump(Mage::registry('some_var')); Many extensions, include core Magento extensions, ended up using this from controller action methods to pass variables into the views. While its future is uncertain [...]

astorm
email hidden; JavaScript is required