public function initContent() { if ($this->action == "select_delete") { $this->context->smarty->assign(array("delete_form" => true, "url_delete" => htmlentities($_SERVER["REQUEST_URI"]), "boxes" => $this->boxes)); } parent::initContent(); }
public function initContent() { $admin_seur = new AdminSeur(false); if (!$admin_seur->module_enabled_and_configured) { $admin_seur->displayModuleConfigurationWarning(); $this->content = $admin_seur->content; return parent::initContent(); } $this->display = 'view'; $this->module_instance = Module::getInstanceByName('seur'); Context::getContext()->controller->addJqueryUI('ui.datepicker'); if (Tools::getValue('verDetalle')) { $response = Expedition::getExpeditions($admin_seur->getExpeditionData()); $this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries($response, true)); } elseif (Tools::getValue('createPickup')) { $error_response = Pickup::createPickup(); if (!empty($error_response)) { $this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries(null, null, $error_response)); } else { $this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries()); } } elseif (Tools::getValue('submitFilter')) { $response = Expedition::getExpeditions($admin_seur->getExpeditionData()); $this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries($response, false)); } else { $this->tpl_view_vars = array('datos' => $admin_seur->displayFormDeliveries()); } $this->content = $admin_seur->content; $this->fields_list = $admin_seur->fields_list; parent::initContent(); }
public function initContent() { $info = ''; $query = 'SELECT `name` FROM `ps_hook`'; $sql = Db::getInstance()->executeS($query); if (Tools::getAdminTokenLite('AdminModules') == Tools::getValue('token')) { if (Tools::isSubmit('btnSubmit')) { $info = $this->postProcess(); } } //Get links $controller_link = Context::getContext()->link->getAdminLink('AdminPSMGen'); $this->context->smarty->assign('path', _MODULE_DIR_ . $this->module->name . '/'); $this->context->smarty->assign('controller_link', $controller_link); $this->context->smarty->assign('info', $info); $i = 0; $array_installhooks = array(); //$array_check = array(); for ($i = 0; $i < count($sql); $i++) { $hook = $sql[$i]; $hook['id'] = 'hooks_' . $hook['name']; $hook['value'] = $hook['name']; $hook['label'] = $hook['name']; $sql[$i] = $hook; $array_installhooks[$i] = array('name' => 'install_' . $hook['id'], 'id' => 'install_' . $hook['id'], 'value' => 'install_' . $hook['id'], 'label' => 'install_' . $hook['id']); } $this->context->smarty->assign('sql', $sql); $this->context->smarty->assign('array_installhooks', $array_installhooks); // $this->context->smarty->assign('content_only' => '1'); // $form = $this->displayForm($sql); // $this->context->smarty->assign('form1', $form); $this->setTemplate('../../../../modules/' . $this->module->name . '/views/templates/admin/admintemplate.tpl'); //$smarty->assign('items', $items_list); parent::initContent(); }
public function initContent() { $data = array(); $htm = $this->context->smarty->createTemplate(_PS_MODULE_DIR_ . 'smartblog/views/templates/admin/aboutus.tpl', $data)->fetch(); $this->content = $htm; return parent::initContent(); }
public function initContent() { //$this->setTemplate('feditorbackend.tpl'); parent::initContent(); $fronteditorlink = $this->context->link->getModuleLink('iqitcontentcreator', 'Editor', array('iqit_fronteditor_token' => $this->module->getFrontEditorToken(), 'admin_webpath' => $this->context->controller->admin_webpath, 'id_employee' => is_object($this->context->employee) ? (int) $this->context->employee->id : Tools::getValue('id_employee'))); $module_link = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->module->name . '&tab_module=' . $this->module->tab . '&token=' . Tools::getAdminTokenLite('AdminModules') . '&module_name=' . $this->module->name; $toolbar = ' <div id="preloader"> <div id="status"> </div> </div><div id="fronteditor-toolbar" class="clearfix"> <div class="toolbar-action"> <a href="' . $module_link . '" class="btn btn-danger iqlogo"> <i class="icon-angle-left"></i> Back to backend </a> </div> <div class="toolbar-action"> <button type="button" class="btn btn-default switch-guides-btn">Toggle guides</button> </div> <div class="toolbar-action pull-right"> <button type="button" class="btn btn-success update-fronteditor-action" ><i class="icon icon-save"></i> Update</button> </div> <div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-d" ><i class="icon-desktop"></i> </button></div> <div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-t" ><i class="icon-tablet"></i> </button></div> <div class="toolbar-action pull-right"><button type="button" class="btn btn-default switch-front-view-btn" data-preview-type="preview-p" ><i class="icon-mobile"></i> </button></div> <div class="toolbar-action pull-right">View</div> </div>'; $content = $toolbar . '<iframe id="ffpreview" name="ffpreview" height="100%" width="100%" src="' . $fronteditorlink . '"> </iframe>'; $this->context->smarty->assign(array('content' => $content)); }
public function initContent() { $this->multiple_fieldsets = true; if (Tools::isSubmit('regenerateThumbnails')) { SimpleBlogPost::regenerateThumbnails(); Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getValue('token') . '&conf=9'); } $this->context->smarty->assign(array('content' => $this->content, 'url_post' => self::$currentIndex . '&token=' . $this->token)); parent::initContent(); }
public function initContent() { if (!Configuration::hasKey('ERP_LICENCE') || Configuration::get('ERP_LICENCE') == '') { $this->warnings[] = '<a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Your license has not been validated yet, please go to your module configuration page to validate it.') . '</a>'; } elseif (Configuration::get('ERP_BLACKLIST') == '1') { $this->errors[] = sprintf($this->l('Your license is blacklisted, please contact our technical support to this email: %s .'), ERP_EMAIL_SUPPORT); } elseif (Configuration::get('ERP_LICENCE_VALIDITY') == '0') { $this->errors[] = sprintf($this->l('Your license number is not valid, please contact our technical support to this mail adress: %s.'), ERP_EMAIL_SUPPORT); } else { $link_conf = '<br/><a href="?controller=AdminModules&configure=erpillicopresta&token=' . Tools::getAdminTokenLite('AdminModules') . '">' . $this->l('Go to your back-office, module tab, page 1-Click ERP.') . '</a>'; $this->informations[] = $this->l('Win up to 2hours a day in your store management with 1-Click ERP! Optimise your module in your Back-Office, Module tab, Page 1-Click ERP!') . $link_conf; } parent::initContent(); }
public function initContent() { $htm = '<p id="smartextra"><img src="http://referals.smartdatasoft.com/images/logo.png"><b>Smartdatasoft is a Prestashop certified and authorized Prestashop partner developing brand. With some of very outstanding Prestashop project like- opensource blog module, Revolution Slider and others; it is already a name of trust and quality among web clients. With continuous Total Quality Management (TQM) philosophy, inventive creativity and reliable after sales service concept, Smartdatasoft is trying to bring a difference among marketplace.</b></p> <p id="smartextra"><a href="http://www.prestashop.com/en/web-agency-partners/bronze/smartdatasoft"><img src="http://smartdatasoft.com/envato-add/prestashop_partner.png"></a> <a href="http://themeforest.net/user/smartdatasoft/?ref=smartdatasoft"><img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-envato1.png"></a> <a href="http://addons.prestashop.com/en/69_smartdatasoft"><img height="56" width="305" src="http://medias1.prestastore.com/themes/prestastore/img/logo_addons.png"></a> <a href="http://facebook.com/pages/SmartDataSoft/332747343429694"><img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-facebook1.png"></a> <a href="http://twitter.com/smartdatasoft"> <img src="http://smartdatasoft.com/envato-add/mecror-prestashop/envato-branding-twitter1.png"></a> </p>'; $this->content = $htm . '<fieldset class="width3" id="smartdatasoft-content"> <style> #smartdatasoft-content { padding: 0; width: 99%; padding-left: 1.3em; background: white; } #smartdatasoft-content #smartextra{ display:none; } #smartextra img{ vertical-align: bottom; } p{ verticle-align:bottom; } .bootstrap h3, .bootstrap .h3 { font-size: 13px; } </style></fieldset> <script type="text/javascript"> $.post( "ajax-tab.php", { tab: \'AdminAboutUs\', token: \'' . $this->token . '\', ajax: \'1\', action:\'GetSmartThemes\', page:\'themes\' }, function(a){ $("#smartdatasoft-content").html("<legend><img src=\'../img/admin/prestastore.gif\' class=\'middle\' />Live from SmartDataSoft Addons!</legend>"+a); }); </script>'; return parent::initContent(); }
public function initContent() { $info = ''; if (Tools::getAdminTokenLite('AdminModules') == Tools::getValue('token')) { if (Tools::isSubmit('btnSubmit')) { $info = $this->postProcess(); } } //Get links $controller_link = Context::getContext()->link->getAdminLink('ValidatorPSMGen'); $this->context->smarty->assign('path', _MODULE_DIR_ . $this->module->name . '/'); $this->context->smarty->assign('controller_link', $controller_link); $this->context->smarty->assign('info', $info); //$form = $this->_display_admin(); //$this->context->smarty->assign('form1', $form); // $this->context->smarty->assign('content_only' => '1'); $this->setTemplate('../../../../modules/' . $this->module->name . '/views/templates/admin/validatortemplate.tpl'); //$smarty->assign('items', $items_list); parent::initContent(); }
public function initContent() { parent::initContent(); theme_check_memory_limit(true); if (Tools::getIsset('invalid_urls')) { // base and server urls have to start with the same symbols $this->errors[] = $this->l(sprintf('An error has occurred. The Themler start URL %s does not match Shop Domain or SSL Domain %s. This may be due to one of the following reasons: 1. server protocol does not match (HTTP/HTTPS) 2. www prefix is missing in one of the links', $this->_serverUrl . $_SERVER['REQUEST_URI'], $this->_baseUrl)); } if (Tools::getIsset('invalid_php_version')) { $this->errors[] = $this->l(sprintf('Unable to open theme. Your server is running php version %s but Themler requires %s or higher. Please upgrade PHP version to continue.', $this->_php_version, $this->_required_php_version)); } if (Tools::getIsset('no_project')) { $this->errors[] = $this->l(sprintf('The theme `%s` cannot be opened because /project/project.json file is missing or corrupted.', $this->_getThemeName())); } if ($this->ajax) { try { $themeName = $this->_getThemeName(); $this->_checkPermissions($themeName); moveInnerPreview($themeName); $data = $this->_getThemlerData($themeName); echo $this->_buildPage($themeName); } catch (PermissionsException $e) { die(buildErrorsPage($e->getMessage())); } } else { $edit = Tools::getValue('edit', ''); if (!empty($edit)) { $title = $this->l('Slider settings'); $this->content .= $this->renderThemeSettingsForm(); } else { $title = $this->l('List of Themes'); $this->content .= $this->_formRendererHelper->renderThemesListForm($this->getThemesInfo()); } $this->context->smarty->assign(array('content' => $this->content, 'title' => $title)); } }
public function initContent() { $this->content = $this->displayWarning($this->l('1. Module is working in test mode. Please backup your store data before export.')); $this->content .= $this->displayWarning($this->l('2. Exported archive contains the following store data: Address, Alias, Attachments, Attributes, Carriers, Categories, CMS Categories, CMS Pages, Configurations(only custom fields), Contacts, Countries, Currencies, Deliveries, Features, Home Slides, Images, Infos, Languages, Manufacturers, Products, Product Attributes, Product Packs, Specific Prices, States, Stock Available, Suppliers, Taxes, Zones and non-prestashop tables.')); $this->content .= $this->displayWarning($this->l('3. Export and import are fully functional only with single langue stores. Only one language can be used for export and import.')); $this->content .= $this->displayWarning($this->l('4. We do not guarantee the correct work of exported erchive with other third party importing tools.')); $this->content .= $this->renderConfigurationForm(); parent::initContent(); }
public function ajaxProcessEditOrder() { if ((int) Tools::getValue('id_order_detail') < 1) { return 'Appuntamento non trovato.'; } $copy_order = false; if ((bool) Tools::getIsset('copyorder')) { $copy_order = true; } $order_detail = new AphOrderDetail(Tools::getValue('id_order_detail')); $order = new Order($order_detail->id_order); $customer = new Customer($order->id_customer); $address = new Address($order->id_address_invoice); $this->context->smarty->assign('id_order', empty($copy_order) ? $order_detail->id_order : NULL); $this->context->smarty->assign('id_order_detail', empty($copy_order) ? $order_detail->id_order_detail : NULL); $this->context->smarty->assign('id_customer', $order->id_customer); $this->context->smarty->assign('delivery_date', $order_detail->delivery_date); $this->context->smarty->assign('delivery_date_lang', date('d/m/Y', strtotime($order_detail->delivery_date))); $this->context->smarty->assign('delivery_time_from', substr($order_detail->delivery_time_from, 0, 5)); $this->context->smarty->assign('delivery_time_to', substr($order_detail->delivery_time_to, 0, 5)); $this->context->smarty->assign('id_employee', empty($copy_order) ? $order_detail->id_employee : NULL); $this->context->smarty->assign('other', $order_detail->note); $this->context->smarty->assign('firstname', $customer->firstname); $this->context->smarty->assign('lastname', $customer->lastname); $this->context->smarty->assign('id_gender', $customer->id_gender); $this->context->smarty->assign('email', $customer->email); $this->context->smarty->assign('phone', !empty($address->phone_mobile) ? $address->phone_mobile : $address->phone); $selected = array($order_detail->product_id); $products = array('selected' => array(), 'unselected' => array()); $results = Db::getInstance()->executeS(' SELECT DISTINCT name, p.id_product as id FROM ' . _DB_PREFIX_ . 'product p LEFT JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = ' . (int) Context::getContext()->language->id . Shop::addSqlRestrictionOnLang('pl') . ') ' . Shop::addSqlAssociation('product', 'p') . ' WHERE id_lang = ' . (int) Context::getContext()->language->id . ' ORDER BY name'); foreach ($results as $row) { $products[in_array($row['id'], $selected) ? 'selected' : 'unselected'][] = $row; } $choose_content = Context::getContext()->smarty->createTemplate(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/calendar/product_itemlist.tpl'); $choose_content->assign('product_itemlist', $products); $this->context->smarty->assign('product_choose_content', $choose_content->fetch()); $employees = AphEmployeeProduct::getEmployeesByShop((int) $this->context->shop->id); $this->context->smarty->assign('employees', $employees); $options_time = array(); $time_slice = Configuration::get('APH_CALENDAR_TIME_SLICE'); for ($hours = 0; $hours < 24; $hours++) { // the interval for hours is '1' for ($mins = 0; $mins < 60; $mins += $time_slice) { // the interval for mins is 'APH_CALENDAR_TIME_SLICE' $options_time[str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT)] = str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT); } } $this->context->smarty->assign('options_time', $options_time); $this->context->smarty->assign(array('current_id_lang' => Context::getContext()->language->id, 'link' => Context::getContext()->link, 'current_index' => self::$currentIndex)); $jsVars = array('language' => $this->context->language->iso_code, 'slotDuration' => '00:' . Configuration::get('APH_CALENDAR_TIME_SLICE') . ':00'); $this->setJsVars($jsVars); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/calendar/order.tpl'); return parent::initContent(); }
public function initContent() { parent::initContent(); }
public function initContent() { $this->multiple_fieldsets = true; if (Tools::isSubmit('regenerateThumbnails')) { SimpleBlogPost::regenerateThumbnails(); Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getValue('token') . '&conf=9'); } if (Tools::isSubmit('submitExportSettings')) { header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=ph_simpleblog_configuration_" . date('d-m-Y') . ".txt"); $configs = array(); foreach ($this->fields_options as $category_data) { if (!isset($category_data['fields'])) { continue; } $fields = $category_data['fields']; foreach ($fields as $field => $values) { if ($values['type'] == 'textLang') { $configs[$field] = self::getValueForLangs($field); } else { $configs[$field] = Configuration::get($field); } } } echo serialize($configs); exit; } $this->context->smarty->assign(array('content' => $this->content, 'url_post' => self::$currentIndex . '&token=' . $this->token)); parent::initContent(); }
public function initContent() { $this->show_toolbar = false; parent::initContent(); }
/** * Get view * * @return string */ public function initContent() { if (Context::getContext()->employee->id_profile == Configuration::get('APH_PROFILE_SITE_OWNER')) { $shops = array(); //$_shops = Shop::getShops(true, null, true); $_shops = Shop::getCompleteListOfShopsID(); foreach ($_shops as $id_shop) { if ($id_shop == Configuration::get('PS_SHOP_DEFAULT')) { continue; } $shop = new Shop($id_shop); $shops[$id_shop] = $shop->name; } asort($shops); $this->context->smarty->assign('shops', $shops); } if ($this->display == 'edit') { $obj = $this->loadObject(true); $this->context->smarty->assign(array('obj' => $obj)); // Selected products $selected_products = array(); $products = AphTool::getProducts($obj->id); if (!empty($products)) { foreach ($products as $product) { $selected_products[] = $product['id_product']; } } } if ($this->display == 'add' || $this->display == 'edit') { // Generate category selection tree $tree = new HelperTreeProducts('products-tree', $this->l('Seleziona servizio')); $tree->setInputName('checkBoxProductAsso_tool'); if (!empty($selected_products)) { $tree->setAttribute('selected_products', $selected_products); $tree->setSelectedProducts($selected_products); } $tree->setUseShopRestriction(true); $this->context->smarty->assign('product_tree', $tree->render()); $languages = Language::getLanguages(true); $this->context->smarty->assign(array("id_lang_default" => Configuration::get('PS_LANG_DEFAULT'), 'tpl_dir' => $this->tpl_dir, "languages" => $languages)); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/tools/form.tpl"); } parent::initContent(); }
/** * Get view * * @return string */ public function initContent() { $options_time = array(); $time_slice = Configuration::get('APH_CALENDAR_TIME_SLICE'); for ($hours = 0; $hours < 24; $hours++) { // the interval for hours is '1' for ($mins = 0; $mins < 60; $mins += $time_slice) { // the interval for mins is 'APH_CALENDAR_TIME_SLICE' $options_time[str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT)] = str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT); } } $this->context->smarty->assign('options_time', $options_time); if ($this->display == 'edit') { $obj = $this->loadObject(true); $obj->day_0_1_o = substr($obj->day_0_1_o, 0, 5); $obj->day_0_1_c = substr($obj->day_0_1_c, 0, 5); $obj->day_0_2_o = substr($obj->day_0_2_o, 0, 5); $obj->day_0_2_c = substr($obj->day_0_2_c, 0, 5); $obj->day_1_1_o = substr($obj->day_1_1_o, 0, 5); $obj->day_1_1_c = substr($obj->day_1_1_c, 0, 5); $obj->day_1_2_o = substr($obj->day_1_2_o, 0, 5); $obj->day_1_2_c = substr($obj->day_1_2_c, 0, 5); $obj->day_2_1_o = substr($obj->day_2_1_o, 0, 5); $obj->day_2_1_c = substr($obj->day_2_1_c, 0, 5); $obj->day_2_2_o = substr($obj->day_2_2_o, 0, 5); $obj->day_2_2_c = substr($obj->day_2_2_c, 0, 5); $obj->day_3_1_o = substr($obj->day_3_1_o, 0, 5); $obj->day_3_1_c = substr($obj->day_3_1_c, 0, 5); $obj->day_3_2_o = substr($obj->day_3_2_o, 0, 5); $obj->day_3_2_c = substr($obj->day_3_2_c, 0, 5); $obj->day_4_1_o = substr($obj->day_4_1_o, 0, 5); $obj->day_4_1_c = substr($obj->day_4_1_c, 0, 5); $obj->day_4_2_o = substr($obj->day_4_2_o, 0, 5); $obj->day_4_2_c = substr($obj->day_4_2_c, 0, 5); $obj->day_5_1_o = substr($obj->day_5_1_o, 0, 5); $obj->day_5_1_c = substr($obj->day_5_1_c, 0, 5); $obj->day_5_2_o = substr($obj->day_5_2_o, 0, 5); $obj->day_5_2_c = substr($obj->day_5_2_c, 0, 5); $obj->day_6_1_o = substr($obj->day_6_1_o, 0, 5); $obj->day_6_1_c = substr($obj->day_6_1_c, 0, 5); $obj->day_6_2_o = substr($obj->day_6_2_o, 0, 5); $obj->day_6_2_c = substr($obj->day_6_2_c, 0, 5); $this->context->smarty->assign(array('obj' => $obj)); } if ($this->display == 'add' || $this->display == 'edit') { $shops = Shop::getShops(true, null, false); $languages = Language::getLanguages(true); self::fetchEmployees(); $this->context->smarty->assign(array("id_lang_default" => Configuration::get('PS_LANG_DEFAULT'), 'tpl_dir' => $this->tpl_dir, "languages" => $languages, "shops" => $shops)); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/working_days/form.tpl"); } parent::initContent(); }
public function initContent() { $this->content = $this->renderView(); parent::initContent(); }
/** * Get view * * @return string */ public function initContent() { $features = array(); //$_features = FeatureValue::getFeatureValuesWithLang( (int)Context::getContext()->language->id, Configuration::get('APH_FEATURE_DURATION') ); $services_duration = json_decode(Configuration::get('APH_SERVICES_DURATION'), true); foreach ($services_duration as $id_feature_value => $duration) { if ($duration >= 120) { $features[$id_feature_value] = $duration / 60 . ' ore'; } else { $features[$id_feature_value] = $duration . ' minuti'; } } $this->context->smarty->assign('features', $features); $currency = $this->context->currency; $this->context->smarty->assign('currency', $currency); if (Context::getContext()->employee->id_profile == Configuration::get('APH_PROFILE_SITE_OWNER')) { $shops = array(); //$_shops = Shop::getShops(true, null, true); $_shops = Shop::getCompleteListOfShopsID(); foreach ($_shops as $id_shop) { if ($id_shop == Configuration::get('PS_SHOP_DEFAULT')) { continue; } $shop = new Shop($id_shop); $shops[$id_shop] = $shop->name; } asort($shops); $this->context->smarty->assign('shops', $shops); } if ($this->display == 'edit') { list($this->id_product, $this->id_shop) = explode('-', Tools::getValue('id_ps')); $obj = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('SELECT a.*,pl.name,j.id_feature_value FROM `' . _DB_PREFIX_ . 'product_shop` a' . ' JOIN `' . _DB_PREFIX_ . 'product_lang` pl ON pl.`id_product` = a.`id_product` AND pl.`id_shop`=' . $this->id_shop . ' AND pl.`id_lang`= ' . (int) Context::getContext()->language->id . ' JOIN `' . _DB_PREFIX_ . 'feature_product` j ON j.`id_product` = a.`id_product`' . ' AND j.`id_feature`=' . Configuration::get('APH_FEATURE_DURATION') . ' AND a.`id_shop`=' . $this->id_shop . ' AND a.`id_product`=' . $this->id_product); if ($obj['id_service_duration'] <= 0) { $obj['id_service_duration'] = $obj['id_feature_value']; } $this->context->smarty->assign(array('obj' => $obj)); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/long_prices/form.tpl"); } elseif ($this->display == 'add') { $languages = Language::getLanguages(true); $this->context->smarty->assign(array("id_lang_default" => Configuration::get('PS_LANG_DEFAULT'), 'tpl_dir' => $this->tpl_dir, "languages" => $languages)); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/long_prices/form.tpl"); } parent::initContent(); }
/** * Get view * * @return string */ public function initContent() { $store = $this->loadObject(true); if (!empty($store->hours)) { $store->hours = json_decode($store->hours, true); } else { $store->hours = NULL; } $this->context->smarty->assign(array('store' => $store)); if (Tools::getIsset("updateinfo")) { $this->display = "edit"; $this->context->smarty->assign(array('store' => $store)); self::initTinyMCE(); self::fetchCountries(); self::fetchTimeOptions(); self::initFormImages($store); self::fetchProducts(); $store_tabs = array(); // Set tab to display if not decided already $views_dir = "/views/templates/admin/controllers/store/"; $currentTab = Tools::getIsset('action') ? Tools::getValue('action') : "Informazioni"; foreach ($this->tabs as $x) { $store_tabs[] = array('tpl' => _PS_MODULE_DIR_ . $this->module->name . $views_dir . strtolower(str_replace(" ", "_", $x)) . ".tpl", 'name' => $x); } $languages = Language::getLanguages(true); $this->context->smarty->assign(array('store_tabs' => $store_tabs, "id_lang_default" => Configuration::get('PS_LANG_DEFAULT'), "currentTab" => $currentTab, "languages" => $languages)); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/store/form.tpl"); } elseif ($this->display == 'main') { $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . "/views/templates/admin/controllers/store/overview.tpl"); } parent::initContent(); }
public function initContent() { $id_confirmpayment = (int) Tools::getValue('id_confirmpayment'); $payment = new TableConfirmPayment((int) $id_confirmpayment); if (Tools::isSubmit('paidconfirmpayment')) { // Update State Kondirmasi Pembayaran Db::getInstance()->update('confirmpayment', array('state' => 'PAID'), 'id_confirmpayment = ' . (int) $id_confirmpayment); // Update Status Order Db::getInstance()->update('orders', array('current_state' => '2'), 'id_order = ' . (int) $payment->id_order); // Add Order History State Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'order_history` ( `id_employee` , `id_order` , `id_order_state` , `date_add`) VALUES ( ' . (int) Tools::getValue('id_employee') . ', ' . $payment->id_order . ', 2, "' . Date("Y-m-d h:i:s") . '" );'); // Redirect Link Admin $link = $this->redirect_after = AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&view' . $this->name . '&token=' . $this->token; Tools::redirectAdmin($link); } else { if (Tools::isSubmit('cancelconfirmpayment')) { Db::getInstance()->update('confirmpayment', array('state' => 'CANCEL'), 'id_confirmpayment = ' . (int) $id_confirmpayment); // Redirect Link Admin $link = $this->redirect_after = AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&view' . $this->name . '&token=' . $this->token; Tools::redirectAdmin($link); } else { if (Tools::isSubmit('postponeconfirmpayment')) { Db::getInstance()->update('confirmpayment', array('state' => 'POSTPONE'), 'id_confirmpayment = ' . (int) $id_confirmpayment); // Redirect Link Admin $link = $this->redirect_after = AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&view' . $this->name . '&token=' . $this->token; Tools::redirectAdmin($link); } else { if (Tools::isSubmit('waitingconfirmpayment')) { // Update Status Konfirmasi Pembayaran Db::getInstance()->update('confirmpayment', array('state' => 'WAITING'), 'id_confirmpayment = ' . (int) $id_confirmpayment); // Update Status Order Db::getInstance()->update('orders', array('current_state' => '1'), 'id_order = ' . (int) $payment->id_order); // Add Order History State Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'order_history` ( `id_employee` , `id_order` , `id_order_state` , `date_add`) VALUES ( ' . (int) Tools::getValue('id_employee') . ', ' . $payment->id_order . ', 1, "' . Date("Y-m-d h:i:s") . '" );'); // Redirect Link Admin $link = $this->redirect_after = AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&view' . $this->name . '&token=' . $this->token; Tools::redirectAdmin($link); } } } } parent::initContent(); }
public function initContent() { $this->show_toolbar = false; $this->display = 'view'; parent::initContent(); }
public function initContent() { if ($this->action == "select_delete") { $this->context->smarty->assign(array("delete_form" => true, "url_delete" => htmlentities($_SERVER["REQUEST_URI"]), "boxes" => $this->boxes)); } if (Module::isInstalled("agilemultipleseller")) { include_once _PS_ROOT_DIR_ . "/modules/agilemultipleseller/agilemultipleseller.php"; ${${"GLOBALS"}["ftvyarroe"]} = new AgileMultipleSeller(); $this->displayWarning($module->getL("How To Create Seller Hint")); } parent::initContent(); }
public function ajaxProcessEditCustomPrice() { if ((int) Tools::getValue('id_custom_price') < 1) { return 'Prezzo non trovato.'; } $customPrice = new AphCustomPrice((int) Tools::getValue('id_custom_price')); /*if ($customPrice->price > 0){ $product = new Product($customPrice->id_product); $tax_rate = $product->getTaxesRate(); $tax_rate = ($tax_rate>0) ? (($tax_rate / 100) + 1) : 1; $customPrice->price = round($tax_rate * $customPrice->price, 2); } // Generate product selection tree $tree = new HelperTreeProducts('products-tree', $this->l('Seleziona servizio')); $tree->setAttribute('selected_product', array($customPrice->id_product)); $tree->setSelectedProducts(array($customPrice->id_product)); $tree->setInputName('product'); $tree->setUseRadioBox(true); $tree->setUseActiveProducts(true); $tree->setShowPrice(true); $tree->setUseShopRestriction(true); $tree->setNodeItemTemplate('tree_node_item_radio_products.tpl'); $this->context->smarty->assign('product_tree', $tree->render());*/ $options_time = array(); $time_slice = Configuration::get('APH_CALENDAR_TIME_SLICE'); for ($hours = 0; $hours < 24; $hours++) { // the interval for hours is '1' for ($mins = 0; $mins < 60; $mins += $time_slice) { // the interval for mins is 'APH_CALENDAR_TIME_SLICE' $options_time[str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT)] = str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT); } } $this->context->smarty->assign('options_time', $options_time); $customPrice->time_from = substr($customPrice->from, 11, 5); $customPrice->time_to = substr($customPrice->to, 11, 5); $customPrice->from = substr($customPrice->from, 0, 10); $customPrice->from_lang = date('d/m/Y', strtotime($customPrice->from)); $customPrice->to = substr($customPrice->to, 0, 10); $customPrice->to_lang = date('d/m/Y', strtotime($customPrice->to)); $customPrice->time_start = substr($customPrice->time_start, 0, 5); $customPrice->time_end = substr($customPrice->time_end, 0, 5); if ((int) $customPrice->id_product > 0) { $product = new Product((int) $customPrice->id_product, false, Context::getContext()->language->id, (int) Configuration::get('PS_SHOP_DEFAULT')); $this->context->smarty->assign('id_current_product', (int) $customPrice->id_product); $this->context->smarty->assign('product', $product); if ($customPrice->price_wt < 0) { $customPrice->price_wt = (double) Db::getInstance()->getValue('SELECT `price_wt` FROM ' . _DB_PREFIX_ . 'custom_price WHERE `removable`=\'0\' AND `id_product`=' . (int) $customPrice->id_product . ' AND `id_shop`=' . (int) Context::getContext()->shop->id . ' AND \'' . pSQL(substr($customPrice->from, 0, 10)) . '\' = DATE_FORMAT(`from`,\'%Y-%m-%d\')'); } } $this->context->smarty->assign('custom_price', $customPrice); $this->context->smarty->assign(array('current_id_lang' => Context::getContext()->language->id, 'link' => Context::getContext()->link, 'current_index' => self::$currentIndex)); $jsVars = array('language' => $this->context->language->iso_code, 'slotDuration' => '00:' . Configuration::get('APH_CALENDAR_TIME_SLICE') . ':00'); $this->setJsVars($jsVars); $this->content .= $this->context->smarty->fetch(_PS_MODULE_DIR_ . $this->module->name . '/views/templates/admin/controllers/custom_prices/custom_price.tpl'); return parent::initContent(); }
public function initContent() { $this->context->smarty->assign('apiKey', Configuration::get('CONNECTION_TOKEN')); $this->context->smarty->assign('storeUrl', _PS_BASE_URL_ . __PS_BASE_URI__); parent::initContent(); }