public function update($nullValues = false) { $this->level_depth = $this->calcLevelDepth(); return parent::update(); if (!isset($this->doNotRegenerateNTree) or !$this->doNotRegenerateNTree) { self::regenerateEntireNtree(); $this->recalculateLevelDepth($this->id_category); } }
public function update($nullValues = false) { if ($this->id_order_status == 2) { $products = $this->cart->getProducts(); foreach ($products as $row) { Product::updateOrders($row['id_product']); } } return parent::update(); }