public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) { parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); $nb_items = count($this->_list); $this->tpl_list_vars['nb_items'] = $nb_items; if ($nb_items > 0) { for ($i = 0; $i < $nb_items; ++$i) { $item =& $this->_list[$i]; $item['token'] = Tools::getAdminTokenLite($item['controller']); } } $currentLanguage = Language::getIsoById((int) $this->context->language->id); $urlEShop = URL_ESHOP_EN; $urlTechnicalSupport = URL_TECHNICAL_SUPPORT_EN; if ($currentLanguage == 'fr') { $urlEShop = URL_ESHOP_FR; $urlTechnicalSupport = URL_TECHNICAL_SUPPORT_FR; } elseif ($currentLanguage == 'es') { $urlTechnicalSupport = URL_TECHNICAL_SUPPORT_ES; } elseif ($currentLanguage == 'it') { $urlTechnicalSupport = URL_TECHNICAL_SUPPORT_IT; } $this->context->smarty->assign(array('token' => Tools::getValue('token'), 'urlEShop' => $urlEShop, 'urlTechnicalSupport' => $urlTechnicalSupport, 'licenceActive' => date('Y-m-d') > Configuration::get('ERP_WS_DATE_END') ? false : true)); // Configuration CSS/JS if (version_compare(_PS_VERSION_, '1.6') == -1) { $this->context->controller->addCSS(_MODULE_DIR_ . '/erpillicopresta/css/bs3.css'); } $this->context->controller->addCSS(_MODULE_DIR_ . '/erpillicopresta/css/adminerp.css'); $this->context->controller->addJS(_MODULE_DIR_ . '/erpillicopresta/js/tools.js'); }
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) { $order_by = 'position'; parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); if (isset($_GET['id_opartslideshow_slideshow']) && is_numeric($_GET['id_opartslideshow_slideshow'])) { if ($this->_list && is_array($this->_list)) { foreach ($this->_list as $key => $list) { if ($list['id_opartslideshow_slideshow'] == $_GET['id_opartslideshow_slideshow']) { $result[] = $list; } } } $this->_list = $result; } }
/** * Fetches the object list to be displayed by renderList * This overrides formats ID fields to be more user friendly. * * @param int $id_lang * @param string|null $order_by * @param string|null $order_way * @param int $start * @param int|null $limit * @param int|bool $id_lang_shop * @throws PrestaShopException */ public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false) { parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); foreach ($this->_list as &$menuItem) { $type = $menuItem['type']; // Rewrite item type "2" as "[2] Product Link" $menuItem['type'] = '[' . $type . '] ' . $this->menuItemTypes[$type]['name']; // Rewrite entity ID "2" as "[2] Product" if (!empty($this->menuItemTypes[$type]['entity_name'])) { $menuItem['entity_id'] = '[' . $menuItem['entity_id'] . '] ' . $this->menuItemTypes[$type]['entity_name']; } } }
public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null) { parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, 0); $currency = $this->context->currency; if (!empty($this->_list)) { $nb = count($this->_list); for ($i = 0; $i < $nb; $i++) { $this->_list[$i]['available'] = 'Dal ' . Tools::displayDate($this->_list[$i]['available_from_date'], (int) Context::getContext()->language->id, false) . ' al ' . Tools::displayDate($this->_list[$i]['available_to_date'], (int) Context::getContext()->language->id, false); $this->_list[$i]['visible'] = 'Dal ' . Tools::displayDate($this->_list[$i]['visible_from_date'], (int) Context::getContext()->language->id, false) . ' al ' . Tools::displayDate($this->_list[$i]['visible_to_date'], (int) Context::getContext()->language->id, false); } } }
public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null) { parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, 0); if (!empty($this->_list)) { $nb = count($this->_list); for ($i = 0; $i < $nb; $i++) { // if (!empty($this->_list[$i]['day_0'])){ // $this->_list[$i]['day_0'] = 'Da '.substr($this->_list[$i]['day_0_1_o'], 0, 5).' a '.substr($this->_list[$i]['day_0_1_c'], 0, 5); // if ($this->_list[$i]['day_0_2_o']!='00:00:00' && $this->_list[$i]['day_0_2_c']!='00:00:00') // $this->_list[$i]['day_0'] .= '<br/>Da '.substr($this->_list[$i]['day_0_2_o'], 0, 5).' a '.substr($this->_list[$i]['day_0_2_c'], 0, 5); // } // if (!empty($this->_list[$i]['day_1'])){ // $this->_list[$i]['day_1'] = 'Da '.substr($this->_list[$i]['day_1_1_o'], 0, 5).' a '.substr($this->_list[$i]['day_1_1_c'], 0, 5); // if ($this->_list[$i]['day_1_2_o']!='00:00:00' && $this->_list[$i]['day_1_2_c']!='00:00:00') // $this->_list[$i]['day_1'] .= '<br/>Da '.substr($this->_list[$i]['day_1_2_o'], 0, 5).' a '.substr($this->_list[$i]['day_1_2_c'], 0, 5); // } $this->_list[$i]['available'] = 'Dal ' . Tools::displayDate($this->_list[$i]['available_from_date'], (int) Context::getContext()->language->id, false) . ' al ' . Tools::displayDate($this->_list[$i]['available_to_date'], (int) Context::getContext()->language->id, false); } } }
/** * AdminController::getList() override * @see AdminController::getList() */ public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = false, $id_lang_shop = false) { if ($this->table == 'feature_value') { $this->_where .= ' AND (a.custom = 0 OR a.custom IS NULL)'; } parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); if ($this->table == 'feature') { $nb_items = count($this->_list); for ($i = 0; $i < $nb_items; ++$i) { $item =& $this->_list[$i]; $query = new DbQuery(); $query->select('COUNT(fv.id_feature_value) as count_values'); $query->from('feature_value', 'fv'); $query->where('fv.id_feature =' . (int) $item['id_feature']); $query->where('(fv.custom=0 OR fv.custom IS NULL)'); $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); $item['value'] = (int) $res; unset($query); } } }
public function getList($id_lang, $orderBy = null, $orderWay = null, $start = 0, $limit = null, $id_lang_shop = null) { parent::getList($id_lang, $orderBy, $orderWay, $start, $limit, 0); $currency = $this->context->currency; $services_duration = json_decode(Configuration::get('APH_SERVICES_DURATION'), true); if (!empty($this->_list)) { $nb = count($this->_list); for ($i = 0; $i < $nb; $i++) { $this->_list[$i]['min_price_wt'] = Tools::displayPrice($this->_list[$i]['min_price_wt'], (int) $currency->id); $this->_list[$i]['max_price_wt'] = Tools::displayPrice($this->_list[$i]['max_price_wt'], (int) $currency->id); if ((int) $this->_list[$i]['id_service_duration'] > 0) { $this->_list[$i]['id_feature_value'] = $services_duration[$this->_list[$i]['id_service_duration']] . ' minuti'; } else { $this->_list[$i]['id_feature_value'] = $services_duration[$this->_list[$i]['id_feature_value']] . ' minuti'; } } } }