Magento and max_input_vars The unstoppable @benmarks tweets a warning about Magento and max_input_vars. The further an abstraction removes itself from the underlying technology, the more bugs like this pop up. It’s a common anti-pattern I see in in web frameworks using Java-like OO patterns.
astorm
Every model in Magento has an “array like” collection object. $collection = Mage::getModel('sales/order')->getCollection(); foreach($collection as $order) { echo $order->getIncrementId(); } Each collection also has a convenience method to grab the first or the last item from the collection $item = [...]
astorm
Why Some Blocks Methods don’t Work in Some Templates
astorm
This is a small PHP shell script that will extract the default connection information from local.xml and construct the correct command-line script to do a no-locking dump of the database. You’ll need to be in the root folder of a system for this to work. Useful if you spend a lot of time debugging different systems. #!/usr/bin/env [...]
astorm
Two quick announcements this week. The first is the immediate availability of Commerce Bug 1.5, and the second is the new Pulse Storm blog. I'll still be posting Magento articles and tutorials here on alanstorm.com, but the Pulse Storm blog is what
astorm
If you’ve setup your own API methods and are having some trouble getting the resources to show up in the admin console’s resource list, make sure that each resource ACL group node and each each individual ACL node in api.xml have a module= translation attribute <assign_simple_product_to_configurable translate="title" [...]
astorm
Tracing PayPal’s IPN Callback Request Tasks like this make ecommerce programming the dregs.
astorm
I had a client who was using the “store code in URL” feature of Magento throughout their site. This was working well for them, but there were a few URLs where they wanted NO store code, and I was asked to look into it. Digging deep into the URL generation code, I discovered the <direct_front_name> node. <global> [...]
astorm
Punching a Hole in Magento’s Full Page Cache
astorm
We hope you're enjoying the latest Magento programming series covering the the global config. Unfortunately, the former core team member we have chained in the basement escaped over the weekend without finishing his latest assignment. We have dogs canvasing the neighborhood and a foot
astorm
Update: Turns out the previous post was missing a <layout> tag in the code examples. This has been fixed, and we regret the error. (Thanks to Bartosz Cisek, proprietor of brillan.pl, for the correction) I was surprised to discover I hadn’t covered this anywhere other than No Frills Magento Layout. The XML files in a [...]
astorm
How To Rewrite a Model Answer on Stack Overflow
astorm
The getChildChildHtml method A Stack Overflow explanation of the getChildChildHtml method on Magento’s block objects, (as opposed to the getChildHtml method). If you’re up for learning more than you ever wanted about the Magento Layout, my book No Frills Magento Layout is your first step into a larger world.
astorm
Adding External Javascript to Magento’s Head Magento’s head template (in 1.6.1 at least, but probably other versions as well), includes a call to $this->getChildHtml();. When called with no paramaters, this method renders all the child blocks of a template. That means you can add any child block to the head block, and have [...]
astorm
You Cache is Unzipped Magento uses the Zend Framework for database access. The Zend Framework’s database code will cache table schemas so it doesn’t need to do a MySQL DESCRIBE for every model on every instantiation/load/save. These caches exist outside of the Magento caches you can enable/disable via the GUI. I lose a few [...]
astorm
Happy 2012! I'm pleased to announce a new release of the Magento Developer Manual extension, available for free via Magento Connect or the Pulse Storm GitHub repository. The three big takeaways for the 1.1 release are some behind the scenes route refactoring, a
astorm
Loading a Rewrite Rule Outside of Request Routing Another place where the assumption of a store object makes working with the “raw” Magento PHP APIs tricky.
astorm
How to Fix an Exploded Compiler Compilation mode (which appears to be going away in Magento 2) can occasionally explode a Magento site if the new class files aren’t written out to disk correctly. Fix it quick with the advice in this link.
astorm
Some Magento History on Parent/Child Product Relationships
astorm
Debugging Resource Path is Not Callable Faults in Magento
astorm