Cart Related Magento Events
Cart Related Magento Events Ben Marks chases down the white whale of Magento cart events.
astormBelow you'll find all the Uncategorized articles on the site, followed by a chronological listing of the same. You may also browse the 8 series directly via the following links. Miscellaneous Magento Articles, SugarCRM for PHP MVC Developers, Magento 2: Advanced Javascript, Magento 2 UI Components, Accelerated Mobile Pages, Pestle, Sylius for Magento and PHP Developers, and, Containers, Containers, Containers.
Cart Related Magento Events Ben Marks chases down the white whale of Magento cart events.
astormDeleting Product Images Programmatically A Stack Overflow answer covering how to delete an image from a product via PHP code. It’s also a good example of using the business logic encapsulated in API resource models without the overhead of SOAP, XML-RPC, REST, etc.
astormWhen is a Template not a Template? Just because a block has the word “Template” it its class name doesn’t make it a template block.
astormCan’t Login to the Admin I coughed up every reason I could think of for Magento infamous (it means more than famous!) admin login bugs.
astormAre you customizing the main product view page? Don’t forget to check that your updates render correctly on the product edit page as well. Add an item to your cart and then click the “edit” link. That’s a different page (front name: checkout_cart_configure) that might be loading different blocks, javascript, etc.
astormAdding Arbitrary HTML to Magento’s I know you’re all HTML5 frontend whizzes who plan their CSS and Javascript meticulously and drive out anyone who would even think of slipping a quick CSS rule or Javascript snippet into their document head, so I include this only out of completeness.
astormPosting this to archive a twitter conversation between Vinai Kopp and myself. I’ve long wondered what the naming conventions were for variables in Magento’s phtml template files. Many templates use the $_underscore convention for all their variables. Other templates don’t. People have speculated that Magento is warning [...]
astormInstalling APC on OS X Good roundup of the hoops you need to jump through to get PHP APC up and running on OS X (from Doug Sparling). See also Optimizing APC Cache Settings for Magento, and Magento / Zend Framework’s TwoLevels Cache Backend Mess.
astormHard to believe I haven’t mentioned this one before, but if you’re going to be doing javascript development in Magento, you’ll want to look in the following file js/varien/js.js and comment out or nullify the following code if (!("console" in window) || !("firebug" in console)) { var names = ["log", "debug", "info", [...]
astormAlthough the latest version of Magento offers the ability to control how PHP caches the SOAP server’s WSDL file, and my own Mercury API extension offers similar functionality for older version of Magento, sometimes the WSDL caching can still bite you in the butt. While the above features control the caching at the server level, if [...]
astormWidget Data and How Hard Can It Be? This Stack Overflow question is a nice example of how something that seems simple (querying for and updating a widget instance’s data paramaters) can be harder than you think. Most Magento projects go off the rails because someone assumes something like this is easy, and then modern company [...]
astormRewrites for Resource Models (include collections) Rewriting a resource model in Magento can be tricky business. This Stack Overflow answer covers the how and why.
astormIs this Cached? A Stack Overflow answer where I run through the steps I take to determine if there’s caching logic around the “Custom Variables” feature.
astormIf you’re having trouble with a call like echo $this->getChildHtml('foo'); returning an empty string, add the following debug code to your template var_dump(array_keys($this->_children)); This will print out all the children of the current block. If you don’t see the block you’re trying to echo above, that means [...]
astormNothing dredges up fear and loathing in an e-commerce developer like the phrase so we’ll just add [—] to the order success page That’s because testing any changes to this page requires a full purchase flow. Most web developers work in a “type, save, refresh, examine, oops, type, save, refresh” mode, and the idea [...]
astormFully Automated Magento Install Script I haven’t had time to check it out, but the Sonassi folks have shared their build script for rolling out a new version of Magento. I think we all have something like this sitting on our harddrives, but I know mine is sort of janky so I’ll be checking out the Sonassi version right away.
astormMore strange behavior in Magento due to EE’s new Mage_Persistent module
astormWhen is Data set in an XML Update Available in a Block
astormUsing assign with Magento Blocks Apparently Magento blocks have an assign method, which produces behavior more like a “traditional” PHP MVC view layer. I was sort of aware of this, but it never really sunk in until @vinaikopp’s tweet. That is, if you use code like this #File: [...]
astormPassing Data between Controllers and Blocks Probably old hat for most of you, but repeating a lesson never hurts.
astorm