/** * @param bool $autodate * @param bool $null_values * @return bool * @throws PrestaShopException */ public function add($autodate = true, $null_values = false) { if ($this->position <= 0) { $this->position = NowCategorySlide::getHigherPosition() + 1; } if (!parent::add($autodate, $null_values) || !Validate::isLoadedObject($this)) { return false; } return true; }