SilverCommerce\Discounts\Forms\DiscountCodeForm
A simple form to add a discount to an estimate via the code.
Synopsis
class DiscountCodeForm
extends Form
{
- // members
- protected Int $estimate_id;
- // methods
- public void __construct()
- public Estimate getEstimate()
- public void doAddDiscount()
Hierarchy
Extends
- SilverStripe\Forms\Form
Members
protected
- $estimate_id
—
SilverCommerce\Discounts\Forms\Int
ID of the estimate the discount will be applied to.
Methods
public
- __construct()
- doAddDiscount() — Action that will find a discount based on the code
- getEstimate() — retrieve the estimate via the id.