Categories


Recent Posts


Archives


magento20

Handlebars JS in Magento

In response to a retweet of adam_webdev by kalenjordan Magento’s flexible layout system makes adding a javascript library like handlebars a cinch. First, download the latest version of handlebars and drop it in your root javascript folder js/handlebars-v1.3.0.js Next, add the following to your local.xml file. <layout> <!-- [...]

astorm

N98-magerun: Writing Tests

Test driven development is all the rage in certain PHP circles (while rage inducing code is all the rage in other PHP circles). Today we’re going to cover using the PHPUnit testing tools that ship with n98-magerun, as well as cover some programatic testing basics. Creating a test in n98-magerun is simple. First, make sure [...]

astorm

Magento Connect Bookmarklet

Stop me if this sounds familiar. Hey look, a Magento Connect extension, let’s try it out Oh, right, I need to be logged in to get the extension key Where’s that password again? [knocks over pills] Waiting for Magento site to log me in [Still waiting] There are, of course (I assume), reasons for Magento to force a sign-in [...]

astorm

Magento CSRF Protection

Maybe if I write this down I’ll remember it. You probably know all Magento admin console URLs need a nonce/key in the URL http://magento.example.com/admin/catalog_product/edit/id/174/key/c4df66cd2118cb5422c9fb5eff7eq4f0/ That’s why we use the Mage::getModel('adminhtml/url') model object to generate URLs. What I always forget [...]

astorm

N98-magerun: Creating Hello World

This article is part of a longer series covering the n98-magerun power tool Now that we’ve got a build environment up and running, we can get to work creating our first n98-magerun command. Our end goal for today is to add a helloworld command to n98-magrun $ ./n98-magerun.phar list //... Available commands: helloworld Displays a [...]

astorm

N98-magerun: Database Commands

This article is part of a longer series covering the n98-magerun power tool The database: That which, as Magento programmers, we’re not supposed to touch. Use the native objects is a refrain I’ve sung on more than one occasion, and it’s still what I recommend to people starting out with Magento. Of course, even if we [...]

astorm
email hidden; JavaScript is required