https://github.com/webgriffe/discount-sticker-extension
Magento Discount Sticker Extension
https://github.com/webgriffe/discount-sticker-extension
Last synced: over 1 year ago
JSON representation
Magento Discount Sticker Extension
- Host: GitHub
- URL: https://github.com/webgriffe/discount-sticker-extension
- Owner: webgriffe
- Created: 2014-07-29T19:24:35.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-04-03T08:48:26.000Z (about 8 years ago)
- Last Synced: 2025-01-29T10:35:43.264Z (over 1 year ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 3
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Magento Discount Sticker Extension
==================================
Adds a ready-to-use block to show discount rate of products in Magento.
Usage
-----
Simply install the exentions with `modman` or `composer`. Then you can add the discount sticker block by adding these lines in your `.phtml` files:
```
getLayout()
->createBlock(Webgriffe_DiscountSticker_Block_DiscountSticker::BLOCK_ALIAS)
->setProduct($_product)
->toHtml();
?>
```
Where `$_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.
Contributing
------------
* Fork this repo
* `git submodule init && git submodule update` to get continuous integration tool
* `cp ci/ci.sh.sample ci.sh` and enter your settings
* Run `sh ci.sh` to get full working Magento environment
* Do your change by adding related automated test on a dedicated branch
* Submit a pull request
Credits
-------
Developed by [Webgriffe®](http://www.webgriffe.com)