public function __construct() { $this->table = array('order_state', 'order_return_state'); $this->adminOrdersStates = new adminOrdersStates(); $this->adminReturnStates = new adminReturnStates(); parent::__construct(); }
function __construct() { parent::__construct(); $this->_moduleCacheFile = _PS_ROOT_DIR_ . '/config/modules_list.xml'; //refresh modules_list.xml every week if (!$this->isFresh()) { $this->refresh(); } $this->listTabModules = array('administration' => $this->l('Administration'), 'advertising_marketing' => $this->l('Advertising & Marketing'), 'analytics_stats' => $this->l('Analytics & Stats'), 'billing_invoicing' => $this->l('Billing & Invoicing'), 'checkout' => $this->l('Checkout'), 'content_management' => $this->l('Content Management'), 'export' => $this->l('Export'), 'front_office_features' => $this->l('Front Office Features'), 'i18n_localization' => $this->l('I18n & Localization'), 'merchandizing' => $this->l('Merchandizing'), 'migration_tools' => $this->l('Migration Tools'), 'payments_gateways' => $this->l('Payments & Gateways'), 'payment_security' => $this->l('Payment Security'), 'pricing_promotion' => $this->l('Pricing & Promotion'), 'quick_bulk_update' => $this->l('Quick / Bulk update'), 'search_filter' => $this->l('Search & Filter'), 'seo' => $this->l('SEO'), 'shipping_logistics' => $this->l('Shipping & Logistics'), 'slideshows' => $this->l('Slideshows'), 'smart_shopping' => $this->l('Smart Shopping'), 'market_place' => $this->l('Market Place'), 'social_networks' => $this->l('Social Networks'), 'others' => $this->l('Other Modules')); $xmlModules = @simplexml_load_file($this->_moduleCacheFile); foreach ($xmlModules->children() as $xmlModule) { if ($xmlModule->attributes() == 'native') { foreach ($xmlModule->children() as $module) { foreach ($module->attributes() as $key => $value) { if ($key == 'name') { $this->listNativeModules[] = (string) $value; } } } } } if ($xmlModule->attributes() == 'partner') { foreach ($xmlModule->children() as $module) { foreach ($module->attributes() as $key => $value) { if ($key == 'name') { $this->listPartnerModules[] = (string) $value; } } } } }
public function __construct() { /* Get all modules then select only payment ones*/ $modules = Module::getModulesOnDisk(); foreach ($modules as $module) { if ($module->tab == 'Payment') { if ($module->id) { $module->country = array(); $countries = DB::getInstance()->ExecuteS('SELECT id_country FROM ' . _DB_PREFIX_ . 'module_country WHERE id_module = ' . intval($module->id)); foreach ($countries as $country) { $module->country[] = $country['id_country']; } $module->currency = array(); $currencies = DB::getInstance()->ExecuteS('SELECT id_currency FROM ' . _DB_PREFIX_ . 'module_currency WHERE id_module = ' . intval($module->id)); foreach ($currencies as $currency) { $module->currency[] = $currency['id_currency']; } $module->group = array(); $groups = DB::getInstance()->ExecuteS('SELECT id_group FROM ' . _DB_PREFIX_ . 'module_group WHERE id_module = ' . intval($module->id)); foreach ($groups as $group) { $module->group[] = $group['id_group']; } } else { $module->country = NULL; $module->currency = NULL; $module->group = NULL; } $this->paymentModules[] = $module; } } parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'category'; $this->className = 'Category'; $this->lang = true; $this->edit = true; $this->view = true; $this->delete = true; $this->fieldImageSettings = array('name' => 'image', 'dir' => 'c'); $this->fieldsDisplay = array('id_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), 'name' => array('title' => $this->l('Name'), 'width' => 100, 'callback' => 'hideCategoryPosition'), 'description' => array('title' => $this->l('Description'), 'width' => 480, 'maxlength' => 90, 'orderby' => false), 'physical_products_quantity' => array('title' => $this->l('In stock Products'), 'align' => 'center', 'width' => 50), 'active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'align' => 'center', 'type' => 'bool', 'orderby' => false)); $this->_category = AdminCatalog::getCurrentCategory(); $this->_filter = 'AND `id_parent` = ' . intval($this->_category->id); $children = Category::getChildren($this->_category->id, $cookie->id_lang); foreach ($children as &$child) { $tmp_list = $this->_category->id . ','; $obj = new Category($child['id_category']); $parents = $obj->getParentsCategories(); foreach ($parents as $parent) { $tmp_list .= $parent['id_category'] . ','; } $child['parent_id_list'] = rtrim($tmp_list, ','); } parent::__construct(); }
public function __construct() { MondialRelay::initModuleAccess(); $this->table = 'mr_selected'; $this->className = 'MondialRelayClass'; parent::__construct(); }
public function __construct() { global $currentIndex; $this->table = 'product'; $this->className = 'Product'; $this->lang = true; $this->edit = true; $this->delete = true; $this->view = false; $this->duplicate = true; $this->imageType = 'jpg'; $this->maxImageSize = Configuration::get('PS_LIMIT_UPLOAD_IMAGE_VALUE') * 1000000; $this->maxFileSize = Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1000000; $this->fieldsDisplay = array('id_product' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 20), 'image' => array('title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'width' => 45, 'orderby' => false, 'filter' => false, 'search' => false), 'name' => array('title' => $this->l('Name'), 'width' => 220, 'filter_key' => 'b!name'), 'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 20), 'price' => array('title' => $this->l('Base price'), 'width' => 70, 'price' => true, 'align' => 'right', 'filter_key' => 'a!price'), 'price_final' => array('title' => $this->l('Final price'), 'width' => 70, 'price' => true, 'align' => 'right', 'havingFilter' => true, 'orderby' => false), 'quantity' => array('title' => $this->l('Quantity'), 'width' => 30, 'align' => 'right', 'filter_key' => 'a!quantity', 'type' => 'decimal'), 'position' => array('title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'cp!position', 'align' => 'center', 'position' => 'position'), 'a!active' => array('title' => $this->l('Displayed'), 'active' => 'status', 'filter_key' => 'a!active', 'align' => 'center', 'type' => 'bool', 'orderby' => false)); /* Join categories table */ $this->_category = AdminCatalog::getCurrentCategory(); $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'image` i ON (i.`id_product` = a.`id_product` AND i.`cover` = 1) LEFT JOIN `' . _DB_PREFIX_ . 'category_product` cp ON (cp.`id_product` = a.`id_product`) LEFT JOIN `' . _DB_PREFIX_ . 'tax_rule` tr ON (a.`id_tax_rules_group` = tr.`id_tax_rules_group` AND tr.`id_country` = ' . (int) Country::getDefaultCountryId() . ' AND tr.`id_state` = 0) LEFT JOIN `' . _DB_PREFIX_ . 'tax` t ON (t.`id_tax` = tr.`id_tax`)'; $this->_filter = 'AND cp.`id_category` = ' . (int) $this->_category->id; $this->_select = 'cp.`position`, i.`id_image`, (a.`price` * ((100 + (t.`rate`))/100)) AS price_final'; parent::__construct(); }
public function __construct() { parent::__construct(); self::$tpl_regexp = '/\\{l s=\'' . _PS_TRANS_PATTERN_ . '\'( mod=\'.+\')?( js=1)?\\}/U'; // added ? after spaces because some peoples forget them. see PSCFI-2501 self::$php_regexp = '/->l\\(\'' . _PS_TRANS_PATTERN_ . '\'(, ?\'(.+)\')?(, ?(.+))?\\)/U'; }
public function __construct() { global $cookie; $this->className = 'Configuration'; $this->table = 'configuration'; $max_upload = (int) ini_get('upload_max_filesize'); $max_post = (int) ini_get('post_max_size'); $upload_mb = min($max_upload, $max_post); $timezones = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT name FROM ' . _DB_PREFIX_ . 'timezone'); $taxes[] = array('id' => 0, 'name' => $this->l('None')); foreach (Tax::getTaxes((int) $cookie->id_lang) as $tax) { $taxes[] = array('id' => $tax['id_tax'], 'name' => $tax['name']); } $order_process_type = array(array('value' => PS_ORDER_PROCESS_STANDARD, 'name' => $this->l('Standard (5 steps)')), array('value' => PS_ORDER_PROCESS_OPC, 'name' => $this->l('One page checkout'))); $round_mode = array(array('value' => PS_ROUND_UP, 'name' => $this->l('superior')), array('value' => PS_ROUND_DOWN, 'name' => $this->l('inferior')), array('value' => PS_ROUND_HALF, 'name' => $this->l('classical'))); $cms_tab = array(0 => array('id' => 0, 'name' => $this->l('None'))); foreach (CMS::listCms($cookie->id_lang) as $cms_file) { $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']); } $this->_fieldsGeneral = array('PS_SHOP_ENABLE' => array('title' => $this->l('Enable Shop'), 'desc' => $this->l('Activate or deactivate your shop. Deactivate your shop while you perform maintenance on it. Please note that the webservice will not be disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_MAINTENANCE_IP' => array('title' => $this->l('Maintenance IP'), 'desc' => $this->l('IP addresses allowed to access the Front Office even if shop is disabled. Use a comma to separate them (e.g., 42.24.4.2,127.0.0.1,99.98.97.96)'), 'validation' => 'isGenericName', 'type' => 'maintenance_ip', 'size' => 30, 'default' => ''), 'PS_SSL_ENABLED' => array('title' => $this->l('Enable SSL'), 'desc' => $this->l('If your hosting provider allows SSL, you can activate SSL encryption (https://) for customer account identification and order processing'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_COOKIE_CHECKIP' => array('title' => $this->l('Check IP on the cookie'), 'desc' => $this->l('Check the IP address of the cookie in order to avoid your cookie being stolen'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_COOKIE_LIFETIME_FO' => array('title' => $this->l('Lifetime of the Front Office cookie'), 'desc' => $this->l('Indicate the number of hours'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '480'), 'PS_COOKIE_LIFETIME_BO' => array('title' => $this->l('Lifetime of the Back Office cookie'), 'desc' => $this->l('Indicate the number of hours'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '480'), 'PS_TOKEN_ENABLE' => array('title' => $this->l('Increase Front Office security'), 'desc' => $this->l('Enable or disable token on the Front Office in order to improve PrestaShop security'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'default' => '0'), 'PS_HELPBOX' => array('title' => $this->l('Back Office help boxes'), 'desc' => $this->l('Enable yellow help boxes which are displayed under form fields in the Back Office'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_ORDER_PROCESS_TYPE' => array('title' => $this->l('Order process type'), 'desc' => $this->l('You can choose the order process type as either standard (5 steps) or One Page Checkout'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $order_process_type, 'identifier' => 'value'), 'PS_GUEST_CHECKOUT_ENABLED' => array('title' => $this->l('Enable guest checkout'), 'desc' => $this->l('Your guest can make an order without registering'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CONDITIONS' => array('title' => $this->l('Terms of service'), 'desc' => $this->l('Require customers to accept or decline terms of service before processing the order'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'js' => array('on' => 'onchange="changeCMSActivationAuthorization()"', 'off' => 'onchange="changeCMSActivationAuthorization()"')), 'PS_CONDITIONS_CMS_ID' => array('title' => $this->l('Conditions of use of CMS page'), 'desc' => $this->l('Choose the Conditions of use of CMS page'), 'validation' => 'isInt', 'type' => 'select', 'list' => $cms_tab, 'identifier' => 'id', 'cast' => 'intval'), 'PS_GIFT_WRAPPING' => array('title' => $this->l('Offer gift-wrapping'), 'desc' => $this->l('Suggest gift-wrapping to customer and possibility of leaving a message'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_GIFT_WRAPPING_PRICE' => array('title' => $this->l('Gift-wrap pricing'), 'desc' => $this->l('Set a price for gift-wrapping'), 'validation' => 'isPrice', 'cast' => 'floatval', 'type' => 'price'), 'PS_GIFT_WRAPPING_TAX' => array('title' => $this->l('Gift-wrapping tax'), 'desc' => $this->l('Set a tax for gift-wrapping'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $taxes, 'identifier' => 'id'), 'PS_ATTACHMENT_MAXIMUM_SIZE' => array('title' => $this->l('Maximum attachment size'), 'desc' => $this->l('Set the maximum size of attached files (in Megabytes ).') . ' ' . $this->l('Maximum:') . ' ' . ((int) str_replace('M', '', ini_get('post_max_size')) > (int) str_replace('M', '', ini_get('upload_max_filesize')) ? ini_get('upload_max_filesize') : ini_get('post_max_size')), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text', 'default' => '2'), 'PS_RECYCLABLE_PACK' => array('title' => $this->l('Offer recycled packaging'), 'desc' => $this->l('Suggest recycled packaging to customer'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CART_FOLLOWING' => array('title' => $this->l('Save cart content and re-display it at login'), 'desc' => $this->l('Recall and display contents of shopping cart following customer login'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_PRICE_ROUND_MODE' => array('title' => $this->l('Round mode'), 'desc' => $this->l('You can choose how to round prices: always round superior; always round inferior, or classic rounding'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $round_mode, 'identifier' => 'value'), 'PRESTASTORE_LIVE' => array('title' => $this->l('Automatically check for module updates'), 'desc' => $this->l('New modules and updates are displayed on the modules page'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_HIDE_OPTIMIZATION_TIPS' => array('title' => $this->l('Hide optimization tips'), 'desc' => $this->l('Hide optimization tips on the back office homepage'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISPLAY_SUPPLIERS' => array('title' => $this->l('Display suppliers and manufacturers'), 'desc' => $this->l('Display manufacturers and suppliers list even if corresponding blocks are disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_FORCE_SMARTY_2' => array('title' => $this->l('Use Smarty 2 instead of 3'), 'desc' => $this->l('Enable if your theme is incompatible with Smarty 3 (you should update your theme, since Smarty 2 will be unsupported from PrestaShop v1.5)'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_LIMIT_UPLOAD_FILE_VALUE' => array('title' => $this->l('Limit upload file value'), 'desc' => $this->l('Define the limit upload for a downloadable product, this value has to be inferior or equal to your server\'s maximum upload file ') . sprintf('(%s MB).', $upload_mb), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'limit', 'default' => '1'), 'PS_LIMIT_UPLOAD_IMAGE_VALUE' => array('title' => $this->l('Limit upload image value'), 'desc' => $this->l('Define the limit upload for an image, this value has to be inferior or equal to your server\'s maximum upload file ') . sprintf('(%s MB).', $upload_mb), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'limit', 'default' => '1')); if (function_exists('date_default_timezone_set')) { $this->_fieldsGeneral['PS_TIMEZONE'] = array('title' => $this->l('Time Zone:'), 'validation' => 'isAnything', 'type' => 'select', 'list' => $timezones, 'identifier' => 'name'); } // No HTTPS activation if you haven't already. if (!Tools::usingSecureMode() && !_PS_SSL_ENABLED_) { $this->_fieldsGeneral['PS_SSL_ENABLED']['type'] = 'disabled'; $this->_fieldsGeneral['PS_SSL_ENABLED']['disabled'] = '<a href="https://' . Tools::getShopDomainSsl() . Tools::safeOutput($_SERVER['REQUEST_URI']) . '">' . $this->l('Please click here to use HTTPS protocol before enabling SSL.') . '</a>'; } parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'order'; $this->className = 'Order'; $this->view = true; $this->colorOnBackground = true; $this->_select = ' a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, IF((SELECT COUNT(so.id_order) FROM `' . _DB_PREFIX_ . 'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new, (SELECT COUNT(od.`id_order`) FROM `' . _DB_PREFIX_ . 'order_detail` od WHERE od.`id_order` = a.`id_order` GROUP BY `id_order`) AS product_number'; $this->_join = 'LEFT JOIN `' . _DB_PREFIX_ . 'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `' . _DB_PREFIX_ . 'order_history` oh ON (oh.`id_order` = a.`id_order`) LEFT JOIN `' . _DB_PREFIX_ . 'order_state` os ON (os.`id_order_state` = oh.`id_order_state`) LEFT JOIN `' . _DB_PREFIX_ . 'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = ' . (int) $cookie->id_lang . ')'; $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `' . _DB_PREFIX_ . 'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; $statesArray = array(); $states = OrderState::getOrderStates((int) $cookie->id_lang); foreach ($states as $state) { $statesArray[$state['id_order_state']] = $state['name']; } $this->fieldsDisplay = array('id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => 100), 'osname' => array('title' => $this->l('Status'), 'widthColumn' => 230, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 35, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false)); parent::__construct(); }
public function __construct() { $this->mondialrelay = new MondialRelay(); $this->table = 'mr_selected'; parent::__construct(); $this->context = Context::getContext(); }
public function __construct() { global $cookie; $this->table = 'manufacturer'; $this->className = 'Manufacturer'; $this->lang = false; $this->edit = true; $this->delete = true; // Sub tab addresses $countries = Country::getCountries(intval($cookie->id_lang)); foreach ($countries as $country) { $this->countriesArray[$country['id_country']] = $country['name']; } $this->fieldsDisplayAddresses = array('id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'm!manufacturer_name' => array('title' => $this->l('Manufacturer'), 'width' => 100), 'firstname' => array('title' => $this->l('First name'), 'width' => 80), 'lastname' => array('title' => $this->l('Last name'), 'width' => 100, 'filter_key' => 'a!name'), 'postcode' => array('title' => $this->l('Post/Zip code'), 'align' => 'right', 'width' => 50), 'city' => array('title' => $this->l('City'), 'width' => 150), 'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'select' => $this->countriesArray, 'filter_key' => 'cl!id_country')); $this->_includeTabTitle = array($this->l('Manufacturers addresses')); $this->_joinAddresses = 'LEFT JOIN `' . _DB_PREFIX_ . 'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = ' . intval($cookie->id_lang) . ') '; $this->_joinAddresses .= 'LEFT JOIN `' . _DB_PREFIX_ . 'manufacturer` m ON (a.`id_manufacturer` = m.`id_manufacturer`)'; $this->_selectAddresses = 'cl.`name` as country, m.`name` AS manufacturer_name'; $this->_includeTab = array('Addresses' => array('addressType' => 'manufacturer', 'fieldsDisplay' => $this->fieldsDisplayAddresses, '_join' => $this->_joinAddresses, '_select' => $this->_selectAddresses)); $this->view = true; $this->_select = 'COUNT(`id_product`) AS `products`, (SELECT COUNT(ad.`id_manufacturer`) as `addresses` FROM `' . _DB_PREFIX_ . 'address` ad WHERE ad.`id_manufacturer` = a.`id_manufacturer` GROUP BY ad.`id_manufacturer`) as `addresses`'; $this->_join = 'LEFT JOIN `' . _DB_PREFIX_ . 'product` p ON (a.`id_manufacturer` = p.`id_manufacturer`)'; $this->_joinCount = false; $this->_group = 'GROUP BY a.`id_manufacturer`'; $this->fieldImageSettings = array('name' => 'logo', 'dir' => 'm'); $this->fieldsDisplay = array('id_manufacturer' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 200), 'logo' => array('title' => $this->l('Logo'), 'align' => 'center', 'image' => 'm', 'orderby' => false, 'search' => false), 'addresses' => array('title' => $this->l('Addresses'), 'align' => 'right', 'tmpTableFilter' => true, 'width' => 20), 'products' => array('title' => $this->l('Products'), 'align' => 'right', 'tmpTableFilter' => true, 'width' => 20)); $countries = Country::getCountries(intval($cookie->id_lang)); foreach ($countries as $country) { $this->countriesArray[$country['id_country']] = $country['name']; } parent::__construct(); }
public function __construct() { $this->table = 'delivery'; $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT')); $this->_fieldsHandling = array('PS_SHIPPING_HANDLING' => array('title' => $this->l('Handling charges'), 'suffix' => $currency, 'validation' => 'isPrice', 'cast' => 'floatval'), 'PS_SHIPPING_FREE_PRICE' => array('title' => $this->l('Free shipping starts at'), 'suffix' => $currency, 'validation' => 'isPrice', 'cast' => 'floatval'), 'PS_SHIPPING_FREE_WEIGHT' => array('title' => $this->l('Free shipping starts at'), 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'validation' => 'isUnsignedFloat', 'cast' => 'floatval'), 'PS_SHIPPING_METHOD' => array('title' => $this->l('Billing'), 'validation' => 'isBool', 'cast' => 'intval')); parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'customer_thread'; $this->lang = false; $this->className = 'CustomerThread'; $this->edit = false; $this->view = true; $this->delete = true; $this->_select = 'CONCAT(c.firstname," ",c.lastname) as customer, cl.name as contact, l.name as language, group_concat(message) as messages, ( SELECT IFNULL(CONCAT(LEFT(e.firstname, 1),". ",e.lastname), "--") FROM ' . _DB_PREFIX_ . 'customer_message cm2 INNER JOIN ' . _DB_PREFIX_ . 'employee e ON e.id_employee = cm2.id_employee WHERE cm2.id_employee > 0 AND cm2.`id_customer_thread` = a.`id_customer_thread` ORDER BY cm2.date_add DESC LIMIT 1) as employee'; $this->_group = 'GROUP BY cm.id_customer_thread'; $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'customer` c ON c.`id_customer` = a.`id_customer` LEFT JOIN `' . _DB_PREFIX_ . 'customer_message` cm ON cm.`id_customer_thread` = a.`id_customer_thread` LEFT JOIN `' . _DB_PREFIX_ . 'lang` l ON l.`id_lang` = a.`id_lang` LEFT JOIN `' . _DB_PREFIX_ . 'contact_lang` cl ON (cl.`id_contact` = a.`id_contact` AND cl.`id_lang` = ' . (int) $cookie->id_lang . ')'; $contactArray = array(); $contacts = Contact::getContacts($cookie->id_lang); foreach ($contacts as $contact) { $contactArray[$contact['id_contact']] = $contact['name']; } $languageArray = array(); $languages = Language::getLanguages(); foreach ($languages as $language) { $languageArray[$language['id_lang']] = $language['name']; } $statusArray = array('open' => $this->l('Open'), 'closed' => $this->l('Closed'), 'pending1' => $this->l('Pending 1'), 'pending2' => $this->l('Pending 2')); $imagesArray = array('open' => 'status_green.gif', 'closed' => 'status_red.gif', 'pending1' => 'status_orange.gif', 'pending2' => 'status_orange.gif'); $this->fieldsDisplay = array('id_customer_thread' => array('title' => $this->l('ID'), 'width' => 25), 'customer' => array('title' => $this->l('Customer'), 'width' => 100, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'email' => array('title' => $this->l('E-mail'), 'width' => 100, 'filter_key' => 'a!email'), 'contact' => array('title' => $this->l('Type'), 'width' => 75, 'type' => 'select', 'select' => $contactArray, 'filter_key' => 'cl!id_contact', 'filter_type' => 'int'), 'language' => array('title' => $this->l('Language'), 'width' => 60, 'type' => 'select', 'select' => $languageArray, 'filter_key' => 'l!id_lang', 'filter_type' => 'int'), 'status' => array('title' => $this->l('Status'), 'width' => 50, 'type' => 'select', 'select' => $statusArray, 'icon' => $imagesArray, 'align' => 'center', 'filter_key' => 'a!status', 'filter_type' => 'string'), 'employee' => array('title' => $this->l('Employee'), 'width' => 100, 'filter_key' => 'employee', 'tmpTableFilter' => true), 'messages' => array('title' => $this->l('Messages'), 'width' => 50, 'filter_key' => 'messages', 'tmpTableFilter' => true, 'maxlength' => 0), 'date_upd' => array('title' => $this->l('Last message'), 'width' => 90)); parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'discount'; $this->className = 'Discount'; $this->lang = true; $this->edit = true; $this->delete = true; $this->_select = 'dtl.`name` AS discount_type, IF(a.id_discount_type = 1, CONCAT(a.value, " %"), IF(a.id_discount_type = 2, CONCAT(a.value, " ", c.sign), "--")) as strvalue'; $this->_join = 'LEFT JOIN `' . _DB_PREFIX_ . 'currency` c ON (c.`id_currency` = a.`id_currency`) LEFT JOIN `' . _DB_PREFIX_ . 'discount_type` dt ON (dt.`id_discount_type` = a.`id_discount_type`) LEFT JOIN `' . _DB_PREFIX_ . 'discount_type_lang` dtl ON (dt.`id_discount_type` = dtl.`id_discount_type` AND dtl.`id_lang` = ' . (int) $cookie->id_lang . ')'; $typesArray = array(); $types = Discount::getDiscountTypes((int) $cookie->id_lang); foreach ($types as $type) { $typesArray[$type['id_discount_type']] = $type['name']; } $this->fieldsDisplay = array('id_discount' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Code'), 'width' => 85, 'prefix' => '<span class="discount_name">', 'suffix' => '</span>', 'filter_key' => 'a!name'), 'description' => array('title' => $this->l('Description'), 'width' => 100, 'filter_key' => 'b!description'), 'discount_type' => array('title' => $this->l('Type'), 'type' => 'select', 'select' => $typesArray, 'filter_key' => 'dt!id_discount_type'), 'strvalue' => array('title' => $this->l('Value'), 'width' => 50, 'align' => 'right', 'filter_key' => 'a!value'), 'quantity' => array('title' => $this->l('Qty'), 'width' => 40, 'align' => 'right'), 'date_to' => array('title' => $this->l('To'), 'width' => 60, 'type' => 'date', 'align' => 'right'), 'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)); $this->optionTitle = $this->l('Discount options'); $this->_fieldsOptions = array('PS_VOUCHERS' => array('title' => $this->l('Enable vouchers:'), 'desc' => $this->l('Allow the use of vouchers in shop'), 'cast' => 'intval', 'type' => 'bool')); parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'invoice'; $this->optionTitle = $this->l('Invoice options'); $this->_fieldsOptions = array('PS_INVOICE' => array('title' => $this->l('Enable invoices:'), 'desc' => $this->l('Select whether or not to activate invoices for your shop'), 'cast' => 'intval', 'type' => 'bool'), 'PS_INVOICE_PREFIX' => array('title' => $this->l('Invoice prefix:'), 'desc' => $this->l('Prefix used for invoices'), 'size' => 6, 'type' => 'textLang'), 'PS_INVOICE_START_NUMBER' => array('title' => $this->l('Invoice number:'), 'desc' => $this->l('The next invoice will begin with this number, and then increase with each additional invoice. Set to 0 if you wan\'t to keep the current number (#') . (Order::getLastInvoiceNumber() + 1) . ').', 'size' => 6, 'type' => 'text', 'cast' => 'intval')); parent::__construct(); }
public function __construct() { $this->_htFile = dirname(__FILE__) . '/../../.htaccess'; $this->_rbFile = dirname(__FILE__) . '/../../robots.txt'; $this->_smFile = dirname(__FILE__) . '/../../sitemap.xml'; $this->_rbData = $this->_getRobotsContent(); return parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'delivery'; $this->optionTitle = $this->l('Delivery slips options'); $this->_fieldsOptions = array('PS_DELIVERY_PREFIX' => array('title' => $this->l('Delivery prefix:'), 'desc' => $this->l('Prefix used for delivery slips'), 'size' => 6, 'type' => 'textLang'), 'PS_DELIVERY_NUMBER' => array('title' => $this->l('Delivery number:'), 'desc' => $this->l('The next delivery slip will begin with this number, and then increase with each additional slip'), 'size' => 6, 'type' => 'text')); parent::__construct(); }
public function __construct() { global $cookie; $this->table = 'invoice'; $this->optionTitle = $this->l('Invoices options'); $this->_fieldsOptions = array('PS_INVOICE' => array('title' => $this->l('Enable invoices:'), 'desc' => $this->l('Select whether or not to activate invoice for your shop'), 'cast' => 'intval', 'type' => 'bool'), 'PS_INVOICE_PREFIX' => array('title' => $this->l('Invoice prefix:'), 'desc' => $this->l('Prefix used for invoices'), 'size' => 2, 'type' => 'textLang'), 'PS_INVOICE_NUMBER' => array('title' => $this->l('Invoice number:'), 'desc' => $this->l('The next invoice will begin with this number, and then increase with each additional invoice'), 'size' => 2, 'type' => 'text')); parent::__construct(); }
public function __construct() { $this->_path = dirname(__FILE__) . '/../../'; $this->_htFile = $this->_path . '.htaccess'; $this->_rbFile = $this->_path . 'robots.txt'; $this->_htData = $this->_getHtaccessContent(); $this->_rbData = $this->_getRobotsContent(); return parent::__construct(); }
public function __construct() { $this->table = 'search_engine'; $this->className = 'SearchEngine'; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_search_engine' => array('title' => $this->l('ID'), 'width' => 25), 'server' => array('title' => $this->l('Server'), 'width' => 200), 'getvar' => array('title' => $this->l('GET variable'), 'width' => 40)); parent::__construct(); }
public function __construct() { $this->mondialrelay = new MondialRelay(); $this->table = 'mr_selected'; parent::__construct(); $this->context = Context::getContext(); $datas = array('display_header' => true, 'display_header_javascript' => true, 'display_footer' => true); $this->context->smarty->assign($datas); }
function __construct() { $this->table = 'alias'; $this->className = 'Alias'; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('alias' => array('title' => $this->l('Aliases'), 'width' => 160), 'search' => array('title' => $this->l('Search'), 'width' => 40), 'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false)); parent::__construct(); }
public function __construct() { $this->table = 'subdomain'; $this->className = 'SubDomain'; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_subdomain' => array('title' => $this->l('ID'), 'width' => 25), 'name' => array('title' => $this->l('Subdomain'), 'width' => 200)); parent::__construct(); }
public function __construct() { $this->table = 'feature_value'; $this->className = 'FeatureValue'; $this->lang = true; $this->edit = true; $this->delete = true; parent::__construct(); }
public function __construct() { $this->table = 'image_type'; $this->className = 'ImageType'; $this->lang = false; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_image_type' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 140, 'size' => 16), 'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5), 'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5)); parent::__construct(); }
public function __construct() { $this->table = 'meta'; $this->className = 'Meta'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_meta' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'page' => array('title' => $this->l('Page'), 'width' => 120, 'suffix' => '.php'), 'title' => array('title' => $this->l('Title'), 'width' => 120)); parent::__construct(); }
public function __construct() { $this->table = 'quick_access'; $this->className = 'QuickAccess'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_quick_access' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 200), 'link' => array('title' => $this->l('Link'), 'width' => 300), 'new_window' => array('title' => $this->l('New window'), 'align' => 'center', 'type' => 'bool', 'activeVisu' => 'new_window')); parent::__construct(); }
public function __construct() { $this->table = 'contact'; $this->className = 'Contact'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Title'), 'width' => 130), 'email' => array('title' => $this->l('E-mail address'), 'width' => 130), 'description' => array('title' => $this->l('Description'), 'width' => 150)); parent::__construct(); }
public function __construct() { $this->table = 'order_message'; $this->className = 'OrderMessage'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldsDisplay = array('id_order_message' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name'), 'width' => 140), 'message' => array('title' => $this->l('Message'), 'width' => 600, 'maxlength' => 300)); parent::__construct(); }
public function __construct() { $this->table = 'attribute'; $this->className = 'Attribute'; $this->lang = true; $this->edit = true; $this->delete = true; $this->fieldImageSettings = array('name' => 'texture', 'dir' => 'co'); parent::__construct(); }