WooCommerce Prices By User Role


WooCommerce Prices By User Role Plugin provides opportunity to establish different prices for each customer group. Also you can do only product catalog without prices and show custom notification instead price.

There are several requirements for use of Negotiate Prices.

  1. WordPress 3.8.x; WordPress 3.9.x; WordPress 4.0.x; WordPress 4.1.x; WordPress 4.2.x; WordPress 4.3.x; WordPress 4.4.x
     
  2. WooCommerce 2.1.x; WooCommerce 2.2.x; WooCommerce 2.3.x; WooCommerce 2.4.x; WooCommerce 2.5.x
    Should be installed WooCommerce Plugin
     
  3. A WordPress WooCommerce compatible theme
    The WordPress theme you use must properly integrate WooCommerce templates. That means using hooks (for advanced users/developers) or using our catch-all woocommerce_content() function inside your theme.
 

WordPress Plugin Uploader

You can install Prices by User Role via the WordPress plugin uploader without unzipping the file:

  1. Log into your WordPress admin panel

  2. Navigate to Plugins -> Add New

  3. Click Upload

  4. Click Choose File and select the woocommerce-prices-by-user-role.zip you downloaded from CodeCanyon

  5. Click Install

  6. Navigate to your Admin Panel -> Plugins

  7. Under WooCommerce Prices By User Role, click Activate

What did this do?
 
Installing the plugin doesn’t automatically  change prices on your site. Once you install the plugin, you’ll get a new Control Panel Prices by User Role under WooCommerce Section in Administrator Panel.

FTP

You can also install WooCommerce Prices by User Role via FTP:

  1. Decompress the woocommerce-prices-by-user-role.zip  file you downloaded from CodeCanyon

  2. Find the woocommerce-prices-by-user-role folder (this directory is created when you unzip the file)

  3. Upload the woocommerce-prices-by-user-role folder to your wp-content/plugins directory

  4. Activate the plugin through the Plugins menu in WordPress admin panel

If you need to use it for another product type, please send the inquiry to support@festi.team.
 
Review the settings in Prices by User Role and/or watch this video before adding your role prices:
 

General Settings

  1. Navigate to Prices By User Role Section in under WooCommerce, tab “Settings”

  2. Hide Add to Cart Button - hides Add to Cart Button for unregistered users

  3. Tick Option “Show Prices only for Registered Users” if you need to hide prices.

  4. Text for Non-Registered Users – here you can type in text which will be displayed for unregistered users. If you need use links or custom style, type html text

  5. Hide Prices for User Roles - tick  the user roles for which you want to hide price

  6. Text for Registered Users with Hidden Price - here you can type in text which will be displayed for user  roles with hidden price. If you need to use links or custom style, type in html text

  7. Discount or Markup for all Products - choose discount or markup for all products. This value will be subtracted (discount) or added (markup) to the Regular Price for all products

  8. Pricing Roles - here you can see user groups that will be displayed for each product. To activate new group for individual pricing just check box with user group name.

  9. Display the Regular Price on Product Page  - here you can enable displaying discount info for  registered users with special price on product page and on cart page. User will see something similar to the following

(Img 1):

Img.1    

Watch this video to understand how to add your role prices for WooCommerce product type "Simple":

Setup Role Price for "Simple Product"

After you are done with the settings, open your product (Edit Product or Add New), you will see the new price field (Img 2) for all active user roles. Type in your price and save the product:

Img 2

After Updating the product, user with this role will see only this price

Watch this video to understand how to add your role prices for WooCommerce product type "Variable":

 

Setup Role Price for "Variable Product"

  1. Add new role or check existed one (Img 3)

  2. Go to Product > Edit > Variations tab 

  3. Add new role price for each variation  (Img 4)

  4. Save product  

Img 3

Img 4

 

You can disable Prices by User Role discount for individual products. Please open Product > Edit >Check box for "Disable Discount" to ignore Price By User Role discount and Update Product

For Variable Product you need to open variation to check "Disable Discount"

Watch this video to understand how to hide prices for certain roles for separate products:

To hide categories of products per role you can use bulk products editing.
 
 
 
 
 

With Import Products feature you can import Simple, Virtual, Downloadable, External and Variable products from CSV. You can import CSV files with free structure, without header or with dummy columns names, and custom separators. Plugin will automatically determine appropriate WooCommerce product fields to map CSV columns or you will be able to do this manually.

How Should File Look Like

