About PRWD

Usability and technical development agency specialising in:

  • usability evaluations
  • usability benchmarking
  • usability training (public/in-house)
  • user-centered design processes
  • web development
  • software development
  • rich internet applications
  • Magento e-commerce platform

Recent Case Study

User Testing Case Study

Isabella Oliver
  • in-depth user studies in the lab
  • comprehensive usability report delivered

view the case study

Training

Advanced Google Analytics Training


view full training details


Search

Posts Tagged ‘php’

New Magento module: automatic shipping calculation

31 comments

Update: you can find more information about our Magento services here

We’ve recently delivered an e-commerce site using the Magento e-commerce platform, which has been very enjoyable to work with. But one key concern for us, with our focus on usability best practice (PRWD’s Paul Rouke delivers a regular training course on exactly that subject), is to ensure that the sites we deliver meet the same high standards that we would recommend to others. Fortunately, Magento provides excellent usability in many of its features and with some careful work on the site design and layout, building a high-usability site proved fairly straightforward.

However, we did encounter one serious usability issue. One of Paul’s recent tips for increasing e-commerce conversion rates was to ensure that delivery costs are displayed to the customer before the checkout process has begun. A last-minute shock during the checkout, as the price leaps due to shipping costs and taxes, can be one of the key factors causing a high drop-out rate during checkout. And Magento does not, by default, show shipping costs on the shopping basket page. What it does show is a ‘shipping cost calculator’, but this is much too complex for ordinary customers, and is unnecessary in most cases. For the case of a retailer shipping within a single country, the standard shipping costs are likely to be predictable and there is no good reason for not showing a standard shipping cost on the basket page.

With that in mind, I set out to create a Magento module that automatically applies the most suitable shipping charge to the customer’s order before it has been placed. This turned out to be a bit more complicated than I imagined, but it has been very educational for me and has resulted in our first open-source module for Magento: the PRWD Auto Shipping module.

How it works

What now follows is a fairly technical description of how the module actually works. If you’re just interested in how you can use it on your own sites, follow the link to the module and read the instructions there.

Magento provides an implementation of the ‘observer pattern‘, a software design pattern which is used to allow different elements of a piece of software to ‘observe’ events that occur elsewhere in the software. In my case, I was interested in observing the events that occur when a customer adds a product to their shopping basket, or updates the contents of the basket. Only once we know what’s in the basket can we calculate which shipping option to use.

Setting up an observer in Magento involves specifying the class and function to call in an XML configuration file and once this has been done, that function will be called every time the event occurs. The Auto Shipping module has a function set up for precisely this purpose; when either a new product is added to the basket, or the contents of the basket are changed, the function is called and the shipping costs are calculated. Thus, when the user visits the shopping basket page, the costs are ready to be displayed.

Magento includes a system for specifying shipping methods and for ranking these shipping methods in order of preference. For example, a ‘Free Shipping’ method may exist for orders over a certain price, and if this method is available (that is, if the order qualifies) then we want to apply that shipping method. We therefore rank Free Shipping as #1. The second option might be a default Flat Rate, a standard shipping charge for normal deliveries. If we rank this as #2, it will be applied only if Free Shipping is not available.

Let’s assume that we’re applying free shipping to any order over £50 in value. If the customer adds £40 worth of goods to the basket, free shipping does not apply and so the standard flat rate for shipping is displayed. However, if the customer adds an extra item to the basket, taking the total over £50, free shipping is then automatically applied. Conversely, the customer then removes an item from the basket and takes the total value below £50, the free shipping will be removed and the standard rate applied in its place.

It’s not a hugely complicated module, but it takes good advantage of Magento’s object-oriented and patterns-based design to provide a usability benefit which should help to boost conversion rates. If you’ve used the module yourself and find it useful, it would be great if you could leave a comment or give some feedback. And if you’re interested in talking to PRWD about Magento-based e-commerce sites, or e-commerce usability needs, you can contact us to discuss those further.