scotch / module-product-labels
Redbox 产品标签
dev-master
2022-02-22 04:01 UTC
Requires
- php: >=5.5.0
- magento/framework: *
This package is not auto-updated.
Last update: 2024-10-02 14:41:06 UTC
README
这个README通常会记录启动应用程序所需的所有步骤。
composer.json
#!php
"redbox/module-product-labels": "0.7.1"
如何在模板中使用
1) 创建助手实例
#!php
<?php
/**
* @var $_helperLabel \Redbox\ProductLabels\Helper\Label
*/
$_helperLabel = $this->helper('Redbox\ProductLabels\Helper\Label');
?>
2) 渲染产品标签
#!php
<?= $_helperLabel->renderLabel($_product); ?>
标签HTML
- '新品'标签: 新品
- '促销'标签: 新品
- '自定义'文本标签: 自定义文本
- '自定义'图像标签: