WooCommerce Restaurant Tips

chrislema-face

Are you using WooCommerce yet?

It’s not for everyone, and it’s not for every site. If you’re doing simple digital downloads, then WooCommerce may be too much for you (and if that’ so, look for my upcoming post on Easy Digital Downloads).

But for an all-purpose, general e-commerce solution on WordPress, there’s a lot going right with WooCommerce. It’s why I write about it a decent amount. And because of those posts, I get emailed questions.

WooCommerce for online restaurants

The question that came in this week was about using WooCommerce for an online restaurant that was doing deliveries. They had their menu online and wanted people to order.

But they wanted something more. They wanted to create the opportunity to let patrons add a tip to the order. And they wanted to do it without lots of code or complexity.

They wondered if the platform supported it. And the good news is that it does.

Woocommerce restaurant tips

Let’s walk thru our goal before I walk you thru the steps.

  1. Create a special product that is a tip product.
  2. Enable users to define the amount they want to give as a tip.
  3. Add a place on the cart page to let them add their tip.
  4. Make sure the tip product doesn’t appear in the regular catalog.

As you can see, if we could do it in four steps without a lot of code, I think these guys would be pretty happy. So the question is – is that really possible?

You know the answer don’t you? Because what’s the point of writing a post about how it’s impossible, right?

1. Create a special product that is a ‘tip’ product

As you can imagine, most WooCommerce products have a fixed price. When you add attributes that vary the price (like t-shirt size, or color), you add variations, but also at a fixed price. So how do we create a product like this ‘tip’? Now to be honest, I didn’t go in and create images, nor did I style things. So this my version of the “raw” answer.

In reality we create this product like we do any other. We create it, without assigning it to a category (because then it might show up as a related product), and we’re almost done. But we need to allow it to have any value the customer wants. That takes us to step two.

2. Enable users to define the value of our ‘tip’

To do this, we need to pick up one of the WooCommerce extensions. Don’t fret, it’s cheap and easy to do. It’s called Name Your Price, and it’s $29. It is perfect for our tip product. And it lets us configure our product so that users can define any amount they want. All you need to do is go into your product definition and check the box that says “Name Your Price.”

As you can see, you can even create a “suggested price.”

3. Allow users to add a tip from the cart page

Now that we have our tip product, we just need to make it available at the right time – which is when a user looks at their cart.

Now, you could get a little funky here. You could go to the template for the shopping cart  (/woocommerce/templates/cart/cart.php) and write some nifty code that would put it under the cart table. You could limit the display of the text to only when the cart a) has products, and b) doesn’t already have a tip product. Once you went that approach, you’d want to take that file and place it in your /theme/woocomerce/cart/ location so that it would overwrite the plugin without locking you into hard-coding anything.

But that would require coding.

And that wasn’t our goal. So here’s the super simple way.

You guessed it. We go into our cart page (that WooCommerce created for us) and above the short code that’s already there, we create some text and a link to our tip product.

Yes I know it means it will always show up. But seriously, is it that big of a deal? And remember the point here is fast and simple.

So you can imagine what happens. The person goes to the cart, sees the link, heads back to the tip product, puts in an amount and is taken back to the cart.

4. But wait…it’s a product

At this point, you’re pretty happy until you hit that “shop” link and notice that the ‘tip’ product is listed right there with every other food on your menu. Not exactly what you want, right?

No problem.

You see, you have options regarding how your products appear – even if you didn’t know it. It’s because it’s kind of hidden away. But let me show you where it is. It’s over in that Publish area on the top right of your page. Check out the visibility options.

While normally products are marked as ‘catalog/search’ you can decide to make it only ‘search’ and then, boom – it disappears from your catalog. Notice that there’s no ‘tip’ product below.

Tips have never been easier

And that’s how you do it. Four steps. Not too hard, and no coding.

Do you have a WooCommerce question? I can’t promise to answer it, but I’d love to hear it. Send me a note via my contact page. And be sure to subscribe (orange box) to these posts so you see when a question gets answered.

About Chris Lema

Chris Lema has been working with WordPress since 2005. Over the years he's been a blogger, a speaker at WordCamps, a coach for WordPress product companies, and the founder of the conference for WordPress business owners, called CaboPress. Today he's the VP of Products at Liquid Web, where he manages the world's first managed platform for WooCommerce stores.

Chris Lema

Chris Lema has been working with WordPress since 2005. Over the years he's been a blogger, a speaker at WordCamps, a coach for WordPress product companies, and the founder of the conference for WordPress business owners, called CaboPress. Today he's the VP of Products at Liquid Web, where he manages the world's first managed platform for WooCommerce stores.

Join more than 7,500 others

My posts. Your inbox. Beautiful.

Chris Lema Speaking

Do You Want To Pick My Brain?

Over the last few years, through private consulting, coaching, and using the pay-by-the-minute Clarity service, I've helped hundreds of folks like you solve their WordPress problems and overcome their technical challenges.

“In 18 minutes Chris was able to save me months of lost time and tens of thousands of dollars by directing me to the right technologies to create my course marketplace. The value was 100x what I paid.” — Josh

Have a question right now? Most of my Clarity calls last less than 20 minutes. Let's set up a call.