Skip to content

Magento 2 Prices per Customer Manual

Prices per Customer

Introdution

Magento 2 Prices per Customer extension allows the merchant to utilize an individual approach to shoppers, providing any customer with both regular and special price for each product. The flexible settings let the store owners create an effective pricing strategy for Magento 2 online stores. The extension provides schemes for product pricing (flat rate, ± flat rate or percentage).

Requirements and Installation

Prices per Customer supports both Community and Enterprise edition of Magento 2. The current version of Magento installed on your website can be found in the lower right corner of any backend page.

Prices per Customer extension has 3 separate ways of installation: via Composer or by copying the code.

1) Copy the code (ready-to-paste package);
2) Use MageWorx Repository;
3) Use local Composer.

Extension Configuration

Backend Setup

Log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ Prices per Customer .

Prices per Customer

If the merchants need these new prices to be taken into account for the price rules, they can enable the Use Customer Price In Catalog Price Rule.

If the store owner changes the prices but doesn't observe this on the frontend, it is recommended to click the Manually Synchronize Data button.

Assigning Prices From the Products Workspace

To set custom prices for different store shoppers from the Products workspace, the store owner needs to go to PRODUCTS ⟶ Inventory ⟶ Catalog and select the desired product to adjust this value for. The extension adds the Prices per Customer tab at the bottom of the page.

Prices per Customer

Click the Search Customer button to show the customer grid in the popup.

Prices per Customer

Pick up the customer’s email by clicking the Select link in the last tab to automatically populate the Customer Email

Prices per Customer

After that the store owner can set either/both a Customer price or/and Customer Special Price. Customer Price replaces the product price with a custom value. Customer Special Price shows a new price together with the original price. The extension supports:

  • Fixed values like 10.99. This replaces the current price with the given value.

  • Fixed surcharges/discounts like ±10.99. This increases/decreases the current price by given value.

  • Percents value like 15%. This replaces the current price with the one that can be calculated as 15% from the initial one.

  • Percents surcharges/discounts like ±15%. This increases/decreases the current price by given percent.

Click the Save Customer Price button after you are ready.

After that, below these settings the grid will show the values.

Prices per Customer

It is possible to add as many customer prices here as needed. All these values will be shown in the grid.

Prices per Customer

In this example, the first client has the fixed discount and the second one has the fixed percent value for the regular price and the fixed value for the special one. The store owner can Edit or Delete the custom prices by clicking the corresponding links in the grid.

Assigning Prices From the Customers Workspace

To set custom prices for different store shoppers from the Customers workspace, the store owner needs to go to CUSTOMERS ⟶ All Customers and select the desired customer to adjust this value for. The extension adds the Customer Price tab.

Prices per Customer

By default, this grid shows the modified prices for this customer. If this customer doesn't have any prices and special prices assigned, the grid will be empty. To add the products, click the Reset Filter or select Any in the dropdown and click the Search button.

Prices per Customer

This grid supports the possibility to filter the products by ID, Name, Type, SKU or Prices.

To assign the price and/or special price, you need to click the checkbox next to the product and populate the Customer Price and Customer Special Price boxes:

Prices per Customer

Click the Save Customer button or Save and Continue Edit link. The grid will show the updated list of the products with the modified prices.

Prices per Customer

To delete the price and/or special price, deselect the checkbox near the product.

Frontend Experience

For instance, the regular product price for the unregistered customer is $34 and some particular user has the fixed customer special price $25 and the 4% customer price discount that is $32.64:

Prices per Customer

On the frontend, this user will observe the customer price $32.64 and the customer special price $25:

Prices per Customer

Customer Prices Import/Export

The extension has the possibility to export the prices per customer and to import them. Log into the Magento Admin panel and go to SYSTEM ⟶ Data Transfer ⟶ Import / Export. The import and expor prices functionality is done as the native Magento import/export process, that's why you can use all features available for the native import/export process.

Import

The extension allows you to import either the customer global prices or customer product prices. You should choose the appropriate value in the Entity type drop-down at the Import page. Once it is selected, you can download the sample CSV file.

Other features come from the native Magento 2 import functionality. You can check more details about them here.

To check the structure of the CSV files, click on the "Download sample file" link.

Customer global prices:
Prices per Customer

Customer product prices:
Prices per Customer

The files also support "+", "-" and "%" prices.

Export

The extension allows you to export either the customer global prices or customer product prices. You should choose the appropriate value in the Entity type drop-down at the Export page.

Other features come from the native Magento 2 import functionality. You can check more details about them here.

Migration from Magento 1

If you have our Magento 1 Prices per Customer, you can export the data from Magento 1 and then import the CSV file to Magento 2 installation. For this, log into the Magento 1 admin panel and go to System ⟶ Import/Export ⟶ Prices per Customer ⟶ Export Prices. The Value delimiter should be , and for the Enclose Values In put ".

Prices per Customer

