magenxcommerce / module-msrp
N/A
Requires
- php: ~7.3.0||~7.4.0
- magenxcommerce/framework: 103.0.*
- magenxcommerce/module-catalog: 104.0.*
- magenxcommerce/module-downloadable: 100.4.*
- magenxcommerce/module-eav: 102.1.*
- magenxcommerce/module-store: 101.1.*
- magenxcommerce/module-tax: 100.4.*
Suggests
- magenxcommerce/module-bundle: 101.0.*
- magenxcommerce/module-msrp-sample-data: Sample Data version: 100.4.*
Replaces
- magento/module-msrp: *
- dev-placeholder
- dev-default
- dev-2.4.3-release
- 100.4.2.x-dev
- 100.4.2
- 100.4.1.x-dev
- 100.4.1
- 100.4.0.x-dev
- 100.4.0
- 100.3.6.x-dev
- 100.3.6
- 100.3.5.x-dev
- 100.3.5
- 100.3.4.x-dev
- 100.3.4-p2
- 100.3.4
- 100.3.3.x-dev
- 100.3.3
- 100.3.2.x-dev
- 100.3.2
- 100.3.1.x-dev
- 100.3.1
- 100.3.0.x-dev
- 100.3.0
- 100.2.7.x-dev
- 100.2.7
- 100.2.6.x-dev
- 100.2.6
- 100.2.4.x-dev
- 100.2.4
- 100.1.5.x-dev
- 100.1.5
- 2.4.3.x-dev
- 2.4.2.x-dev
- 2.4.1.x-dev
- 2.4.0.x-dev
- 2.3.7.x-dev
- 2.3.6.x-dev
- 2.3.5.x-dev
- 2.3.4.x-dev
- 2.3.3.x-dev
- 2.3.2.x-dev
- 2.3.1.x-dev
- 2.3.0.x-dev
- dev-100.3.4-p2
- dev-2.3.6-p1
- dev-2.4.1-p1
- dev-2.4.2-p1
- dev-2.4.2-p2
- dev-2.4.3-p1
- dev-2.4.3-p2
- dev-2.3.7-p1
- dev-2.3.7-p2
This package is auto-updated.
Last update: 2024-09-21 11:33:06 UTC
README
Magento_Msrp 模块负责制造商建议零售价功能。当前模块提供了 msrp 定价渲染、配置和计算的基本功能。
安装
The Magento_Msrp 模块创建了以下属性
实体类型 - catalog_product
.
属性组 - 高级定价
.
msrp
- 制造商建议零售价msrp_display_actual_price_type
- 显示实际价格
注意 如果在模块删除/禁用时未删除所描述的属性,则会导致错误,因为这些属性使用 Magento_Msrp 模块中的模型和块
\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type
\Magento\Msrp\Model\Product\Attribute\Source\Type\Price
\Magento\Msrp\Block\Adminhtml\Product\Helper\Form\Type\Price
有关在 Magento 2 中安装模块的信息,请参阅 启用或禁用模块.
结构
Pricing\
- 目录包含 msrp 定价计算的接口和实现(\Magento\Msrp\Pricing\MsrpPriceCalculatorInterface
),价格渲染器和价格模型。
Pricing\Price\
- 目录包含声明 msrp 价格模型接口和实现。
Pricing\Renderer\
- 包含价格渲染器实现。
有关 Magento 2 中模块的典型文件结构的信息,请参阅 模块文件结构.
可扩展性
开发者可以使用 di.xml
使用类型配置传递自定义 msrpPriceCalculators
以供 Magento\Msrp\Pricing\MsrpPriceCalculator
使用。
例如
<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>
有关 类型配置 的更多信息。
扩展开发者可以与 Magento_Msrp 模块交互。有关 Magento 扩展机制的信息,请参阅 Magento 插件.
Magento 依赖注入机制 允许您覆盖 Magento_Msrp 模块的功能。
事件
此模块观察以下事件
etc/frontend/
- 在
Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver
文件中的sales_quote_collect_totals_after
etc/webapi_rest
- 在
Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver
文件中的sales_quote_collect_totals_after
etc/webapi_soap
- 在
Magento\Msrp\Observer\Frontend\Quote\SetCanApplyMsrpObserver
文件中的sales_quote_collect_totals_after
有关 Magento 2 中事件的信息,请参阅 事件和观察者.
布局
该模块与以下布局处理程序交互
view/base/layout
目录
catalog_product_prices
cms_index_index
view/frontend/layout
目录
catalog_category_view
catalog_product_compare_index
catalog_product_view
catalogsearch_advanced_result
catalogsearch_result_index
checkout_cart_sidebar_total_renderers
checkout_onepage_failure
checkout_onepage_success
review_product_list
wishlist_index_configure_type_downloadable
wishlist_index_index
wishlist_search_view
wishlist_shared_index
此模块引入了以下布局和处理程序
view/frontend/layout
目录
msrp_popup
UI 组件
模块提供产品管理表单修改器
Magento\Msrp\Ui\DataProvider\Product\Form\Modifier\Msrp
- 如果禁用配置,则从表单中删除 msrp_display_actual_price_type
字段,否则添加 validate-zero-or-greater
验证到该字段。
更多信息
目录属性
当前模块扩展了etc/catalog_attributes.xml
并为quote_item
组提供了以下属性
建议零售价
msrp_display_actual_price_type
扩展属性
Magento_Msrp为Magento\Catalog\Api\Data\ProductRender\PriceInfoInterface
提供了扩展属性
- 属性代码:
msrp
- 属性类型:
Magento\Msrp\Api\Data\ProductRender\MsrpPriceInfoInterface