Implementing Member Based Pricing

Learn how to implement member-based pricing in Umbraco Commerce.

By default, Umbraco Commerce uses a single price for a product. However, in some cases, you may want to have different prices for different customers. In this guide, you learn how to implement member-based pricing in Umbraco Commerce.

Member Configuration

  1. Creating the Member Groups to use for the member-based pricing. In this example two member groups are created: Platinum and Gold.

Member Groups
  1. Create one Member for each group:

Members

Property Editor Configuration

Next, you will create a new property editor for the member-based pricing. The in-built Block List Editor is used for this.

  1. Create a Member Price element type with a Price and Member Group property.

  2. Use the default Umbraco Commerce Price property editor for the Price property.

  3. Use the in-built Member Group Picker property editor for the Member Group property.

Member Price Element
  1. Open the Product Document Type.

  2. Add a new Member Price property using a new Block List Property editor configuration.

  3. Select the Member Price element type as the only allowed block type.

Member Price Block List Configuration
  1. Navigate to the Content section.

  2. Assign member-based pricing for any product you wish.

  3. Populate the Member Price field with the required Member Group and price combination.

Member Group Price

Product Adapter

With the prices defined, it's time to configure Umbraco Commerce to select the correct price based on the logged-in Member. This is done by creating a custom product adapter to override the default product adapter and select the correct price.

Add the following to a Composer file to register the custom product adapter:

Results

With all this implemented, the product page will display the correct price based on the logged-in Member.

The expected result for the standard product page:

Default Product Page

The expected result for a Gold Member:

Gold Product Page

The expected result for a Platinum Member:

Platinum Product Page

Last updated

Was this helpful?