I’m often asked if you can have a wholesale shopping cart using a WordPress website. The simple answer is that none of the available eCommerce plugins for WordPress were designed for wholesale ordering – they are all simple retail shopping carts. However, I recently discovered a way that you can “trick” a retail cart into behaving like a wholesale cart. Here’s how I did it:
OK, the reality is the cart is still a simple cart, you can only add one thing to the cart at a time, and you can’t have multiple pricing levels or allow someone to pay or terms – it still isn’t a real wholesale shopping cart. But you can require someone to login, and then show them wholesale pricing. This makes it so that retail customers can browse around your website, but only approved wholesale customers that have a login will be able to order from you. For simple wholesale ordering with only a few products, this can be significant.
First, I created a new page template. This requires some PHP programming that looks like this:
Now, when you create a page (such as your shopping cart page), you specify that you want to use this page template. Here is an example:
When a user visits your website and clicks on the “Wholesale Orders” menu item, if they have not logged in, this is what they will see:
Of course, if they are already logged in, they are presented with the shopping cart, which contains your products with your wholesale prices. Only wholesale customers that you have provided with a login will ever see your prices and be able to order!
You can do this for other pages as well where you want to require someone to login in order to see a particular page.
Need help doing this with your website? Leave me a comment or give me a call.