Fixing YouTube embeds in WordPress

Posted by & filed under Code.

In some wordpress themes, youtube embeds just show up as a black screen. As discussed here, the solution is adding a transparency setting to the iframe’s src. However, the solution in that thread only works if the src is right next to the frameborder. Updated code below if you are running into this problem New… Read more »

Important Magento Security Update – Zend Platform Vulnerability

Posted by & filed under Code.

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… Read more »

Creating a stateless request in Magento

Posted by & filed under Code.

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… Read more »

Extending a Magento Controller

Posted by & filed under Code.

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:

Want to trace the call stack in Magento?

Posted by & filed under Code.

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: I’ve also wrapped this into a module that you can drop right into your project. Details here: https://bitbucket.org/broderboy/magento_callstack/src Example output: Thanks to nextide for some of the code