\EcommerceCustomDeliveryModifier
as a starting point for writing their own modifiers.
- Author: Nicolaas [at] sunnysideup.co.nz
Synopsis
class EcommerceCustomDeliveryModifier
extends OrderModifier
{
- // members
- public static array $db = ;
- public static string $singular_name = "Delivery Charge";
- public static string $plural_name = "Delivery Charges";
- // methods
- public void getCMSFields()
- public void i18n_singular_name()
- public void i18n_plural_name()
- public void runUpdate()
- public void ShowForm()
- public Boolean ShowFormInEditableOrderTable()
- public Boolean ShowFormOutsideEditableOrderTable()
- public Boolean ShowInTable()
- public Boolean CanBeRemoved()
- protected void LiveName()
- protected void LiveCalculatedTotal()
- public void onBeforeWrite()
- public void LiveNonSpecialProductCount()
- public void LiveSpecialProductCount()
- protected int ProductCountForTotal()
- public String LivePostalCode()
- private void SelectedProductsArray()
- private EcommerceCustomDeliveryPostalCode MyPostalCodeObject()
Hierarchy
Extends
- OrderModifier
Members
public
-
$db
add extra fields as you need them. - $plural_name
- $singular_name
Methods
private
protected
- LiveCalculatedTotal()
- LiveName() — if we want to change the default value for the Name field (defined in the OrderModifer class) then we can do this as shown in the method below.
- ProductCountForTotal()
public
- CanBeRemoved() — standard OrderModifer Method Tells us if the modifier can be removed (hidden / turned off) from the order.
- LiveNonSpecialProductCount()
- LivePostalCode()
- LiveSpecialProductCount()
- ShowForm() — standard OrderModifier Method Should we show a form in the checkout page for this modifier?
- ShowFormInEditableOrderTable() — Should the form be included in the editable form on the checkout page?
- ShowFormOutsideEditableOrderTable() — Should the form be included in the editable form on the checkout page?
- ShowInTable() — standard OrderModifer Method Tells us if the modifier should take up a row in the table on the checkout page.
- getCMSFields() — standard SS method
- i18n_plural_name()
- i18n_singular_name()
- onBeforeWrite()
- runUpdate() — For all modifers with their own database fields, we need to include this...