This one might be greek to people who haven’t read No Frills Magento Layout, but I’d like it spelled out so I don’t have to think about it again. (If you don’t own a copy, there are worse ways to learn Magento). When Magento is loading handles from the Layout Update XML Files into the package layout, these updates [...]astorm
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.
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
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
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
Removing Cache Invalidation Notices on Product Saveastorm
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
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