\CouponModifierField
Form field that represents {@link CouponRate}s in the Checkout form.
Synopsis
class CouponModifierField
extends ModificationField_Hidden
{
- // members
- protected Money $amount;
- // methods
- public String FieldHolder()
- public void updateValue()
- public void validate()
- public void setAmount()
- public String Description()
- public Boolean modifiesSubTotal()
Hierarchy
Extends
- ModificationField_Hidden
Members
protected
- $amount
—
Money
The amount this field represents e.g: 15% * order subtotal
Methods
public
- Description() — Return the amount for this tax rate for displaying in the {@link CheckoutForm}
- FieldHolder() — Render field with the appropriate template.
- modifiesSubTotal() — Shipping field modifies {@link Order} sub total by default.
- setAmount() — Set the amount that this field represents.
- updateValue() — Update value of the field according to any matching {@link Modification}s in the {@link Order}. Useful when the source options have changed, if a matching option cannot be found in a Modification then the first option is set at the value (selected).
- validate() — Ensure that the value is the ID of a valid {@link FlatFeeShippingRate} and that the FlatFeeShippingRate it represents is valid for the Shipping country being set in the {@link Order}.