Check the exported file on the server. The structure of the exported CSV will be as follows:

csv "User ID","Email","SKU","QTY","User Price","User Special Price" "1","[email protected]","24-MB01","","4","2" "2","[email protected]","24-MB01","","-14%","-30%" "2","[email protected]","24-MB03","","30","20" "2","[email protected]","24-MB02","","-10","-20"

You should remove the "Email" and "QTY" columns from the CSV file and upload it to your Magento 2 store as the "Customer product prices" entity.

CLI

The extension allows you to synchronize the customer prices using the CLI (command line interface). It might be helpful if you have a large number of customer prices. In order to synchronize data using CLI you should run the following command:

sh php bin/magento mageworx-customer-prices:synchronize

API

Get Global Cusomer price Info

The method needs the admin authorization token.

Magento returns all active Group customer prices for the specified list of customers.

Request Format

api POST /index.php/rest/default/V1/customer/mw-customer-prices-information

Payload

json { "customer_ids": [ "1", "2" ] }

Response JSON example

json [ { "customer_id": 1, "price": "90", "special_price": "80" }, { "customer_id": 2, "price": "90", "special_price": "80" } ]

Create/Update Global Cusomer price

The method needs the admin authorization token.

You can set or update existing global customer prices.

Request Format

api POST /index.php/rest/default/V1/customer/mw-customer-prices

Payload

json { "prices": [ { "customer_id": 1, "price":"90", "special_price": "80" } ] }

Response JSON example

json [] (an empty array)

Delete Global Cusomer price

The method needs the admin authorization token.

You must specify each customer. You can delete multiple global customer prices in a single call.

Request Format

api POST /index.php/rest/default/V1/customer/mw-customer-prices-delete

Payload

json { "customer_ids": [ "1", "2" ] }

Response JSON example

json true

Get Customer Product Prices Info

The method needs the admin authorization token.

Magento returns all active Customer Product Prices for the specified list of SKUs.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices-information

Payload

json { "skus": [ "24-MB01", "24-MB02" ] }

Response JSON example

json [ { "customer_id": 1, "price": "12", "special_price": "13", "sku": "24-MB01" }, { "customer_id": 2, "price": "14", "special_price": "15", "sku": "24-MB02" } ]

Create/Update Customer Product Prices

The method needs the admin authorization token.

You can set or update existing customer product prices.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices

Payload

json { "prices": [ { "customer_id": 1, "price": "12", "special_price": "13", "sku": "24-MB01" }, { "customer_id": 1, "price": "14", "special_price": "15", "sku": "24-MB02" }, { "customer_id": 2, "price": "16", "special_price": "17", "sku": "24-MB03" } ] }

Response JSON example

json [] (an empty array)

Replace Customer Product Prices

The method needs the admin authorization token.

The replace request removes all existing customer product prices for a specified product and adds new rows for this same product instead.

Request Format

api PUT /index.php/rest/default/V1/products/mw-customer-prices

Payload

json { "prices": [ { "customer_id": 1, "sku": "24-MB01", "price": "-11%", "special_price": "-16%" } ] }

Response JSON example

json [] (an empty array)

Delete Customer Product Prices

The method needs the admin authorization token.

You must specify each customer and product. You can delete multiple product group prices in a single call.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices-delete

Payload

json { "prices": [ { "customer_id": 1, "sku": "24-MB01", "price": "-10%", "special_price": "-12%" } ] }

Response JSON example

json [] (an empty array)

Delete Customer Product Prices By Products

The method needs the admin authorization token.

You must specify each product. You can delete multiple product group prices in a single call.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices-delete-by-products

Payload

json { "skus": [ "24-MB01", "24-MB02" ] }

Response JSON example

json [ true ]

Delete Customer Product Prices By Customers

The method needs the admin authorization token.

You must specify each product. You can delete multiple product group prices in a single call.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices-delete-by-customers

Payload

json { "customer_ids": [ "1" ] }

Response JSON example

json [ true ]

Find customer product prices by customer ID

The method needs the admin authorization token.

This method allows you to find the products with custom prices for certain customers by the customer IDs.

Request Format

api POST /index.php/rest/default/V1/products/mw-customer-prices-information-by-customers

Request

json { "customer_ids": [ "4" ] }

Response JSON example

json [ { "customer_id": 4, "price": "19", "special_price": "17", "sku": "24-MB01" }, { "customer_id": 4, "price": "21", "special_price": "20", "sku": "24-MB02" } ]

FAQ

How to schedule import process

This feature is available for Magento 2 Commerce and Magento 2 Commerce Cloud edition. Since our extenion adds the customer prices entities to the native import process, so you can use Magento 2 scheduled import functionality to schedule the import of the customer prices CSV files. See more details about scheduled import here.

Got Questions?

Need help with the extensions? Feel free submit a ticket from https://www.mageworx.com/support/ 



Mageworx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.