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.
Casting Image Helpers Image helper objects are tricky. Instead of having a “get image url” function, you cast them as a string to get the URL, or more commonly, let PHP cast them in echo statements automatically. However, if you’re not familiar with PHP’s casting rules, it look like the init method returns a [...]
astorm
Take a look at this screenshot You’ll see this dialog when your login credential are incorrect. Now, take a look at this screen Same login screen, but without the Invalid Username or Password message. There’s a class of Magento deployment bugs related to sessions and cookies that prevent users from logging into the [...]
astorm
When you’re creating custom Magento models, it’s common to to add and remove fields to and from a database table during development before finalizing a set of columns for the setup resource/migration file. One thing to keep in mind while you’re doing this is that Magento will cache the list of table columns each model [...]
astorm
In an out of the box installation, Magento will use a Zend_Mail object to send all its email. If you’re debugging something mail related, jumping directly down to the send method lib/Zend/Mail.php can be extremely useful.
astorm
Setting a Starting Order Number An oldie but goodie for people in the Magento community. Ashley Schroder goes over how to set a starting/ending order number that isn’t 100—0001.
astorm
Default Theme in Enterprise Edition A quick heads up for anyone who’s used to Community edition but switching to enterprise. The default theme (NOT the base design package) is set to enterprise during the installation process. Can create subtle behavior changes when you’re following tutorials aimed at CE.
astorm
When you first have that ah-ha moment with the Magento System Configuration creator, your first instinct is to start creating a lot of extra configuration values for your features and modules. It’s easy enough to think “hey, I’d like to add another email address to the Store Email Addresses section” There’s [...]
astorm
Adding Customer Attributes Nice writeup of all the various bits you you need to flip when setting up a public attribute for the Magento customer object
astorm
Half FYI for new Commerce Bug users, half shameless plug. This screencast covers the programable access control list features of Commerce Bug. That is, it shows you how you can hide Commerce Bug from certain users (Managers!) and show it to others (Developers!) (Source: https://www.youtube.com/)
astorm
What IS Magento Mobile Great writeup of what Magento Mobile is, from a developer point of view.
astorm
MageTool If you can get through the standard pear wrestling that’s required. MageTool’s a great utility to have in your pocket. Command line access to common Magento tasks.
astorm
Magento Email Template If Statements Nice concise rundown of where Magento implements conditional logic in templates.
astorm
Removing Cache Invalidation Notices on Product Save
astorm
This one’s a little un-intuitive. At first. There are times where you’ll want to programmatically check if a customer is confirmed. To do this you’d instantiate a customer object like this $customer = Mage::getModel('customer/customer')->getCollection() ->addFieldToFilter('entity_id','197') ->getFirstItem(); or [...]
astorm
Magento Version: 1.5.0.1 Magento’s multiple address checkout doesn’t actually create a single order with multiple addresses. Instead, it creates an order in the system for each different address you’re shipping to.
astorm
The Magento object for interacting with customers (Mage_Customer_Model_Customer, alias customer/customer) has three address fetching methods, but you probably only want one of them. The first, and least useful, is getAddressCollection. You might think this method would return a Magento Address collection containing address objects [...]
astorm
Proposed Methodology for Cleanly Altering the Admin Console DOM Output via Javascript
astorm
Model Resources and Multiple Database Support In response to my question. What do I Need to do with my Model Resources for the Magento 1.6 Release?
astorm
Magento Version: 1.6.rc1+ I just downloaded the release candidate for Magento 1.6, and I noticed a change that seemed like a regression, but a little digging made me realize it was something else. A lot of Magento developers (meaning me) like keeping their custom phtml files somewhere other than the the standard add/design/frontend file [...]
astorm