webgriffe/discount-sticker-extension

安装: 34

依赖: 0

建议者: 0

安全: 0

星标: 3

关注者: 10

分支: 0

开放问题: 0

类型:magento-module

1.0.0 2017-11-16 15:50 UTC

This package is auto-updated.

Last update: 2024-09-07 21:18:32 UTC


README

为 Magento 添加一个可用的块来显示产品的折扣率。

使用方法

只需使用 modmancomposer 安装扩展。然后您可以在 .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® 开发