webgriffe / discount-sticker-extension
1.0.0
2017-11-16 15:50 UTC
Requires
Requires (Dev)
- ecomdev/ecomdev_phpunit: dev-dev
This package is auto-updated.
Last update: 2024-09-07 21:18:32 UTC
README
为 Magento 添加一个可用的块来显示产品的折扣率。
使用方法
只需使用 modman 或 composer 安装扩展。然后您可以在 .phtml 文件中添加以下行来添加折扣标签块
<?php
echo $this
->getLayout()
->createBlock(Webgriffe_DiscountSticker_Block_DiscountSticker::BLOCK_ALIAS)
->setProduct($_product)
->toHtml();
?>
其中 $_product 是您想要显示折扣的产品实例的 Mage_Catalog_Model_Product。
如果您想覆盖默认的折扣标签模板,可以在您的主题中覆盖 catalog/product/list/discount_sticker.phtml。
贡献
- 将此存储库分支
- 使用
git submodule init && git submodule update获取持续集成工具 - 将
cp ci/ci.sh.sample ci.sh并输入您的设置 - 运行
sh ci.sh以获取完整的 Magento 环境 - 通过在专用分支上添加相关的自动化测试来进行您的更改
- 提交一个 pull request
鸣谢
由 Webgriffe® 开发