Prices by User Role import CSV hasn’t strict requirements to import file fields. When creating new products, you definitely will include the fields to maximally describe them: name, description, category, feature image, price, SKU, stock, product type, visibility, etc. You will get product created having minimum details in the file, though you should always care about informative product catalog and enrich it with all necessary specifications.

When your Prices by User Role import is dedicated to product renewing, you do not need to import all the related details, only product identifier and fields to be updated, for example SKU (identifier), price and description.

The file uploads the next data:

Also please view samples of CSV file:

Simple_products_example.csv

Variable_products_example.csv

 

Note if you are importing variable products:
Make sure you include Parent SKU in CSV file, otherwise, products will be added as simple products and attribute won’t be created;
Map the column with attribute variations to Custom Field and enter the name of attribute if there is no Header in your file;
Check Use for variations under Custom Field to create product variations automatically

Import: Step by Step Tutorial

To import products into WordPress navigate to Prices By User Role section under WooCommerce, tab “Import Products” and folow the steps:

Step 1. Source Selection

If uploading data stored locally, you should paste path to it (browse local folder and choose import file). Also you can enter the URL where it’s uploaded

Check “First Row is Header” option if the first row in your file contains columns names

Note: If you include a Header row into the file, the plugin will attempt to map columns to product fields automatically. If you don’t you will need to map all columns manually.

Step 2. CSV Field Separator (Delimiters)

Data in .csv file are detached by delimiters and on this step you should indicate what exactly CSV field separators are used in your case.

Step 3. Category Hierarchy Separator

Enter characters used in your file to separate categories in a hierarchical structure

Step 4. Decimal Separator

Choose the character to use for the decimal separator used in your file.

While importing the decimails will be cut off if you do not choose correct decimal separator

Step 5. Map CSV columns to fields

Another precondition of efficient WooCommerce import is field associations determining. To be more precise, file columns must be assigned to proper WooCommerce database fields.

Beside each database table name you will find “source field” dropdown. Having expanded it you will get entire list of import file columns. Select the one to assign it to current database field.

If your datafeed column names and database field names coincide, they can be mapped automatically

Preview data to be uploaded and confirm procedure pressing “Confirm & Run Import” button below.

Prices by User role import from .csv being completed, you will get import logs, showing what changes have been implemented for each updated product.

If you see “error” opposite the product it means this product wasn’t added. In this case, remove the causes of the error described in the error message, and repeat all steps from the beginning.
If you uploaded the file but haven’t import it for some reasons, there is no need to upload it again. Just click on Upload and Preview button and the latest uploaded file will be loaded in preview mode.
 

Update products notes:

Update prices for all roles

$prices = array(
    'group1' => 100
);

update_prices_by_roles($product_id, $prices);

Get all prices for product

get_product_prices($product_id);

Get user price for product

get_price_by_user_id($product_id, $user_id);

How to change "Savings" text?

To change the text you can by yourself using localization. Please read instructions how to translate contents here http://wplang.org/translate-theme-plugin/ . 

Or just use http://poedit.net/ to do this. In this case your steps should be the following:

1) download and install Poedit editor http://poedit.net/
2) run Poedit editor and open the language file with .po extension from /woocommerce-prices-by-user-role/languages
3) click on the string you wish to edit and type the text you'd like to appear instead http://www.screencast.com/t/pmxpPhgQRlfB 
4) save new files according to your WP localization https://wpcentral.io/internationalization/ 
5) go to ftp to the folder yoursite.com/wp-content/plugins/woocommerce-prices-by-user-role/languages and insert here new .po and .mo files

If you can't find the answer in this guide, please send your inquiry to support@festi.team.
We will do the best to answer your questions.  
 

How to add new user?

If you want give access to prices for some user, please follow these steps:
 
  1. Go to Admin Panel > Users (yoursite.com/wp-admin/users.php)
  2. Add New User
  3. Regardless of that setting, you can manually create new users here.
 
Strength Indicator This indicates if the password you entered is Very Weak, Weak, Medium, or Strong (displayed in green). The stronger the password the more secure the login. Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like !”?$%^&).
 

Import Question: What will happen if I load simple product which already exists?

Simple product will be updated if SKU already exists (if the simple product already exists and SKU is mentioned in the file product data will be updated instead of creating a new product)

 

Import Question: What will happen if I load variable product which already exists?

Variable product will be updated if Parent SKU already exists (if the variable product already exists and Parent SKU is mentioned in the file product data will be updated instead of creating a new product)

 

Import Question: What will happen if I load images which already exist?

Duplication of images will be skipped if SKU and the image already exist

 

Import Question: Which data could be loaded by Import option?

List of Importable Attributes: