public function __construct() { $this->bootstrap = true; $this->module = new now_product_type(); $aDelimiter = array(); foreach (NowCSV::$aDelimiter as $value => $name) { $aDelimiter[] = array('value' => $value, 'name' => $name); } parent::__construct(); if (!$this->module->active) { $this->errors[] = sprintf($this->module->l('You must active this module : %s', 'AdminNowImportTipsAndIdeas'), $this->module->name); return; } $this->sUploadDirectory = $this->module->module_dir . 'uploads/'; $this->fields_options = array('import_ideas_or_tips' => array('title' => $this->module->l('Manage settings of import ideas or tips', 'AdminNowImportTipsAndIdeas'), 'fields' => array('NOW_IMPORT_ACCES_FILE' => array('title' => $this->module->l('Choose your file type', 'AdminNowImportTipsAndIdeas'), 'type' => 'select', 'identifier' => 'value', 'list' => array(array('value' => '.csv', 'name' => $this->module->l('CSV file (.csv)', 'AdminNowImportTipsAndIdeas')), array('value' => '.txt', 'name' => $this->module->l('TEXT file (.txt)', 'AdminNowImportTipsAndIdeas'))), 'visibility' => Shop::CONTEXT_ALL), 'NOW_IMPORT_ACCES_SEPARATOR' => array('title' => $this->module->l('Choose your separator', 'AdminNowImportTipsAndIdeas'), 'type' => 'select', 'identifier' => 'value', 'list' => array(array('value' => ';', 'name' => ';'), array('value' => ',', 'name' => ','), array('value' => '|', 'name' => '|'), array('value' => '^', 'name' => '^')), 'visibility' => Shop::CONTEXT_ALL), 'NOW_IMPORT_ACCES_DELIMITER' => array('title' => $this->module->l('Choose your text delimiter', 'AdminNowImportTipsAndIdeas'), 'type' => 'select', 'identifier' => 'value', 'list' => $aDelimiter, 'visibility' => Shop::CONTEXT_ALL), 'NOW_IMPORT_ACCES_PAGINATION' => array('title' => $this->module->l('Pagination', 'AdminNowImportTipsAndIdeas'), 'type' => 'select', 'identifier' => 'value', 'list' => array(array('value' => '10', 'name' => '10'), array('value' => '25', 'name' => '25'), array('value' => '50', 'name' => '50'), array('value' => '100', 'name' => '100')), 'visibility' => Shop::CONTEXT_ALL)), 'submit' => array('title' => $this->l('Save'), 'class' => $this->l('Save')))); $this->setCurrentStep(); if ($this->iStep > 1) { $sTypeFile = Configuration::get('NOW_IMPORT_ACCES_FILE'); $sSeparator = Configuration::get('NOW_IMPORT_ACCES_SEPARATOR'); $sDelimiter = Configuration::get('NOW_IMPORT_ACCES_DELIMITER') == 1 ? '\'' : '"'; $sDecimalDelimiter = Configuration::get('NOW_IMPORT_ACCES_DECIMAL'); $bConvertFileToUTF8 = Configuration::get('NOW_IMPORT_ACCES_CONVERT_UTF8'); $this->oCSV = new NowCSV($this->aFile, $sTypeFile, $sSeparator, $sDelimiter, $sDecimalDelimiter, $bConvertFileToUTF8); } }
public function __construct() { $this->bootstrap = true; $this->display = 'view'; $this->addRowAction('view'); parent::__construct(); }
public function __construct() { $this->bootstrap = true; $this->list_id = 'id_egms_cu'; $this->identifier = 'id_egms_cu'; $this->table = 'egms_city_url'; $this->className = 'egms_shop'; $this->meta_title = $this->l('Citys by Shops'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_list = array('id_egms_cu' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'name' => array('title' => $this->l('Shopname'), 'filter_key' => 's!name'), 'cityname1' => array('title' => $this->l('Cityname'), 'filter_key' => 'c!cityname1'), 'domain' => array('title' => $this->l('domain'), 'filter_key' => 'su!domain'), 'activeurl' => array('title' => $this->l('Displayed url'), 'filter_key' => 'su!activeurl', 'align' => 'center', 'active' => 'status', 'class' => 'fixed-width-sm', 'type' => 'bool'), 'phone' => array('title' => $this->l('Phone'), 'filter_key' => 'a!phone'), 'manufacturer' => array('title' => $this->l('manufact'), 'orderby' => false), 'active' => array('title' => $this->l('Displayed shop'), 'filter_key' => 'a!active', 'align' => 'center', 'active' => 'status', 'class' => 'fixed-width-sm', 'type' => 'bool')); $this->_select .= 'a.id_egms_cu, s.name, c.cityname1, a.phone, su.domain, a.active, su.active activeurl, (select count(d.id_egms_delivery) from ' . _DB_PREFIX_ . 'egms_delivery d where d.id_egms_cu = a.id_egms_cu and deleted=0 and active=1) manufacturer'; $this->_join .= ' INNER JOIN ' . _DB_PREFIX_ . 'shop_url su ON a.id_shop_url = su.id_shop_url '; $this->_join .= ' INNER JOIN ' . _DB_PREFIX_ . 'egms_city c ON a.id_city = c.id_egms_city'; $this->_join .= ' INNER JOIN ' . _DB_PREFIX_ . 'shop s ON su.id_shop = s.id_shop '; //$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'egms_city_manuf cm ON cm.id_egms_city = a.id_egms_cu '; //$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'egms_delivery d ON d.id_egms_cu = a.id_egms_cu '; //if (Shop::getContext() == Shop::CONTEXT_SHOP) // $this->_where .= ' and s.id_shop in ('.(int)Context::getContext()->shop->id.')'; //$sss = Shop::getContextListShopID(); //$this->_where .= ' and su.id_shop IN ('.implode(', ', $sss).')'; $this->_group = ' GROUP BY (id_egms_cu) '; $this->_orderBy = 'c.cityname1'; $this->_theme_dir = Context::getContext()->shop->getTheme(); $this->id_egms_cu = Tools::getValue('id_egms_cu'); //$s = Shop::getContextListShopID(); $this->getAllManufacturers(); $this->getCitys(); $this->getUrls(); parent::__construct(); }
public function __construct() { $url = 'index.php?controller=adminmodules&configure=leotempcp&tab_module=Home&module_name=leotempcp&token=' . Tools::getAdminTokenLite('AdminModules'); Tools::redirectAdmin($url); $this->bootstrap = true; $this->className = 'Configuration'; $this->table = 'configuration'; $this->themeName = Context::getContext()->shop->getTheme(); parent::__construct(); }
public function __construct() { $this->bootstrap = true; $this->table = 'now_product_type'; $this->className = 'NowProductType'; $this->module = new now_product_type(); $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->fields_list = array('id_now_product_type' => array('title' => $this->module->l('ID', 'AdminNowProductType'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'name' => array('title' => $this->module->l('Name', 'AdminNowProductType'), 'width' => 'auto'), 'button_name' => array('title' => $this->module->l('Button name', 'AdminNowProductType'), 'width' => 'auto'), 'active' => array('title' => $this->module->l('Enabled', 'AdminNowProductType'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm')); parent::__construct(); }
public function __construct() { $this->widget = new LeoTempcpWidget(); $this->className = 'LeoTempcpWidget'; $this->bootstrap = true; $this->table = 'leowidgets'; $this->fields_list = array('id_leowidgets' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 50, 'class' => 'fixed-width-xs'), 'key_widget' => array('title' => $this->l('Widget Key'), 'filter_key' => 'a!key_widget', 'type' => 'text', 'width' => 140), 'name' => array('title' => $this->l('Widget Name'), 'width' => 140, 'type' => 'text', 'filter_key' => 'a!name'), 'type' => array('title' => $this->l('Widget Type'), 'width' => 50, 'type' => 'text', 'filter_key' => 'a!type')); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash'), 'correctlink' => array('text' => $this->l('Correct Image Link'), 'confirm' => $this->l('Are you sure you want to change image url from old theme to new theme?'), 'icon' => 'icon-edit'), 'insertLang' => array('text' => $this->l('Auto Input Data for New Lang'), 'confirm' => $this->l('Auto insert data for new language?'), 'icon' => 'icon-edit'), 'correctContent' => array('text' => $this->l('Correct Content use basecode64(Just for developer)'), 'confirm' => $this->l('Are you sure?'), 'icon' => 'icon-edit')); parent::__construct(); $this->_where = ' AND id_shop=' . (int) $this->context->shop->id; $this->_theme_dir = Context::getContext()->shop->getTheme(); }
public function __construct() { $this->table = 'leohook'; $this->className = 'LeotempcpPanel'; $this->lang = true; $this->context = Context::getContext(); parent::__construct(); $this->display_key = (int) Tools::getValue('show_modules'); $this->ownPositions = array('displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayPromoteTop', 'displayBottom'); $this->hookspos = array('displayTop', 'displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayPromoteTop', 'displayRightColumn', 'displayLeftColumn', 'displayHome', 'displayFooter', 'displayBottom', 'displayContentBottom', 'displayFootNav'); $this->theme_name = Context::getContext()->shop->getTheme(); }
/** * @throws PrestaShopException */ public function __construct() { $this->bootstrap = true; $this->table = 'now_holidays'; $this->className = 'NowHolidays'; $this->module = new now_delivery_time(); $this->addRowAction('edit'); $this->addRowAction('delete'); $this->fields_list = array('id_now_holidays' => array('title' => $this->module->l('ID', 'AdminNowHolidays'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'type_name' => array('title' => $this->module->l('Type', 'AdminNowHolidays'), 'width' => 'auto'), 'evenment_name' => array('title' => $this->module->l('Evenment name', 'AdminNowHolidays'), 'width' => 'auto'), 'date_start' => array('title' => $this->module->l('Start date', 'AdminNowHolidays'), 'width' => 'auto', 'type' => 'date'), 'date_end' => array('title' => $this->module->l('End date', 'AdminNowHolidays'), 'width' => 'auto', 'type' => 'date'), 'preparation' => array('title' => $this->module->l('Preparation', 'AdminNowHolidays'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'shipping' => array('title' => $this->module->l('Shipping', 'AdminNowHolidays'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'delivery' => array('title' => $this->module->l('Delivery', 'AdminNowHolidays'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'date_upd' => array('title' => $this->module->l('Updated Date', 'AdminNowHolidays'), 'width' => 'auto', 'type' => 'datetime')); $this->_select .= ' IF(a.`type` = "public_holidays", "' . $this->module->l('Public holidays', 'AdminNowHolidays') . '", "' . $this->module->l('Holidays', 'AdminNowHolidays') . '") as type_name '; parent::__construct(); }
/** * Constructor */ public function __construct() { $this->bootstrap = true; $this->table = 'leohook'; $this->className = 'LeotempcpPanel'; $this->lang = true; $this->context = Context::getContext(); parent::__construct(); $this->display_key = (int) Tools::getValue('show_modules'); $this->ownPositions = array('displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayPromoteTop', 'displayBottom', 'displayMassBottom'); $this->hookspos = LeoFrameworkHelper::getHookPositions(); $this->theme_name = Context::getContext()->shop->getTheme(); }
public function __construct() { parent::__construct(); $this->bootstrap = true; $this->table = 'egms_city'; $this->list_id = $this->position_identifier; $this->identifier = $this->position_identifier; $this->className = 'city'; $this->meta_title = $this->l('Citys'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_list = array('id_' . $this->table => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'id_egms_city' => array('title' => $this->l('id'), 'filter_key' => 'id_egms_city'), 'cityname1' => array('title' => $this->l('Cityname'), 'filter_key' => 'cityname1'), 'cityname2' => array('title' => $this->l('Cityname'), 'filter_key' => 'cityname2'), 'cityname3' => array('title' => $this->l('Cityname'), 'filter_key' => 'cityname3'), 'alias' => array('title' => $this->l('alias'), 'filter_key' => 'a!alias')); $this->_orderBy = 'a.cityname1'; $this->_theme_dir = Context::getContext()->shop->getTheme(); }
/** * Constructor */ public function __construct() { $this->table = 'leohook'; $this->className = 'LeotempcpPanel'; $this->bootstrap = true; $this->lang = true; $this->context = Context::getContext(); parent::__construct(); $this->display_key = (int) Tools::getValue('show_modules'); $this->ownPositions = array('displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayBottom'); $this->hookspos = array('displayTop', 'displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayTopColumn', 'displayRightColumn', 'displayLeftColumn', 'displayHome', 'displayFooter', 'displayBottom', 'displayContentBottom', 'displayFootNav'); $this->themeName = Context::getContext()->shop->getTheme(); $this->themeCustomizePath = _PS_ALL_THEMES_DIR_ . $this->themeName . '/css/customize/'; $this->themeCustomizeURL = $this->context->shop->getBaseURL() . '/themes/' . $this->themeName . '/css/customize/'; }
/** * @throws PrestaShopException */ public function __construct() { $this->bootstrap = true; $this->table = 'now_delivery_time'; $this->className = 'NowDeliveryTime'; $this->module = new now_delivery_time(); $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->fields_list = array('id_now_delivery_time' => array('title' => $this->module->l('ID', 'AdminNowDeliveryTime'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'carrier' => array('title' => $this->module->l('Carrier', 'AdminNowDeliveryTime'), 'width' => 'auto'), 'day_min' => array('title' => $this->module->l('Minimum day', 'AdminNowDeliveryTime'), 'width' => 'auto'), 'day_max' => array('title' => $this->module->l('Maximum day', 'AdminNowDeliveryTime'), 'width' => 'auto'), 'saturday_shipping' => array('title' => $this->module->l('Saturday shipping', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'sunday_shipping' => array('title' => $this->module->l('Sunday shipping', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'shipping_holidays' => array('title' => $this->module->l('Shipping holidays', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'saturday_delivery' => array('title' => $this->module->l('Saturday delivery', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'sunday_delivery' => array('title' => $this->module->l('Sunday delivery', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'delivery_holidays' => array('title' => $this->module->l('Delivery holidays', 'AdminNowDeliveryTime'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'date_upd' => array('title' => $this->module->l('Updated Date', 'AdminNowDeliveryTime'), 'width' => 'auto', 'type' => 'datetime')); $this->_select .= ' c.`name` as carrier '; $this->_join .= ' LEFT JOIN `' . _DB_PREFIX_ . 'carrier` c ON (c.`id_carrier` = a.`id_carrier`)'; $this->fields_options = array('general' => array('title' => $this->module->l('Settings', 'AdminNowDeliveryTime'), 'fields' => array('NOW_DT_DATE_FORMAT' => array('title' => $this->module->l('Date format', 'AdminNowDeliveryTime'), 'hint' => $this->module->l('It\\s the date format on your product page.', 'AdminNowDeliveryTime'), 'validation' => 'isGenericName', 'type' => 'text'), 'NOW_DT_HOUR_START_PREP' => array('title' => $this->module->l('Hour of start of the orders preparations', 'AdminNowDeliveryTime'), 'hint' => $this->module->l('Between 0 and 24 Hours', 'AdminNowDeliveryTime'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'suffix' => $this->module->l('Hours', 'AdminNowDeliveryTime')), 'NOW_DT_HOUR_END_PREP' => array('title' => $this->module->l('Hour of end of the orders preparations', 'AdminNowDeliveryTime'), 'hint' => $this->module->l('Between 0 and 24 Hours', 'AdminNowDeliveryTime'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'suffix' => $this->module->l('Hours', 'AdminNowDeliveryTime'))), 'submit' => array('title' => $this->module->l('Save', 'AdminNowDeliveryTime')))); parent::__construct(); }
public function __construct() { $this->bootstrap = true; $this->table = 'leoblog_comment'; // $this->list_id = 'id_comment'; // must be set same value $this->table to delete multi rows $this->identifier = 'id_comment'; $this->className = 'LeoBlogComment'; $this->lang = false; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_list = array('id_comment' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'id_leoblog_blog' => array('title' => $this->l('Blog ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'user' => array('title' => $this->l('User')), 'comment' => array('title' => $this->l('Comment'), 'filter_key' => 'b!Comment'), 'date_add' => array('title' => $this->l('Date Added'), 'filter_key' => 'b!data_add'), 'active' => array('title' => $this->l('Displayed'), 'align' => 'center', 'active' => 'status', 'class' => 'fixed-width-sm', 'type' => 'bool', 'orderby' => false)); if (Tools::getValue('id_leoblog_blog')) { # validate module $this->_where = ' AND id_leoblog_blog=' . (int) Tools::getValue('id_leoblog_blog'); } parent::__construct(); }
public function __construct() { parent::__construct(); $this->bootstrap = true; $this->table = 'leoblog_blog'; //$this->list_id = 'id_leoblog_blog'; // must be set same value $this->table to delete multi rows $this->identifier = 'id_leoblog_blog'; $this->className = 'LeoBlogBlog'; $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_list = array('id_leoblog_blog' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'meta_title' => array('title' => $this->l('Blog Title'), 'filter_key' => 'b!meta_title'), 'title' => array('title' => $this->l('Category Title'), 'filter_key' => 'cl!title'), 'active' => array('title' => $this->l('Displayed'), 'align' => 'center', 'active' => 'status', 'class' => 'fixed-width-sm', 'type' => 'bool', 'orderby' => false)); $this->_select .= ' cl.title '; $this->_join .= ' LEFT JOIN ' . _DB_PREFIX_ . 'leoblogcat c ON a.id_leoblogcat = c.id_leoblogcat LEFT JOIN ' . _DB_PREFIX_ . 'leoblogcat_lang cl ON cl.id_leoblogcat=c.id_leoblogcat AND cl.id_lang=b.id_lang '; if (Shop::getContext() == Shop::CONTEXT_SHOP) { $this->_join .= ' INNER JOIN `' . _DB_PREFIX_ . 'leoblog_blog_shop` sh ON (sh.`id_leoblog_blog` = b.`id_leoblog_blog` AND sh.id_shop = ' . (int) Context::getContext()->shop->id . ') '; } $this->_where = ''; $this->_group = ' GROUP BY (a.id_leoblog_blog) '; $this->_orderBy = 'a.position'; }