There are a lot of great e-commerce products in the WordPress space. I had dinner with Justin Sainton and we were remarking on how the e-commerce space has changed over five years. If you don't know, he's one of the lead engineers for WP E-Commerce.
So when I write about WooCommerce, it's because it's the platform I know the best, not because I think it's the best. As with anything, once you realize the complexities in a space, you soon learn that the right tool for the right problem always leaves you answering, “it depends” when people ask for the best product.
Anyway, here are two WooCommerce tips that I hope will help you out.
The Empty Shopping Cart Challenge
One of the two tips I wanted to highlight today appears when you host your WooCommerce site on a managed provider like WP Engine.
Because they run an infrastructure that is focused on high performance, they use a lot of caching. And that's fantastic since most of your pages don't change and caching will make them load quickly.
But your shopping cart is, by nature, a dynamic page. It's one that shouldn't be cached. But it's unlikely that they know it shouldn't be cached. So the result is that you put something into your cart, and then go to a cart that looks empty.
It's not empty, but the page is cached, so it looks empty.
So how do you resolve this? Well, what you want to do is tell them that you would like to make sure your cart page is never cached. That's really the best and easiest way – especially if you're not very technical (which may be the reason you're using them).
Is that all?
Well, almost. The reality is that it also likely means you don't want to put a cart widget on all your pages, since it will affect your ability to cache all your other pages. So I recommend not having the cart widget, and instead, putting a cart menu item that's always available. That should help you avoid costly customer support calls.
The Straight to Check Out Hack
The other tip relates to being able to skip the cart page altogether.
Why would you want that? Well imagine you want to have a single link that lets people pay for something without all the steps they'd normally have to take.
You know, the link you put on Twitter or Facebook that puts something not only into a cart, but moves them directly to checkout to pay.
There's a simple way to do it. But you have to make sure that you haven't checked the box that says you'll send people to the cart every time they click the buy button.
Once you have that unchecked, you are ready for this little trick.
When you look at your product page and click the “add to cart” button, you will normally see your url change. It will say something like:
That ID is the product ID. And that's going to be critical. Because you're going to want to use that – in just a second.
Now, if you were to continue on to your checkout page, it would be something like:
And now I'm going to show you the little trick – as shared with me by my very own WooNinja, Patrick Garman.
What you do is you append a little string to that checkout url, so that it looks like this:
And that's it – it will put the item directly into the cart and move the user directly to the checkout page.
Now, if you were to create a bit.ly link for that, you'd end up with a neat little short url that could be passed around Twitter and help people move straight to giving you money – and you know you're worth it!
So go for it!