dmatthew/magento2-attribute-description

为您的产品属性添加描述。

0.2.5 2022-05-18 17:14 UTC

This package is auto-updated.

Last update: 2024-09-18 22:41:12 UTC


README

这是一个Magento 2模块,它增加了为产品属性添加描述的功能。为可配置属性添加描述并在产品查看页面上显示它们。使用属性描述帮助解释复杂的属性给您的客户。如果您有需要额外解释的属性(除了属性名称之外),则此模块适用于您。属性描述存储在新的eav_attribute_description表中。

通过管理后台管理属性描述

Screenshot

开发者使用

通用使用

/** @var $attribute Dmatthew\AttributeDescription\Model\Entity\Attribute **/
$description = $attribute->getStoreDescription($storeId);

前端使用

属性描述已被添加到可配置产品类型的JSON配置中。这意味着开发者可以在任何使用\Magento\ConfigurableProduct\Block\Product\View\Type::getJsonConfig()函数的JS代码中使用产品属性描述。

许可证

MIT