Reading Time: Minutes

Case Study: Warehouse on Woo

Every once in a while I take some time outside of WooThemes to do some freelance work. However, my reasons for doing freelance work are quite different to most developers (I’m generalizing here, but usually it’s money). My reasons are usually to scratch an itch to play with a new technology, to learn how to use a particular product at WooThemes that I wasn’t part of building, or because it presents a possible business opportunity. Recently I was presented with an opportunity that fulfilled all 3 of those criteria – much to my delight.

Setting the stage

2 close personal friends of mine came to me last year with a business opportunity that would require me to build a system to manage both a warehouse stock and ordering process as well as the customer storefront.  The system would be closed off to only verified users, and a specific process flow would be followed from the initial order to the completion of the order.

The requirements were simple:

  • Secure customer login where Customers could create orders regardless of how much stock was on hand
  • Customer Administrators would then approve or cancel these orders
  • The Warehouse Manager would process the approved orders and despatch them to the customer from the warehouse
  • Once the order was delivered, the order would be complete
  • Payments would be handled separately, so no payment gateway was necessary
  • A support forum for customers was needed as well

But what to do to get this done?

I initially thought about custom building a system in something like Kohana as I had no knowledge of any existing WP product that would completely meet my needs. In the end I decided on using WP as my code framework seeing as how I had punted WP as a development framework at last years Cape Town WordCamp.

While thinking about how to custom build this into WP, I had an epiphany of sorts. WooCommerce, at its core, has the ability to do around 70% of the main features that the system required. So why not use it as a base? It would save SO much development time!

Making it happen

So I ended up implementing a customized version of WooCommerce 1.3.2.1 to handle the orders and the stock management, basically to be the super powered engine of the system, as well as to handle the reporting requirements. WooCommerce is amazing – Jay and Mike have built an incredible product that was a pleasure to use as a base to work from.

I then used Justin Tadlock’s Members plugin to handle roles and permissions, bbPress for the forum requirements, and the Shelflife theme designed by Fresh01 (my personal favorite designer and WooThemes colleague) for the customer frontend. In addition to that, Customers and Customer Admins would never see the WP dashboard, and the Warehouse Manager would never see the frontend. All of this was achieved with WP functions 🙂

Getting technical

Customers

I created a customer dashboard from the standard my account page in WooCommerce with a few minor tweaks. I restructured the standard WooCommerce menu system a bit, but overall left most settings unchanged.
The search page is standard, but I moved the filtering system into the standard price filter widget
I also used some of the themes built in shortcodes like the Info boxes on the orders completion screen to notify the customer that their order will only be complete once it is approved.

Customer Administrators

The Customer Admin dashboard has the ability to approve orders – this is key in the whole process flow, and while a customer will only see their orders, the customer admin will see all their companies and departments orders so that they can approve them. The process flow of an order is: Pending (Customer) -> Approved/Cancelled (Customer Admin) -> Processing/On-hold (Warehouse Manager) -> Despatched (Warehouse Manager) -> Complete (Warehouse Manager)
To perform the “Approve” function I simply modified the pay_for_order.php file in the theme to handle the custom user role. All it is is a status update. Clever hey? 😉

Warehouse Manager

The warehouse manager does not need to see all the WP menu items in the backend dashboard. He is only concerned with orders and support queries. So I removed some of the menu items just for his user role.
The main screen for the warehouse manager is the orders screen where I created some custom ajax action buttons to better handle the process flow – you will see these on the right hand side -> “On-Hold, Despatch, Complete” and the colour coding is simply a visual aid.

I’ve implemented the system onto a live domain as well as onto an Ubuntu LAMP server in the warehouse – I used XCloner to make the move as simple as possible – and the next step is to syncronize the 2 databases. Should be fun 🙂

Lessons learnt and how this applies at WooThemes

Being a lead developer here at WooThemes gives me the great privilege of working with and building some of the best products on the market for WordPress. Working on projects outside of WooThemes, and using our own products has always allowed me to improve them and to see how they perform in real life. I suggest all theme and plugin developers try out their own products and see how they really perform.

Would you like to be featured on our blog? Share your experiences working with WordPress and our themes and if we believe it will benefit our community we’ll publish it. Contact us.
Have Work For Us?

Let's Discuss Your Project

At Hostyler Group, We Craft Visually Stunning & Functional Websites

CONTACT US

Support@Hostyler.com
6 AM to 8 PM (GMT)
© Copyright 2024 Hostyler Group
Sitemap Privacy Policy Terms of Service