@@ -209,6 +209,9 @@ class Order extends ActiveRecordCommon | |||
*/ | |||
public function initAmount() | |||
{ | |||
$this->amount = 0 ; | |||
$this->weight = 0 ; | |||
if (isset($this->productOrder)) { | |||
foreach ($this->productOrder as $productOrder) { | |||
$this->amount += $productOrder->price * $productOrder->quantity; |