WooCommerce Quotes instead of Orders

I recently helped set up a website for a client that sells rubber products (hose, pipes, matts etc). Their prices change daily as exchange rates and oil prices fluctuate – the changes are so important to their business they have an employee that sits at a computer all day to change product prices in their accounting software.

Running a scheduled script that pulls the real prices from their Pastel Accounting system is something that I wanted to build for them, but this is a long way off in phase 2 or 3. I believe digital is the best place to launch first, then iterate. An additional benefit of this approach is your client is educated through the process and a digital business can structure revenue with more certainty if a project is build in an ongoing fashion.

The problem I had was to look for a way to let the client add products through a CMS as if they had an online store, especially as I knew full e-commerce was in the roadmap, but allowed them to provide the quotes to potential clients via email. This meant

  1. Most importantly they could use their existing business process for quoting via email which they have done for years
  2. Turning into real online commerce is easy
  3. We didn’t need to build the automated script to pull prices up front

A problem with WooCommerce I wasn’t going to be able to email the contents of a cart through to the sales staff without building a huge plugin.

So the solution I settled for the first phase was when a user wanted to buy a product, they could easily send a request to get a quote directly from a product page. Then the sales process would be handled manually by their current sales staff.

The problem is the user cannot have a cart like experience and send an entire cart at once for a quote, but the fact that the client can have a lead generating, product driven website and send out quotes using their existing processes right now far outweighs that.

To implement this into a WooCommerce theme is quite straight forward. All you need is Gravity Forms and a WooTheme which supports their WooCommerce plugin. In this example I used Inspire

What I did was:

1. Disabled the cart and account items from the navigation.

2. Then each item mustn’t have a price. Not zero, the price field must be empty.

3. I then hid the price text for the items with CSS

span.price, p.price{ text-indent:-9999px; overflow:hidden;}

4. I also added a background image for the price with a graphic that explains the call to action to the user to fill out the enquiry form.

span.price, p.price{
background:url(ct-rubber/no-price-checkout/bg_product_price.gif) top left no-repeat; height:40px;
}

5.Then on the product page in the WooCommerce child theme (inspire-commerce/woocommerce/woocommerce-layout.php) I added a hook to include a Gravity Contact Form.

add_action( 'woocommerce_after_single_product_summary', 'add_enquiry_form_for_products', 20);

6. Then in the same file I added the ‘add_enquiry_form_for_products’ function that pulls in the gravity form which looks like this:

function add_enquiry_form_for_products(){
gravity_form('3', $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=true, $tabindex);
}

7. Then in the Gravity form setup I added two hidden fields, one for the Title and the other for the Page Url so you know which product the enquiry the made for.

Hope that helps someone out there who want the same functionality.

Nicholas Soper's Website 😎

About Nicholas

I love helping people and solving problems. I am currently working on:
A Cape Town Fibre ISP – Atomic Access
Borderless Blockchain Mobile Network Operator – World Mobile
From England and currently living in Cape Town, South Africa.
Learn more about Nicholas.