conneqt/module-special-prices

N/A

Installs: 645

Dependents: 1

Suggesters: 0

Security: 0

Type:magento2-module


README

Table of Contents

About

The Special Prices module is a powerful addition to your Magento 2 store, offering advanced pricing management capabilities. This module enables you to set custom prices for products based on a wide range of criteria, providing you with the flexibility to tailor your pricing strategies to suit your unique business needs.

With the Special Prices module, you can:

  • Set custom prices for individual customers or customer groups.
  • Apply these custom prices to specific products or product groups.
  • Choose whether to supply the new price as a final price or as a discount percentage to be applied to the normal product price.

This level of granular control over pricing empowers you to create personalized offers, implement targeted promotions, and optimize your pricing strategies to enhance customer engagement and drive sales. Whether you're looking to offer special discounts to loyal customers, segment your pricing for different customer groups, or experiment with various pricing models, the Special Prices module provides you with the tools you need to succeed in the competitive e-commerce landscape.

Configuration

Navigate to Store Configuration \ Go to your Magento Admin Panel and access the configuration settings: Path: Stores -> Configuration -> Conneqt -> Special Prices

Price Range \ This option determines which special price should be shown if there are multiple results for a particular product and customer. You can choose to display the lowest, highest, or average special price from the available options.

Customer Id Attribute \ Description: Select the attribute on the customer that will be used as a reference for the product assortment. You can choose from all customer attributes that are of text or select type.

Customer Group Id Attribute \ Description: Similar to the customer ID attribute, this option allows you to select the attribute on the customer that will be used as a reference for the product assortment but for the customer group. You can choose from all customer attributes that are of text or select type.

Product Group Attribute \ Specify the attribute on the product that will be used as a reference for the product group. You can choose from all product attributes that are of text or select type.

Validate SKU \ Description: This setting determines whether the product SKU should be validated when adding a special price to the database. Enabling this option will ensure that the SKU provided is valid before adding the price.

Update Price \ This option controls how the API behaves when it encounters a combination of customer_id, customer_group, product_group, or product_sku that already exists in the database. If set to " Yes," the existing values will be updated. If set to "No," a new entry will be created without updating existing values.

Unsupported Features

It's important to note the following areas where testing or support has not been provided:

  • Special Prices with Configurable Products: Special Prices have not been tested with configurable products.
  • Special Prices with Grouped Products: Special Prices have not been tested with grouped products.
  • Special Prices and Taxes: Special Prices have not been tested with taxes.
  • Special Prices and Magento Discounts: Special Prices have not been tested with Magento discounts or catalog price rules.

API Documentation

Postman Doc

[POST] Add Prices

Description: This API allows you to add special prices for products based on specific criteria, such as customer ID, customer group ID, and product references. When the cleanup parameter is set to true, any existing special prices for the specified criteria that are not included in the provided array will be removed. You can also enable the cleanupExpired parameter to automatically remove expired special prices. \ URL: /V1/special-prices/addPrices

Parameters:

customerId (String) \ customerGroupId (String) \ cleanup (Bool) \ cleanupExpired (Bool) \ productReferences (Mixed) - Format: { sku : string, group : string, price : float, discount : float, date_from : datetime, date_to : datetime, qty : float }

Return Parameters:

success (True/False) \ invalidReferences (Array of price references with SKUs that do not exist in the product database) \ createdReferences (Array of price references added to the customer's assortment) \ updatedReferences (Array of price references that were updated in database) \ cleanedUp (Array of price references that were removed from the database) \ cleanupExpired (Array of price references that were removed from the database, because their date_to is past the current datetime)

[POST] Remove Price

Description: This API allows you to remove a specific special price for a product based on criteria such as the product SKU, customer ID, customer group ID, and more. \ URL: /V1/special-prices/removePrice

Parameters:

productSku (String) \ productGroup (String) \ customerId (String) \ customerGroupId (String)

Return Parameters:

success (True/False) \ removed (Array of price references that where removed)

[POST] Remove Customer Prices

Description: This API allows you to remove all special prices associated with a specific customer or customer group. \ URL: /V1/special-prices/removeCustomerPrices

Parameters:

customerId (String) \ customerGroupId (String)

Return Parameters:

success (True/False) \ removed (Array of price references that where removed)

[POST] Remove Product Prices

Description: This API allows you to remove all special prices associated with a specific product or product group. \ URL: /V1/special-prices/removeProductPrices

Parameters:

productSku (String) \ productGroup (String)

Return Parameters:

success (True/False) \ removed (Array of price references that where removed)