Posted on

Understanding and Detecting Magento Extension Clashes or Conflicts

This article will give an overview of Magento extension clashes (sometimes called conflicts) and then run through a few ways you can find them in your installation.

I get asked at least once a week a question like ‘What is a Magento Extension Clash‘ or ‘How Do I Find Extensions that Conflict‘. So, if you’re reading this, you probably just asked me, and I probably just sent you a link to here. That was a bit meta-blog, sorry about that. On with the article.

What is a Clash?

Magento extensions can override core functionality using what’s called a class rewrite. That’s when your extensions configuration file tells the core of Magento to use your custom PHP class, instead of the core one. Typically the custom class will sub-class the core one, and only override the methods that need to be changed. Here’s an example of that, firstly showing a snippet of rewrite xml for a core model:

<!-- ... snip config.xml ... -->
        <models>
            <core>
                <rewrite>
                    <email>Aschroder_Email_Model_Email</email>
                </rewrite>
            </core>
        </models>
<!-- ... snip config.xml ... -->

And then the corresponding class, notice it overrides the core version:

 
class Aschroder_Email_Model_Email extends Mage_Core_Model_Email {
 
// only add methods here that override the ones we want to change in Mage_Core_Model_Email
 
}

So that’d all be well and good if everyone only installed my email extension in their Magento store, but they don’t. They install PDF email attachments, email emoticons, email monkeys and god knows what else. So the rewrite that my extension needs to work, may very well not happen, because another extension rewrites the same class.

The same sorts of things can happen all over Magento, and typically the bigger and more complex and extension is, the more rewrites it will need, and the bigger the surface area for conflicts and clashes.

You might be thinking: “Gosh, it’d be great if Magento Connect ran some sort of rudimentry test for compatibility before installing extensions willy-nilly in Magento Stores” and if you are, that means you’re one of the Good Guys™.
Continue reading Understanding and Detecting Magento Extension Clashes or Conflicts

Posted on

Magento and AWS Elastic Beanstalk – The Scalability Silver Bullet?

In this post I’m going to introduce Amazon’s Elastic Beanstalk PHP environment as a platform for Magento. In particular I’ll cover the mechanics and economics of hosting Magento, along with it’s benefits and limitations as a platform. The goal here is to create an auto-pilot environment providing high availability and scalability.

But first, the background. With World Wide Access, we’ve always run our own EC2 instances, ELBs, database servers and memcached. We scale up the instance sizes or counts manually when required. When we started using AWS (in 2008) Elastic Beanstalk was not yet on the scene so we had no choice but to do it that way. But now we do have a choice and, thanks to some downtime in the last week, I’m prompted to gather some thoughts on a migration to a fully auto-pilot set-up. This post is my notes on Elastic Beanstalk and Magento with git for deployment. I’ll add a more detailed setup guide and some benchmarks in a future post – this one will be a bit more abstract, so go make yourself a cuppa.

About the Amazon’s Elastic Beanstalk

Beanstalk brings together various parts of Amazon’s infrastructure: AWS servers, scaling, load balancing and high availability, to give your applications an automated environment to run in with flexible server sizes and instance counts that make growing easy. You can do all the things Elastic Beanstalk does, by combining the separate parts yourself, but this is much easier, trust me.
Continue reading Magento and AWS Elastic Beanstalk – The Scalability Silver Bullet?

Posted on

Improving Magento ImportExport module with Better file format and Google Docs integration

In this post I’ll run through two ways that we improve the default Magento ImportExport module when importing products to Magento stores. The two improvements I’ll cover are: importing directly from a Google Docs spreadsheets and improving the multi-line format to make generating the import files easier.

Background to the Magento ImportExport Module

The ImportExport module itself is such a drastic improvement on the old DataFlow module it’s almost unbelievable, so let me first start by saying it’s not half bad to start with. Andreas does a brilliant job of describing the current file format, it’s in German but Google Translate plus the excellent example tables will make it quite readable. Vinai’s presentation at Magento Imagine 2011 is also required reading to understand how the new module works, and most importantly how easy it is to extend.

The two things I didn’t really like about the current functionality were the need to get a single local file to the server for processing and the multi-line format for configurable products and multi-store/site/category/image products. Here’s the changes made to improve on these.
Continue reading Improving Magento ImportExport module with Better file format and Google Docs integration

Posted on

MageSpeedTest.com: New locations, Magento Extension, REST API, Featured Host and Pricing

Way back in 2010 I set up a quick little wrapper around siege for testing Magento stores and for the last nearly 2 years I’ve added features such as multiple data centers, premium subscriptions, monitoring alerts, and automated host comparisons. In this blog post I’ll walk you through an update on the new features and improvements to MageSpeedTest.com over the last few months.

I’m really happy with the site and how it helps users identify and improve Magento performance. I often see test results coming through in the order of 2-3 transactions per second and >5s per transaction. Identifying these sort of slow stores early is important – customers are simply not going to wait at least 5 seconds to see a product page these days.

At the opposite end of the performance spectrum I see public tests coming through with incredible performance profiles. For these developers and server admins it’s a way to consistently test server tweaks and tuning to get the absolute best customer experience.

In this post I wanted to quickly cover my latest Magento Speed Test changes. It’s a big update because I haven’t posted anything in a while.

Here’s the cliff notes:

  • New Locations: Japan, South America and Australia
  • A Magento Extension to make testing easy (and more soon!)
  • A REST API for accessing your monitoring results
  • A pricing update, $5 up to $9 per month
  • Featured Magento hosts
  • SSL support – test https:// sites

For more information on these items, please read on.
Continue reading MageSpeedTest.com: New locations, Magento Extension, REST API, Featured Host and Pricing

Posted on

Magento SSL Offloading with Amazon ELB

I’ve had a fun & games sort of day working through this Magento SSL offload on Amazon’s ELB and I thought it’d be worth documenting what’s involved, in the process I’ll give some steps to get it working and explain what the new (since version 1.6.2) Offloader header config option is for and how it helps.

Background

Firstly, a bit of background – if you just want the quick fix, skip right to it. The Internet can beam magically onto your computer screen one of two ways: http and https. http means the things you see everyone else can see too, the content is unencrypted and sent from the server to your computer. If you’re at a wifi hotspot, what you do online is being broadcast to everyone around you. Conversely, an https connection means the content is securely encrypted, and the endpoint server you are connecting to, is probably who they say they are. So we want https in public places, or when financial or personal information is involved – and if we’re paranoid, we want it all the time.
Continue reading Magento SSL Offloading with Amazon ELB