Category Archives: Magento

Implementing New Relic Real User Monitoring in Magento

A few months ago, New Relic introduced Real User Monitoring.  It natively supports WordPress and Drupal as of the time of this writing.  By “natively supports”, I mean you can just turn it on in the New Relic control panel and your web servers will start automatically injecting it into your pages’ head.  Real User Monitoring works with any web app, however — you just have to manually add the code yourself.

Here’s how you add it to a Magento theme template. Continue reading Implementing New Relic Real User Monitoring in Magento

Advertisements

New Relic and Magento: Better Transaction Naming

New Relic supports Zend Framework out of the box.  Right?  Supposedly it does, but I didn’t get any useful information recorded when using Magento.  Everything came up “index.php”.

Unfortunately, getting a useful transaction name in New Relic from Magento requires modifying Magento core.  Fortunately, it’s a pretty simple modification.

Continue reading New Relic and Magento: Better Transaction Naming

How to add a Google Checkout button to any page in Magento

Image representing Magento as depicted in Crun...
Image via CrunchBase

This post answers a very simple question I had, one I could not find an answer for.  I needed to add additional Google Checkout buttons to Magento‘s onepage checkout and maybe the sidebar cart.  I found other people asking the same thing, and answers ranged from cryptic to unhelpful.  But I did find a solution.

Step 1

Add this snippet to the template file where you want the Google Checkout button to appear:

getLayout()->createBlock('googlecheckout/link')->setTemplate('googlecheckout/link.phtml')->toHtml(); ?>

This uses the standard Google Checkout button that’s used everywhere else, so if you customize the way the GCO button looks using the googlecheckout/link.phtml file your changes will show up everywhere you use it.  This is great because it reduces the duplication of code.  But what if you want to use a slightly modified GCO button somewhere? Read on…