public function add() { $this->reference = self::generateReference(); if (parent::add()) { $cart = new Cart($this->id_cart); $cart->status = Cart::IS_ORDER; return $cart->update(); } return false; }
public function add($nullValues = false) { $this->position = $this->getLastPosition(); if (!isset($this->level_depth) or !$this->level_depth) { $this->level_depth = $this->calcLevelDepth(); } $ret = parent::add($nullValues); if (!isset($this->doNotRegenerateNTree) or !$this->doNotRegenerateNTree) { self::regenerateEntireNtree(); } return $ret; }
public function add() { $this->position = $this->getLastPosition(); return parent::add(); }