Adds a ready-to-use block to show discount rate of products in Magento.
Simply install the exentions with
composer. Then you can add the discount sticker block by adding these lines in your
<?php echo $this ->getLayout() ->createBlock(Webgriffe_DiscountSticker_Block_DiscountSticker::BLOCK_ALIAS) ->setProduct($_product) ->toHtml(); ?>
$_product is a
Mage_Catalog_Model_Product instance of the product on which you want to display the discount.
If you want you can override default discount sticker template by overriding
catalog/product/list/discount_sticker.phtml in your theme.
- Fork this repo
git submodule init && git submodule updateto get continuous integration tool
cp ci/ci.sh.sample ci.shand enter your settings
sh ci.shto get full working Magento environment
- Do your change by adding related automated test on a dedicated branch
- Submit a pull request
Developed by Webgriffe®