|
|
2 vuotta sitten | |
|---|---|---|
| .. | ||
| Api/Data/ProductRender | 2 vuotta sitten | |
| Block | 2 vuotta sitten | |
| Helper | 2 vuotta sitten | |
| Model | 2 vuotta sitten | |
| Observer/Frontend/Quote | 2 vuotta sitten | |
| Plugin/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab | 2 vuotta sitten | |
| Pricing | 2 vuotta sitten | |
| Setup/Patch/Data | 2 vuotta sitten | |
| Test | 2 vuotta sitten | |
| Ui/DataProvider/Product | 2 vuotta sitten | |
| etc | 2 vuotta sitten | |
| i18n | 2 vuotta sitten | |
| view | 2 vuotta sitten | |
| LICENSE.txt | 2 vuotta sitten | |
| LICENSE_AFL.txt | 2 vuotta sitten | |
| README.md | 2 vuotta sitten | |
| composer.json | 2 vuotta sitten | |
| registration.php | 2 vuotta sitten | |
The Magento_Msrp module is responsible for Manufacturer’s Suggested Retail Price functionality. A current module provides base functional for msrp pricing rendering, configuration and calculation.
The Magento_Msrp module creates the following attributes:
Entity type - catalog_product.
Attribute group - Advanced Pricing.
msrp - Manufacturer’s Suggested Retail Pricemsrp_display_actual_price_type -Display Actual PricePay attention if described attributes not removed when the module is removed/disabled, it would trigger errors because they use models and blocks from Magento_Msrp module:
\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type\Magento\Msrp\Model\Product\Attribute\Source\Type\Price\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type\PriceFor information about a module installation in Magento 2, see Enable or disable modules.
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 in Magento 2, see Module file structure.
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 Magento extension mechanism, see Magento plug-ins.
The Magento dependency injection mechanism enables you to override the functionality of the Magento_Msrp module.
This module observes the following event:
etc/frontend/
sales_quote_collect_totals_after in the Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver file.etc/webapi_rest
sales_quote_collect_totals_after in the Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver file.etc/webapi_soap
sales_quote_collect_totals_after in the Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver file.For information about an event in Magento 2, see Events and observers.
The module interacts with the following layout handles:
view/base/layout directory:
catalog_product_pricescms_index_indexview/frontend/layout directory:
catalog_category_viewcatalog_product_compare_indexcatalog_product_viewcatalogsearch_advanced_resultcatalogsearch_result_indexcheckout_cart_sidebar_total_rendererscheckout_onepage_failurecheckout_onepage_successreview_product_listwishlist_index_configure_type_downloadablewishlist_index_indexwishlist_search_viewwishlist_shared_indexThis module introduces the following layouts and layout handles:
view/frontend/layout directory:
msrp_popupModule 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 fild.
A current module extends etc/catalog_attributes.xml and provides following attributes for quote_item group:
msrpmsrp_display_actual_price_typeThe Magento_Msrp provides extension attributes for Magento\Catalog\Api\Data\ProductRender\PriceInfoInterface
msrpMagento\Msrp\Api\Data\ProductRender\MsrpPriceInfoInterface