The Wholesale Module provides you with an easy way to restrict viewing ShopSite pages and products to registered customers belonging to a particular group or groups. With the Wholeale Module you can:
1. Set a global group or global groups allowed to view wholesale pages or set the group or groups allowed to view a page or product on a page-by-page and product-by-product basis
2. Set an email address to receive email notifications each time a new customer registers so that you can assign the new customer to an appropriate group, if necessary.
3. Add custom fields to the New Customer registration and account preferences screen and an interface to view customer details along with any custom variables you have added
4. Set custom pricing on wholesale products based upon the group of a customer
Restricting Pages and Products
Products and pages restricted to wholesale customers (or more specifically, wholesale groups) must be assigned to a wholesale page or product template. Wholesale products must only be assigned to protected wholesale pages (pages assigned to a wholesale template) or they will be visible to anyone on the non-wholesale pages.
There are no restrictions in place to prevent a non-wholesale customer from checking out with a wholesale product--only from viewing a protected wholesale page.
How to define who is able to view a page or product MoreInfo page:
There is more than one way to set up restrictions in the Wholesale Module. The module was written this way in an attempt to provide both flexibility and ease of use. In the Wholesale Module Preferences there is a setting for Default Wholesale Groups.
1. You have a group (or set of groups) for which all wholesale pages will be protected:
- You can simply enter the name of the group (or a pipe-separated (|) list of groups) in the `Default Wholesale Groups` field of the Wholesale Module Preferences, then assign your wholesale pages and products to the wholesale templates.
2. You have sets of pages that should only be views by certain wholesale groups and other sets of pages that should only be viewed by members of other wholesale groups:
- In this case, you will leave the `Default Wholesale Groups` field blank in the `Wholesale Module Preferences` and enter the group (or a pipe-separated (|) list of groups) in the `wholesale_restriction` field of each page or product (in the extra page and extra product fields). The page/product will be viewable only by the group or groups you enter into this field.
Please note that the group names must match *exactly* and are case-sensitive.
Adding Custom Registration Fields
ShopSite's customer registration system provides limited information about your customers, but many merchants need to store more specific information about their customers, especially if they are wholesale customers. You can add your own custom fields for your registered customers to the new customer registration page (to enter the information when they first sign up) and to the account preferences page (to add/edit this information after they have signed up).
To add custom fields you will enter the HTML for your custom fields within the Sign Up and Preferences form on the New Customer Registration and Custom Account Preferences pages respectively using a name attribute of:
1. Setting up custom registraion fields:
The field that is submitted is assumed to be a text field, and you would be responsible for validating the data, if necessary. To use other types of fields (checkbox, radio buttons, etc) you should implement a hidden text field with the name attribute set as described above that is updated when your field is changed (see Advanced Implementation of Form Fields below). For example:
Company Name: <input type="text" name="lex:company_name" id="lex:company_name" />
You will be able to view the custom information entered by each customer using the "Registered Customer Browser" which is installed in:
and is password-protected using the same username and password as your Back Office login.
The additional custom fields are also available on pages and products using the wholesale templates as PHP session variable using your custom field names as the key:
2. Advanced Implementation of Form Fields:
Custom Pricing Based Upon Group
Wholesale products may be set to display prices based up the group of the customer viewing them. In order to implement this feature you must:
1. Add an extra product field for each customer registration group in Preferences->Extra Fields:
Each extra product field label must match the name of your registration group exactly (case-sensitive, as well).
2. Make certain each the product you are configuring is assigned to the wholesale product template.
3. Edit the product and check the "Check here to enable variable pricing" checkbox and set the Price to $0
4. Enter a pipe-separated (|) list of the wholesale groups allowed to view this product in the extra product field labelled wholesale_restriction then enter the custom price availble to each group in the extra product field that matches the group:
5. Publish, and your product should display the price you specified for each group