SilverCommerce\Discounts\DiscountFactory
Simple factroy to handle getting discounts (either by code or valid)
Synopsis
class DiscountFactory
{
- // methods
- public void getByIdent()
- public static SSList getValid()
- public void generateAppliedDiscount()
- public static array getValidArray()
Hierarchy
Uses
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Config\Configurable
Methods
public
- generateAppliedDiscount()
- getByIdent() — Find a discount by the prodvided code.
- getValid() — Get a list of discounts that are valid (not expired and have passed their start date).
- getValidArray() — Get a list of valid discounts as an array