/** * When SimpleShippingModifier is written for the * first time, set the field to the return values * of the overloaded functions. */ public function onBeforeWrite() { parent::onBeforeWrite(); if (!$this->ID) { $this->setField('Country', $this->Country()); } }
/** * When TaxModifer is written for the first time, * set the field to the return values of the * overloaded functions. */ public function onBeforeWrite() { parent::onBeforeWrite(); if (!$this->ID) { $this->setField('Country', $this->Country()); $this->setField('Rate', $this->Rate()); $this->setField('Name', $this->Name()); $this->setField('TaxType', $this->TaxType()); } }
public function onBeforeWrite() { parent::onBeforeWrite(); }
/** * PRECONDITION: The order item is not saved in the database yet. */ public function onBeforeWrite() { parent::onBeforeWrite(); $this->Rate = $this->LiveRate(); $this->Name = $this->LiveName(); $this->TaxType = $this->LiveIsExclusive() ? 'Exclusive' : 'Inclusive'; }
function onBeforeWrite() { parent::onBeforeWrite(); $this->Country = $this->LiveCountry(); $this->ShippingChargeType = $this->LiveIsDefaultCharge() ? 'Default' : 'ForCountry'; }
function onBeforeWrite() { parent::onBeforeWrite(); if ($this->IsPickUp) { $this->CalculatedTotal = 0; $this->TableValue = 0; } if (!$this->IsValid) { $this->CalculatedTotal = self::get_error_value(); $this->TableValue = self::get_error_value(); } }