MDS Collivery Shipping Module for WooCommerce

What started of as a small WordPress project for a client quickly turned into something much bigger (and really exciting) after getting in touch with the person in charge for the API of MDS Collivery, and asking for his assistance.

Introduction

We where working on a WordPress eCommerce (Jigoshop) website for a client that asked if we could write them a simple plugin that would get the shipping price from one of South Africa’s local shipping companies, MDS Collivery, and add it to the total. While working on the plugin, I ran into some trouble, and contacted MDS to ask if they can assist. I was put into contact with Dale who proved very helpful and later asked if I can’t help them make an official plugin for WordPress (Jigoshop).

Having gained some experience from the previous attempt, and a larger budget, I accepted this challenge and decided to start from scratch and do something proper that can be used as a basis for all other plugins! I did some research and looked at all the eCommerce plugins available for WordPress. As I’ve had a very bad experience with Jigoshop support, I tried to convince Dale that we shouldn’t go for Jigoshop first. After trying a few out, I realized that WooCommerce is a fork of Jigoshop, and has much better support and features. Looking at previous emails, Dale agreed that he has more requests for a WooCommerce plugin, than Jigoshop plugins. And thus, development was started!

Development

Except for their current Joomla plugin for VirtuMart, this was the first of its kind. And luckly for me, Dale was very easy going on the outcome of the plugin. They wanted the price to be added to the total (as with the Jigoshop one), and they wanted the admin to be able to register the shipping with their API in one click. Although there are a lot of features we still wish to add like, tracking your shipping progress and more flexibility, this was a good start to play around with the features of WooCommerce and see what can/can’t be done.

I found out that WooThemes (Creators of WooCommerce) where based in South Africa, and where more than ready to help a fellow developer. This was a HUGE improvement to Jigoshop where the answer was always “Look in the code, its well commented” after having paid 500 USD for support. Great way to spend your money if you have 500 USD you want to throw to the fishes!

The Plugin

Ok, sWooCommerce Checkout Screeno the part you all want to read is this. As MDS has a list of names for towns and suburbs, and has a few extra fields (Like building type), I replaced all the standard checkout fields with already populated fields from MDS. This makes it very easy to check out by simply choosing locations from the drop down menu’s. However, this caused the information in the admin side to be useless like: Address – 336 Church Street, PTA, 4467, 1. So, instead of using their ID’s as values for my lists, I decided to use the names, and then look up the names for the ID’s afterwards. This made it a lot more readable for the admin and other plugins if they wish to use the address/contact fields.

MDS Admin ScreenThe only other thing added was a page to register the shipping from within the order. The admin can go through all the orders, and simply click “Register Shipping”, and all that information will be sent to MDS, and they will arrive at your door hungry for what you have to offer. No phone calls, no emails, no questions asked.

I then spoke to Dale about releasing this under the GPL3 license and placing it on GitHub to allow other developers to join in on the fun and customize it to their requirements without breaking updates.

Get the Source

The plugin was recently uploaded to GitHub and, while still in Beta, free for everyone to use and try out. Check it out here: https://github.com/Xethron/wc-mds-collivery

If you have any questions, bugs and/or feature requests, you are most welcome to leave a comment or submit an issue on GitHub.