Magento_Msrp module

This module provides functionality for Manufacturer's Suggested Retail Price (MSRP) pricing rendering, configuration, and calculation.

Installation

The Magento_Msrp module creates the following attributes:

NOTE: If described attributes are not removed when the module is removed/disabled, it would trigger errors because they use models and blocks from the Magento_Msrp module:

For information about a module installation, see Enable or disable modules.

Structure

Pricing\ - directory contains interfaces and implementation for MSRP pricing calculations (\Magento\Msrp\Pricing\MsrpPriceCalculatorInterface), price renderers, and price models.

Pricing\Price\ - the directory contains declares msrp price model interfaces and implementations.

Pricing\Renderer\ - contains price renderers implementations.

For information about a typical file structure of a module, see Module file structure.

Extensibility

Developers can pass custom msrpPriceCalculators for Magento\Msrp\Pricing\MsrpPriceCalculator using type configuration using di.xml.

For example:

<type name="Magento\Msrp\Pricing\MsrpPriceCalculator">
    <arguments>
        <argument name="msrpPriceCalculators" xsi:type="array">
            <item name="configurable" xsi:type="array">
                <item name="productType" xsi:type="const">Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE</item>
                <item name="priceCalculator" xsi:type="object">Magento\MsrpConfigurableProduct\Pricing\MsrpPriceCalculator</item>
            </item>
        </argument>
    </arguments>
</type>

More information about type configuration.

Extension developers can interact with the Magento_Msrp module. For more information about the extension mechanism, see Plugins.

The dependency injection mechanism enables you to override the functionality of the Magento_Msrp module.

Events

This module observes the following event:

etc/frontend/

etc/webapi_rest

etc/webapi_soap

For information about an event, see Events and observers.

Layouts

The module interacts with the following layout handles:

view/base/layout directory:

view/frontend/layout directory:

This module introduces the following layouts and layout handles:

view/frontend/layout directory:

UI components

This module provides product admin form modifier:

Magento\Msrp\Ui\DataProvider\Product\Form\Modifier\Msrp - removes msrp_display_actual_price_type field from the form if config disabled else adds validate-zero-or-greater validation to the field.

Additional information

Catalog attributes

This module extends etc/catalog_attributes.xml and provides the following attributes for quote_item group:

Extension Attributes

This module provides extension attributes for Magento\Catalog\Api\Data\ProductRender\PriceInfoInterface:

data-slots=text
The version of this module is 100.4.8.