Creating a Wholesaler Role in WP e-Commerce – Part One

So, I have a client doing some tidy business in handmade children’s clothes. I worked with her designer late last year to turn out her e-commerce website build on WP e-Commerce and it’s been humming along paying for itself reasonably well.

So Sarah, having got the day to day management of the online store running smoothly wants to add her wholesalers into the mix and offer them special pages for their eyes only and discounts on product throughout the whole store.

So where do you go to make that happen?

Before we begin the issues to address are –

  1. Creating a Wholesaler User Role and managing how to give it particular privileges
  2. Being able to offer wholesaler discounts on the cost of store items
  3. Having a payment gateway for wholesalers that allows for deferred payment/COD
  4. Customising the Registration for to allow for custom fields like store name and address
  5. Customising the normal site login page with the Fabrik logo to create a more professional impression!
  6. Creating a way of having content served specifically to wholesalers that isn’t available to ordinary shoppers

It’s a good thing that all of these issues can be addressed using plugins. Here’s the run down on what we already had, and what we’re adding in.

We had.

WP e-Commerce – a shopping cart plugin from Get Shopped – Free
Gold Cart for WP e-Commerce, a commercial add on to spruce up some of the display options and increase access to different payment gateways. Cost $40.00
Dynamic Widgetsfor specifying widget visibility on a per page basis. – Free from the WordPress repository

What we added in.

User Role Editor – Free from the WordPress Repository
WP e-Commerce wholesale pricing from Visser Labs – $60.00
Gravity Forms – Ok, this is the expensive bit, because access to the next item on the list requires the Developer License – $199*
Gravity Forms User Registration add on (only available to those with a developer license.. but SO worth it). – see above
Login Logo by Mark Jaquith Free from the WordPress Repository. (I’m keeping it simple)

1. Creating a Wholesaler Role

So, getting all this stuff together isn’t too difficult. I’m assuming you know how to get hold of plugins, either via their websites as above or on the repository. So get a hold of the Wholesaler Role plugin and install, and activate it.

What you will get is a new link in the Users menu predictably ‘User Role Editor’ which takes you to a new options page. Start with creating a new Role (we called ours wholesaler) and then assign the capabilities for that role


Now, I think the default shows the roles as they are written in the code, heck, make it easy on yourself and tick the checkbox marked Show Capabilities in Human Readable form… and then set your Wholesaler role up with the capabilities as follows


So, there you have it, you now actually have a user role called Wholesaler – and if you duck over into the Users menu and select a user you’ll be able to see wholesaler in the dropdown box in which you assign roles to any user in your database.

The options you see here will depend on what level user you are when you're logged in. I'm logged in as an Admin so I can see them all

The options you see here will depend on what level user you are when you’re logged in. I’m logged in as an Admin so I can see them all

2. Setting discounts across the store for the wholesaler role.

Now, this isn’t something that is built into WP e-Commerce, the shopping cart that Fabrikstore is using.  Happily though, there’s a custom made plugin for just this requirement available over at Visser Labs.

Install and activate the plugin and  under Settings you’ll notice a new admin option called Wholesale Pricing in the list just above Store settings link. On this page you can edit the prices for any of the roles associated with your site.  Subscriber is the default ordinary shopper user, just in case you wondered.


Set your price, save the changes and move on, nothing else to see here.

3. Adding a Payment Gateway that allows for deferred payment.

Now it took me a while to figure this one out.  And when I did I kicked myself that it was this straightforward.  It requires no add ins or plugins other than what we already had, but trip over to the Store Settings and then the Payments tab.

Sarah’s default gateway is PayPal, that’s been up and running a while. But I hadn’t really considered  that you could have 2 gateways concurrently, nor that the test gateway was all we needed to allow for pay later transactions.  But… a) you can and b) here’s how simple it is…

Activate the Test Gateway and then over over its place in that list of payments in this settings page and a little Edit link will appear… click that and in the right hand panel you’ll see the simple settings you’ll need to edit. Here’s how I set it up for Sarah.


So, now we have a brand new role called wholesaler, they have cheaper prices displayed on each item in the store, and they have their own deferred payment option… We’re off to a cracking start…

However, it’s late here, and while I’m dying to show you the cool stuff I did with gravity forms, I’m just keen to hit schedule on this post and grab some quality pillow time… I’ll give you more tomorrow!!

* Indicates Affiliate Link


  1. Michelle says

    Awesome Tutorial!
    Really easy to understand and follow. Can’t wait for part two.
    Also wanted to make a note anyone considering gravity forms shouldn’t be put off by the price its well worth it :)


  2. says

    Dee, This tutorial is great for an upcoming project. But I have a couple of questions:

    1) I assume by your description that one could create multiple levels of wholesalers (wholesale1, wholesale2, etc) so that one could assign different discount levels?

    2) Is there a way to assign specific prices to specific products for each wholesale group? (i.e. product A is $25 retail, $20 wholesale1, $18 wholesale2 — yet product B is $25 retail, $20 wholesale1 and $20 wholesale2)



  1. […] client of mine wanted to add a whole bunch of wholesaler functions to her WP e-Commerce store so in Part One we covered some of the plugins required to allow for a new Wholesaler role in her Users list and the addition of functionality to make that […]