dmatthew / magento2-attribute-description
为您的产品属性添加描述。
0.2.5
2022-05-18 17:14 UTC
Requires
- php: ^7.1||^8.0
- magento/module-catalog: 102.0.*|103.0.*|104.0.*
- magento/module-eav: 101.0.*|102.0.*|102.1.*
- magento/module-store: 100.2.*|101.0.*|101.1.*
README
这是一个Magento 2模块,它增加了为产品属性添加描述的功能。为可配置属性添加描述并在产品查看页面上显示它们。使用属性描述帮助解释复杂的属性给您的客户。如果您有需要额外解释的属性(除了属性名称之外),则此模块适用于您。属性描述存储在新的eav_attribute_description
表中。
通过管理后台管理属性描述
开发者使用
通用使用
/** @var $attribute Dmatthew\AttributeDescription\Model\Entity\Attribute **/ $description = $attribute->getStoreDescription($storeId);
前端使用
属性描述已被添加到可配置产品类型的JSON配置中。这意味着开发者可以在任何使用\Magento\ConfigurableProduct\Block\Product\View\Type::getJsonConfig()
函数的JS代码中使用产品属性描述。