ambimax / magento-module-ambimax-ribbon
此软件包最新版本(dev-master)没有可用的许可信息。
此模块添加了禁用重复媒体相册删除的功能。
dev-master
2016-07-25 17:14 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-14 19:36:45 UTC
README
此模块旨在为Magento电子商务添加ribbons属性。
安装
使用composer安装或手动复制文件。
composer
"require": {
"ambimax/magento-module-ambimax-ribbon": "~1.0"
}
主题
要将ribbons添加到您的主题中,请将以下代码片段添加到所有必需的主题文件中。
<div class="ambimax-ribbon"> <?php foreach($_product->getAttributeText('ribbon') as $ribbon): ?> <span class="<?php echo strtolower($ribbon) ?>"> <?php echo $this->__($ribbon) ?> </span> <?php endforeach ?> </div>
添加Ribbons
- 要添加ribbons,只需扩展ribbons属性选项(
目录 > 管理属性 > Ribbons属性 > 管理选项
) - 使用CSS进行样式设置
- 添加翻译
自定义Ribbons
要添加自定义ribbons,您可以非常容易地扩展它
<div class="ambimax-ribbon"> <?php foreach($_product->getAttributeText('ribbon') as $ribbon): ?> <span class="<?php echo strtolower($ribbon) ?>"> <?php echo $this->__($ribbon) ?> </span> <?php endforeach ?> <?php if($_product->getData('custom_ribbon')): ?> <span class="custom-ribbon"> <?php echo $this->__('Custom Ribbon') ?> </span> <?php endif; ?> </div>
使用图像Ribbons
在html中放置图像是可能的。但您应该始终尝试使用CSS来解决这个问题!