public function onBeforeWrite() { parent::onBeforeWrite(); if ($this->OrderID && $this->Order() && $this->Order()->isCart()) { $this->calculatetotal(); } }
function onBeforeWrite() { parent::onBeforeWrite(); $this->ProductID = $this->_productID; $this->ProductVersion = $this->_productVersion; }