/** * @see ObjectModel::getFields() * @return array */ public function getFields() { if (!$this->shop_group_id) { $this->id_shop_group = Context::getContext()->shop->id_shop_group; } $fields = parent::getFields(); return $fields; }
/** * @see ObjectModel::getFields() * @return array */ public function getFields() { if (empty($this->stats_date_from) || $this->stats_date_from == '0000-00-00') { $this->stats_date_from = date('Y-m-d', strtotime("-1 month")); } if (empty($this->stats_compare_from) || $this->stats_compare_from == '0000-00-00') { $this->stats_compare_from = null; } if (empty($this->stats_date_to) || $this->stats_date_to == '0000-00-00') { $this->stats_date_to = date('Y-m-d'); } if (empty($this->stats_compare_to) || $this->stats_compare_to == '0000-00-00') { $this->stats_compare_to = null; } return parent::getFields(); }