Tag: magento

Displaying Custom Attributes on the Product Page in Magento

At some point you may not want to use the canned attributes.phtml groupings that magento provides, or you just want to cherry pick which attributes to show on your product listing page template/catalog/product/view.phtml

Using widgets outside of the CMS in Magento

Magento ships with widget functionality that lets you build out data models and then reuse them on product and CMS pages. If you want to use these in a custom template however, you are out of luck.  This can be done by extending the Widget Collection class. Create the following directory structure: Copy into your new directory The Mage_Widget_Model_Mysql4_Widget_Instance_Collection comes with a store filter but thats about it.  To be more usefull we are going to add a type filter, a title filter, and a…

Magento: Want CKEditor to appear on Category edit pages in Magento?

It is pretty common to replace the TinyMCE editor in the Magento Admin with the CKEditor using this extension However, the way magento ajaxes the form fields into view on the category pages breaks this functionality. This snippet should help anyone trying to get it to work in in add this at the bottom but inside the script tag

Want to trace the call stack in Magento?

Update: This code is also available on Github as a Mageno module This has helped me immensely in situations like "Where is this getting called from??!?" Create a helper like so: That can be called from anywhere: ``PHP Mage::helper('stack/callstack')->toFirePhp(); Mage::helper('stack/callstack')->toLog(); .../app/code/community/Timbroder/Stack/Helper/Callstack.php line 16 calls get_callstack() .../app/design/frontend/mongoose/default/template/catalog/cms/bikes_bmx.phtml line 12 calls toLog() .../app/design…

Extending a Magento Controller

We're ajaxing part of the Magento shopping cart so we need to modify/extend some of the cart controller functionality.  Sometimes when modifying controller's you have to worry about updating the routes. For this, we don't need to, we still want all the urls to be used the same way. app/code/local/Ai/Checkout/etc/config.xml: app/code/local/Ai/Checkout/controllers/CartController.php:

Creating a stateless request in Magento

Have you ever wanted to create a stateless request in Magento? Something that doesn't touch any of Magento's sessions?  We were having issues with some of the ajax calls on our cart and checkout pages mucking with the user's cart and had get stateless on these calls.  The issue we were having was our checkout page was loading, then a javascript include was going out and bringing code from a 3rd party relevance engine into our dom, which was in turn calling back an ajax request to our servers.  This issue…

Important Magento Security Update – Zend Platform Vulnerability

While doing routine sanity checks, on of our QA Engineers, Sammy Shaar, was alerted about an important Magento security update. The vulnerability potentially allows an attacker to read any file on the web server where the Zend XMLRPC functionality is enabled. This might include password files, configuration files, and possibly even databases if they are stored on the same machine as the Magento web server. To see if you site has been affected, please see this page. Luckily, Magento has released patches for…

Improve your Magento workflow: Use git or mercurial

Most of our new projects at work are on mercurial and I've moved most of my personal projects over to git.  We do, unfortunately, still have one Magento install that lives in our old subversion repository.  If you've ever tried to work with a project the size of Magento in SVN with branching, you know the kind of pain this can cause. My machine at work is no slouch. An i7, 8 gigs of ram, 256 megs graphics card, and an SSD. Perfect for any number of high performance or online games, compiling, or video…

Apple Pay and Magento

The Business of Apple Pay (Alec Simonson) On the outset, Apple Pay is very cool and could very well be the wave of the future. A lot of this hinges on “what’s under the hood” in terms of Apple’s contract with the leading credit card companies who helped with the development. If everything is open, and companies like Samsung can let their customers pay with NFC technology as well, I could see this as something that will be successful, adopted, and an example of Apple leading the way. However, if Apple goes…

Contributing to Magento2

The Magento2 dev team is now using Github in the traditional sense: They have an internal repo that gets pushed out to github at the end of their sprint. All commits stay intact. This is WAY better than the previous method of pushing a giant commit with everything each sprint. Ben has a good walkthrough on submitting a pull request to the repo. He links to a few resources to get up and running on the new platform.  Alan Kent goes into more detail on the “why” of the change. It’s not just code that has been…