当前位置: 首页>>代码示例>>PHP>>正文


PHP CMS::listCms方法代码示例

本文整理汇总了PHP中CMS::listCms方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS::listCms方法的具体用法?PHP CMS::listCms怎么用?PHP CMS::listCms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMS的用法示例。


在下文中一共展示了CMS::listCms方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getContent

    public function getContent()
    {
        global $cookie;
        $html = '
		<h2>' . $this->l('Payment logo') . '</h2>
		';
        if (Tools::isSubmit('submitConfiguration')) {
            if (Validate::isUnsignedInt(Tools::getValue('id_cms'))) {
                Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', intval(Tools::getValue('id_cms')));
                $html .= $this->displayConfirmation($this->l('Settings are updated'));
            }
        }
        $cmss = CMS::listCms(intval($cookie->id_lang));
        if (!sizeof($cmss)) {
            $html .= $this->displayError($this->l('No CMS page is available'));
        } else {
            $html .= '
			<form action="' . $_SERVER['REQUEST_URI'] . '" method="post">
				<fieldset>
					<legend><img src="' . $this->_path . '/logo.gif" alt="" /> ' . $this->l('Configure') . '</legend>
					<label>' . $this->l('Page CMS for link') . ':</label>
					<div class="margin-form">
						<select name="id_cms">';
            foreach ($cmss as $cms) {
                $html .= '<option value="' . $cms['id_cms'] . '"' . (Configuration::get('PS_PAYMENT_LOGO_CMS_ID') == $cms['id_cms'] ? ' selected="selected"' : '') . '>' . $cms['meta_title'] . '</option>';
            }
            $html .= '</select>
					</div>
					<p class="center"><input class="button" type="submit" name="submitConfiguration" value="' . $this->l('Save settings') . '" /></p>
				</fieldset>
			</form>
			';
        }
        return $html;
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:35,代码来源:blockpaymentlogo.php

示例2: getContent

    public function getContent()
    {
        $html = '
		<h2>' . $this->l('Payment logo.') . '</h2>
		';
        if (Tools::isSubmit('submitConfiguration')) {
            if (Validate::isUnsignedInt(Tools::getValue('id_cms'))) {
                Configuration::updateValue('PS_PAYMENT_LOGO_CMS_ID', (int) Tools::getValue('id_cms'));
                $this->_clearCache('blockpaymentlogo.tpl');
                $html .= $this->displayConfirmation($this->l('The settings have been updated.'));
            }
        }
        $cmss = CMS::listCms($this->context->language->id);
        if (!count($cmss)) {
            $html .= $this->displayError($this->l('No CMS page is available.'));
        } else {
            $html .= '
			<form action="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '" method="post">
				<fieldset>
					<legend><img src="' . $this->_path . '/logo.gif" alt="" /> ' . $this->l('Configure') . '</legend>
					<label>' . $this->l('Page CMS for link') . ':</label>
					<div class="margin-form">
						<select name="id_cms"><option value="0">(' . $this->l('Select a page') . ')</option>';
            foreach ($cmss as $cms) {
                $html .= '<option value="' . $cms['id_cms'] . '"' . (Configuration::get('PS_PAYMENT_LOGO_CMS_ID') == $cms['id_cms'] ? ' selected="selected"' : '') . '>' . $cms['meta_title'] . '</option>';
            }
            $html .= '</select>
					</div>
					<p class="center"><input class="button" type="submit" name="submitConfiguration" value="' . $this->l('Save settings') . '" /></p>
				</fieldset>
			</form>
			';
        }
        return $html;
    }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:35,代码来源:blockpaymentlogo.php

示例3: _displayForm

    private function _displayForm()
    {
        global $cookie;
        $this->_html .= '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post">
			<fieldset>
			<legend>' . $this->l('Selected files displayed') . '</legend>
					<span>' . $this->l('Please check files that will be displayed in this module') . '.</span><br /><br />
					<table cellspacing="0" cellpadding="0" class="table" style="width: 29.5em;">
							<thead>	
								<tr>
									<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
									<th>' . $this->l('ID') . '</th>
									<th>' . $this->l('Name') . '</th>
								</tr>
							</thead>
							<tbody>';
        $cms = CMS::listCms(intval($cookie->id_lang));
        foreach ($cms as $row) {
            $this->_html .= '<tr><td><input type="checkbox" class="noborder" value="' . intval($row['id_cms']) . '" name="categoryBox[]" ' . (CMS::isInBlock(intval($row['id_cms']), intval($this->id)) ? 'checked="checked"' : '') . '></td><td>' . intval($row['id_cms']) . '</td><td>' . $row['meta_title'] . '</td></tr>';
        }
        $this->_html .= '
										</tbody>
									</table>
									<br />
									<input type="submit" name="btnSubmit" class="button" value="' . $this->l('Update') . '">
						</fieldset>
					</form>';
    }
开发者ID:priyankajsr19,项目名称:shalu,代码行数:28,代码来源:blockvariouslinks.php

示例4: __construct

 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();
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:30,代码来源:AdminPreferences.php

示例5: renderForm

 /**
  * @return mixed
  */
 public function renderForm()
 {
     if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj)) {
         $link = $obj->getImageLink();
         if (file_exists($obj->getImageLink(_PS_IMG_DIR_))) {
             $size = round(filesize($obj->getImageLink(_PS_IMG_DIR_)) / 1024);
         }
     }
     $this->fields_form = array('legend' => array('title' => $this->module->l('Block reinsurance', 'AdminBlockReinsurance'), 'icon' => 'icon-list-alt'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Name', 'AdminBlockReinsurance'), 'name' => 'name', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Link', 'AdminBlockReinsurance'), 'name' => 'link', 'lang' => true), array('type' => 'textarea', 'label' => $this->module->l('Description', 'AdminBlockReinsurance'), 'name' => 'description', 'required' => true, 'lang' => true, 'autoload_rte' => true), array('type' => 'file', 'label' => $this->module->l('Image (.png)', 'AdminBlockReinsurance'), 'name' => 'image', 'display_image' => true, 'show_thumbnail' => true, 'image' => isset($link) ? '<img src="' . $link . '"/>' : null, 'size' => isset($size) ? $size : null), array('type' => 'select', 'label' => $this->module->l('CMS page linked', 'AdminBlockReinsurance'), 'name' => 'id_cms', 'required' => true, 'default_value' => 'left', 'options' => array('query' => CMS::listCms($this->context->language->id), 'id' => 'id_cms', 'name' => 'meta_title', 'default' => array('label' => $this->module->l('No cms page', 'AdminBlockReinsurance'), 'value' => 0))), array('type' => 'switch', 'label' => $this->module->l('Enable', 'AdminBlockReinsurance'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminBlockReinsurance')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminBlockReinsurance'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminBlockReinsurance')));
     return parent::renderForm();
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:14,代码来源:AdminBlockReinsurance.php

示例6: renderForm

 /**
  * @return mixed
  */
 public function renderForm()
 {
     if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj)) {
         $link = $obj->getImageLink();
         if (file_exists($obj->getImageLink(_PS_IMG_DIR_))) {
             $size = round(filesize($obj->getImageLink(_PS_IMG_DIR_)) / 1024);
         }
     }
     $this->fields_form = array('legend' => array('title' => $this->module->l('Block Slideshow', 'AdminNowSlideshow'), 'icon' => 'icon-list-alt'), 'input' => array(array('type' => 'text', 'label' => $this->module->l('Name', 'AdminNowSlideshow'), 'name' => 'name', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Title', 'AdminNowSlideshow'), 'name' => 'title', 'required' => true, 'lang' => true), array('type' => 'text', 'label' => $this->module->l('Button name', 'AdminNowSlideshow'), 'name' => 'button_name', 'required' => true, 'lang' => true), array('type' => 'textarea', 'label' => $this->module->l('Description', 'AdminNowSlideshow'), 'name' => 'description', 'required' => true, 'lang' => true, 'autoload_rte' => true), array('type' => 'select', 'label' => $this->module->l('Type of link', 'AdminNowSlideshow'), 'name' => 'type', 'required' => true, 'default_value' => NowSlideshow::TYPE_LINK, 'options' => array('query' => array(array('id_type' => NowSlideshow::TYPE_CATEGORY, 'type' => $this->module->l('Category', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_CMS, 'type' => $this->module->l('CMS', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_LINK, 'type' => $this->module->l('Link', 'AdminNowSlideshow')), array('id_type' => NowSlideshow::TYPE_MANUFACTURER, 'type' => $this->module->l('Manufacturer', 'AdminNowSlideshow'))), 'id' => 'id_type', 'name' => 'type')), array('type' => 'text', 'label' => $this->module->l('ID type', 'AdminNowSlideshow'), 'name' => 'id_type', 'form_group_class' => 'idTypeDiv'), array('type' => 'categories', 'label' => $this->l('Category'), 'name' => 'category', 'tree' => array('id' => 'categories-tree'), 'form_group_class' => 'categoryDiv'), array('type' => 'select', 'label' => $this->module->l('CMS', 'AdminNowSlideshow'), 'name' => 'cms', 'options' => array('query' => CMS::listCms($this->context->language->id), 'id' => 'id_cms', 'name' => 'meta_title'), 'form_group_class' => 'cmsDiv'), array('type' => 'select', 'label' => $this->module->l('Manufacturer', 'AdminNowSlideshow'), 'name' => 'manufacturer', 'options' => array('query' => Manufacturer::getManufacturers(false, $this->context->language->id), 'id' => 'id_manufacturer', 'name' => 'name'), 'form_group_class' => 'manufacturerDiv'), array('type' => 'text', 'label' => $this->module->l('Link', 'AdminNowSlideshow'), 'name' => 'link', 'form_group_class' => 'linkDiv', 'lang' => true), array('type' => 'file', 'label' => $this->module->l('Image (.png)', 'AdminNowSlideshow'), 'name' => 'image', 'display_image' => true, 'show_thumbnail' => true, 'image' => isset($link) ? '<img src="' . $link . '"/>' : null, 'size' => isset($size) ? $size : null), array('type' => 'switch', 'label' => $this->module->l('Enable', 'AdminNowSlideshow'), 'name' => 'active', 'required' => false, 'is_bool' => true, 'values' => array(array('id' => 'active_on', 'value' => 1, 'label' => $this->module->l('Enabled', 'AdminNowSlideshow')), array('id' => 'active_off', 'value' => 0, 'label' => $this->module->l('Disabled', 'AdminNowSlideshow'))))), 'submit' => array('title' => $this->module->l('Save', 'AdminNowSlideshow')));
     return parent::renderForm();
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:14,代码来源:AdminNowSlideshow.php

示例7: renderForm

 public function renderForm()
 {
     if (!($obj = $this->loadObject(true))) {
         return;
     }
     $products = Product::getProducts((int) $this->context->language->id, 0, 0, 'id_product', 'ASC');
     foreach ($products as $product) {
         $productList[] = array('key' => $product['id_product'], 'name' => '(' . $product['id_product'] . ') ' . $product['name']);
     }
     $categories = Category::getSimpleCategories((int) $this->context->language->id);
     foreach ($categories as $category) {
         $categoryList[] = array('key' => $category['id_category'], 'name' => '(' . $category['id_category'] . ') ' . $category['name']);
     }
     $cmss = CMS::listCms();
     foreach ($cmss as $cms) {
         $cmsList[] = array('key' => $cms['id_cms'], 'name' => '(' . $cms['id_cms'] . ') ' . $cms['meta_title']);
     }
     $this->fields_form = array('tinymce' => true, 'legend' => array('title' => $this->l('Slideshow'), 'image' => '../img/admin/cog.gif'), 'input' => array(array('type' => 'text', 'lang' => true, 'label' => $this->l('Name:'), 'name' => 'name', 'size' => 40), array('type' => 'text', 'label' => $this->l('Width:'), 'name' => 'width', 'size' => 10, 'desc' => $this->l('If you change the width of the it will be necessary to upload images again')), array('type' => 'text', 'label' => $this->l('Height:'), 'name' => 'height', 'size' => 10, 'desc' => $this->l('If you change the height of the it will be necessary to upload images again')), array('type' => 'select', 'label' => $this->l('Effect:'), 'name' => 'effect', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('random')), array('key' => 1, 'name' => $this->l('swirl')), array('key' => 2, 'name' => $this->l('rain')), array('key' => 3, 'name' => $this->l('straight'))), 'name' => 'name', 'id' => 'key')), array('type' => 'text', 'label' => $this->l('Squares per width:'), 'name' => 'spw', 'size' => 10, 'desc' => $this->l('large number can cause transitions problems, Example: 7')), array('type' => 'text', 'label' => $this->l('Squares per height:'), 'name' => 'sph', 'size' => 10, 'desc' => $this->l('large number can cause transitions problems, Example: 5')), array('type' => 'text', 'label' => $this->l('Delay:'), 'name' => 'delay', 'size' => 10, 'desc' => $this->l('delay between images in ms, Example: 3000')), array('type' => 'text', 'label' => $this->l('Square delay:'), 'name' => 'sDelay', 'size' => 10, 'desc' => $this->l('delay beetwen squares in ms. Example: 30')), array('type' => 'text', 'label' => $this->l('Opacity:'), 'name' => 'opacity', 'size' => 10, 'desc' => $this->l('opacity of title and navigation. Example: 0.7')), array('type' => 'text', 'label' => $this->l('Title speed:'), 'name' => 'titleSpeed', 'size' => 10, 'desc' => $this->l('speed of title appereance in ms. Example: 500')), array('type' => 'select', 'label' => $this->l('Navigation:'), 'name' => 'navigation', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Links:'), 'name' => 'links', 'desc' => $this->l('Enable links.'), 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Hover pause:'), 'name' => 'hoverpause', 'desc' => $this->l('pause on hover.'), 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Show on home:'), 'name' => 'home', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Show on all category:'), 'name' => 'showOnCat', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Categories:'), 'name' => 'categories[]', 'id' => 'categories', 'options' => array('query' => $categoryList, 'name' => 'name', 'id' => 'key'), 'multiple' => true, 'desc' => $this->l('Choose one or several category s page where the slideshow will be displayed.')), array('type' => 'select', 'label' => $this->l('Show on all product:'), 'name' => 'showOnProd', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Products:'), 'name' => 'products[]', 'id' => 'products', 'options' => array('query' => $productList, 'name' => 'name', 'id' => 'key'), 'multiple' => true, 'desc' => $this->l('Choose one or several product s page where the slideshow will be displayed.')), array('type' => 'select', 'label' => $this->l('Show on all cms page:'), 'name' => 'showOnCms', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('no')), array('key' => 1, 'name' => $this->l('yes'))), 'name' => 'name', 'id' => 'key')), array('type' => 'select', 'label' => $this->l('Cms:'), 'name' => 'cms[]', 'id' => 'cms', 'options' => array('query' => $cmsList, 'name' => 'name', 'id' => 'key'), 'multiple' => true, 'desc' => $this->l('Choose one or several cms s page where the slideshow will be displayed.')), array('type' => 'select', 'label' => $this->l('Hook:'), 'name' => 'hook', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('name' => 'displayTop'), array('name' => 'displayHome'), array('name' => 'displayLeftColumn'), array('name' => 'displayRightColumn'), array('name' => 'displayOpartSlideshowHook')), 'name' => 'name', 'id' => 'name'), 'desc' => $this->l('You must hook the module for display your slideshow on each position. Go to modules/positions menu for setup this')), array('type' => 'select', 'label' => $this->l('Statut:'), 'name' => 'active', 'cast' => 'strval', 'identifier' => 'mode', 'options' => array('query' => array(array('key' => 0, 'name' => $this->l('disable')), array('key' => 1, 'name' => $this->l('enable'))), 'name' => 'name', 'id' => 'key'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
     if (is_numeric($obj->id)) {
         //products value
         $sql = 'SELECT id_product FROM ' . _DB_PREFIX_ . 'opartslideshow_slideshow_product WHERE id_opartslideshow_slideshow = ' . $obj->id;
         $array = Db::getInstance()->executeS($sql);
         if (count($array)) {
             foreach ($array as $row) {
                 $productValues[] = $row['id_product'];
             }
             $this->fields_value['products[]'] = $productValues;
         }
         //categories value
         $sql = 'SELECT id_category FROM ' . _DB_PREFIX_ . 'opartslideshow_slideshow_category WHERE id_opartslideshow_slideshow = ' . $obj->id;
         $array = Db::getInstance()->executeS($sql);
         if (count($array)) {
             foreach ($array as $row) {
                 $categoriesValues[] = $row['id_category'];
             }
             $this->fields_value['categories[]'] = $categoriesValues;
         }
         //cms value
         $sql = 'SELECT id_cms FROM ' . _DB_PREFIX_ . 'opartslideshow_slideshow_cms WHERE id_opartslideshow_slideshow = ' . $obj->id;
         $array = Db::getInstance()->executeS($sql);
         if (count($array)) {
             foreach ($array as $row) {
                 $cmsValues[] = $row['id_cms'];
             }
             $this->fields_value['cms[]'] = $cmsValues;
         }
     }
     $html = $header = $this->context->smarty->fetch(parent::getTemplatePath() . 'header.tpl');
     $html .= parent::renderForm();
     return $html;
 }
开发者ID:AmineBENCHEIKHBRAHIM,项目名称:LnsTech-Prestashop-WebSite,代码行数:51,代码来源:AdminSlideshowController.php

示例8: __construct

 public function __construct()
 {
     $this->className = 'Configuration';
     $this->table = 'configuration';
     parent::__construct();
     // List of CMS tabs
     $cms_tab = array(0 => array('id' => 0, 'name' => $this->l('None')));
     foreach (CMS::listCms($this->context->language->id) as $cms_file) {
         $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']);
     }
     // List of order process types
     $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')));
     $this->fields_options = array('general' => array('title' => $this->l('General'), 'icon' => 'tab-preferences', 'fields' => array('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('Guests can place an order without registering'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_PURCHASE_MINIMUM' => array('title' => $this->l('Minimum purchase total required in order to validate order'), 'desc' => $this->l('Set to 0 to disable this feature'), 'validation' => 'isFloat', 'cast' => 'floatval', 'type' => 'price'), 'PS_ALLOW_MULTISHIPPING' => array('title' => $this->l('Allow multi-shipping'), 'desc' => $this->l('Allow the customer to ship his order to multiple addresses. This option will convert the customer\'s cart into one or more orders.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_SHIP_WHEN_AVAILABLE' => array('title' => $this->l('Delayed shipping'), 'desc' => $this->l('Allow the customer to split his order: one with the products currently "in stock", and another with the other products. This option will convert the customer\'s cart into two orders.'), '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 CMS page'), 'desc' => $this->l('Choose the Conditions of use CMS page'), 'validation' => 'isInt', 'type' => 'select', 'list' => $cms_tab, 'identifier' => 'id', 'cast' => 'intval'))), 'gift' => array('title' => $this->l('Gift options'), 'icon' => 'tab-preferences', 'fields' => array('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-wrapping price'), 'desc' => $this->l('Set a price for gift-wrapping'), 'validation' => 'isPrice', 'cast' => 'floatval', 'type' => 'price'), 'PS_GIFT_WRAPPING_TAX_RULES_GROUP' => array('title' => $this->l('Gift-wrapping tax'), 'desc' => $this->l('Set a tax for gift-wrapping'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => array_merge(array(array('id_tax_rules_group' => 0, 'name' => $this->l('None'))), TaxRulesGroup::getTaxRulesGroups(true)), 'identifier' => 'id_tax_rules_group'), 'PS_RECYCLABLE_PACK' => array('title' => $this->l('Offer recycled packaging'), 'desc' => $this->l('Suggest recycled packaging to customer'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool')), 'submit' => array('title' => $this->l('Save'), 'class' => 'button')));
 }
开发者ID:jicheng17,项目名称:pengwine,代码行数:14,代码来源:AdminOrderPreferencesController.php

示例9: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->className = 'Configuration';
     $this->table = 'configuration';
     parent::__construct();
     // List of CMS tabs
     $cms_tab = array(0 => array('id' => 0, 'name' => $this->l('None')));
     foreach (CMS::listCms($this->context->language->id) as $cms_file) {
         $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']);
     }
     // List of order process types
     $order_process_type = array(array('value' => PS_ORDER_PROCESS_STANDARD, 'name' => $this->l('Standard (Five steps)')), array('value' => PS_ORDER_PROCESS_OPC, 'name' => $this->l('One-page checkout')));
     $this->fields_options = array('general' => array('title' => $this->l('General'), 'icon' => 'icon-cogs', 'fields' => array('PS_ORDER_PROCESS_TYPE' => array('title' => $this->l('Order process type'), 'hint' => $this->l('Please choose either the five-step or one-page checkout process.'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => $order_process_type, 'identifier' => 'value'), 'PS_GUEST_CHECKOUT_ENABLED' => array('title' => $this->l('Enable guest checkout'), 'hint' => $this->l('Allow guest visitors to place an order without registering.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISALLOW_HISTORY_REORDERING' => array('title' => $this->l('Disable Reordering Option'), 'hint' => $this->l('Disable the option to allow customers to reorder in one click from the order history page (required in some European countries).'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_PURCHASE_MINIMUM' => array('title' => $this->l('Minimum purchase total required in order to validate the order'), 'hint' => $this->l('Set to 0 to disable this feature.'), 'validation' => 'isFloat', 'cast' => 'floatval', 'type' => 'price'), 'PS_ALLOW_MULTISHIPPING' => array('title' => $this->l('Allow multishipping'), 'hint' => $this->l('Allow the customer to ship orders to multiple addresses. This option will convert the customer\'s cart into one or more orders.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_SHIP_WHEN_AVAILABLE' => array('title' => $this->l('Delayed shipping'), 'hint' => $this->l('Allows you to delay shipping at your customers\' request. '), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CONDITIONS' => array('title' => $this->l('Terms of service'), 'hint' => $this->l('Require customers to accept or decline terms of service before processing an order.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'js' => array('on' => 'onchange="changeCMSActivationAuthorization()"', 'off' => 'onchange="changeCMSActivationAuthorization()"')), 'PS_CONDITIONS_CMS_ID' => array('title' => $this->l('CMS page for the Conditions of use'), 'hint' => $this->l('Choose the CMS page which contains your store\'s conditions of use.'), 'validation' => 'isInt', 'type' => 'select', 'list' => $cms_tab, 'identifier' => 'id', 'cast' => 'intval')), 'submit' => array('title' => $this->l('Save'))), 'gift' => array('title' => $this->l('Gift options'), 'icon' => 'icon-gift', 'fields' => array('PS_GIFT_WRAPPING' => array('title' => $this->l('Offer gift wrapping'), 'hint' => $this->l('Suggest gift-wrapping to customers.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_GIFT_WRAPPING_PRICE' => array('title' => $this->l('Gift-wrapping price'), 'hint' => $this->l('Set a price for gift wrapping.'), 'validation' => 'isPrice', 'cast' => 'floatval', 'type' => 'price'), 'PS_GIFT_WRAPPING_TAX_RULES_GROUP' => array('title' => $this->l('Gift-wrapping tax'), 'hint' => $this->l('Set a tax for gift wrapping.'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => array_merge(array(array('id_tax_rules_group' => 0, 'name' => $this->l('None'))), TaxRulesGroup::getTaxRulesGroups(true)), 'identifier' => 'id_tax_rules_group'), 'PS_RECYCLABLE_PACK' => array('title' => $this->l('Offer recycled packaging'), 'hint' => $this->l('Suggest recycled packaging to customer.'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool')), 'submit' => array('title' => $this->l('Save'))));
     if (!Configuration::get('PS_ALLOW_MULTISHIPPING')) {
         unset($this->fields_options['general']['fields']['PS_ALLOW_MULTISHIPPING']);
     }
 }
开发者ID:NathanGiesbrecht,项目名称:PrestaShopAutomationFramework,代码行数:18,代码来源:AdminOrderPreferencesController.php

示例10: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->className = 'Configuration';
     $this->table = 'configuration';
     parent::__construct();
     // List of CMS tabs
     $cms_tab = array(0 => array('id' => 0, 'name' => $this->trans('None', array(), 'Admin.Global')));
     foreach (CMS::listCms($this->context->language->id) as $cms_file) {
         $cms_tab[] = array('id' => $cms_file['id_cms'], 'name' => $cms_file['meta_title']);
     }
     $this->fields_options = array('general' => array('title' => $this->trans('General', array(), 'Admin.Global'), 'icon' => 'icon-cogs', 'fields' => array('PS_FINAL_SUMMARY_ENABLED' => array('title' => $this->trans('Enable final summary', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Display an overview of the addresses, shipping method and cart just before the order button (required in some European countries).', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_GUEST_CHECKOUT_ENABLED' => array('title' => $this->trans('Enable guest checkout', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Allow guest visitors to place an order without registering.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_DISALLOW_HISTORY_REORDERING' => array('title' => $this->trans('Disable Reordering Option', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Disable the option to allow customers to reorder in one click from the order history page (required in some European countries).', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_PURCHASE_MINIMUM' => array('title' => $this->trans('Minimum purchase total required in order to validate the order', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Set to 0 to disable this feature.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isFloat', 'cast' => 'floatval', 'type' => 'price'), 'PS_ORDER_RECALCULATE_SHIPPING' => array('title' => $this->trans('Recalculate shipping cost after order edition', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Automatically updates the shipping costs when you edit an order.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_ALLOW_MULTISHIPPING' => array('title' => $this->trans('Allow multishipping', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Allow the customer to ship orders to multiple addresses. This option will convert the customer\'s cart into one or more orders.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_SHIP_WHEN_AVAILABLE' => array('title' => $this->trans('Delayed shipping', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Allows you to delay shipping at your customers\' request.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_CONDITIONS' => array('title' => $this->trans('Terms of service', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Require customers to accept or decline terms of service before processing an order.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool', 'js' => array('on' => 'onchange="changeCMSActivationAuthorization()"', 'off' => 'onchange="changeCMSActivationAuthorization()"')), 'PS_CONDITIONS_CMS_ID' => array('title' => $this->trans('Page for the Terms and conditions', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Choose the page which contains your store\'s terms and conditions of use.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isInt', 'type' => 'select', 'list' => $cms_tab, 'identifier' => 'id', 'cast' => 'intval')), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))), 'gift' => array('title' => $this->trans('Gift options', array(), 'Admin.ShopParameters.Feature'), 'icon' => 'icon-gift', 'fields' => array('PS_GIFT_WRAPPING' => array('title' => $this->trans('Offer gift wrapping', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Suggest gift-wrapping to customers.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'), 'PS_GIFT_WRAPPING_PRICE' => array('title' => $this->trans('Gift-wrapping price', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Set a price for gift wrapping.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isPrice', 'cast' => 'floatval', 'type' => 'price'), 'PS_GIFT_WRAPPING_TAX_RULES_GROUP' => array('title' => $this->trans('Gift-wrapping tax', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Set a tax for gift wrapping.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'select', 'list' => array_merge(array(array('id_tax_rules_group' => 0, 'name' => $this->trans('None'))), TaxRulesGroup::getTaxRulesGroups(true)), 'identifier' => 'id_tax_rules_group'), 'PS_RECYCLABLE_PACK' => array('title' => $this->trans('Offer recycled packaging', array(), 'Admin.ShopParameters.Feature'), 'hint' => $this->trans('Suggest recycled packaging to customer.', array(), 'Admin.ShopParameters.Help'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool')), 'submit' => array('title' => $this->trans('Save', array(), 'Admin.Actions'))));
     if (!Configuration::get('PS_ALLOW_MULTISHIPPING')) {
         unset($this->fields_options['general']['fields']['PS_ALLOW_MULTISHIPPING']);
     }
     if (Configuration::get('PS_ATCP_SHIPWRAP')) {
         unset($this->fields_options['gift']['fields']['PS_GIFT_WRAPPING_TAX_RULES_GROUP']);
     }
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:19,代码来源:AdminOrderPreferencesController.php

示例11: __construct

 public function __construct()
 {
     global $cookie;
     $this->className = 'Configuration';
     $this->table = 'configuration';
     $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' => 'text', 'size' => 15, '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_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 CMS page'), 'desc' => $this->l('Choose the Conditions of use 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-wrapping price'), '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('Attachment maximum size'), 'desc' => $this->l('Set the maximum size of attachment files (in MegaBytes)'), 'validation' => 'isInt', 'cast' => 'intval', 'type' => 'text'), '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('Cart re-display at login'), 'desc' => $this->l('After customer logs in, recall and display contents of his/her last shopping cart'), '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'));
     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');
     }
     parent::__construct();
 }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:22,代码来源:AdminPreferences.php

示例12: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->table = 'now_block_customer_references';
     $this->className = 'NowBlockCustomerReferences';
     $this->module = new now_block_customer_references();
     $this->lang = true;
     $this->_defaultOrderBy = 'position';
     $this->orderBy = 'position';
     $this->position_identifier = 'position';
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     $this->bulk_actions = array('delete' => array('text' => $this->module->l('Delete selected', 'AdminBlockCustomerReferences'), 'confirm' => $this->module->l('Delete selected items?', 'AdminBlockCustomerReferences'), 'icon' => 'icon-trash'));
     $this->context = Context::getContext();
     $this->fieldImageSettings = array('name' => 'image', 'dir' => 'now_block_customer_references');
     $this->imageType = 'png';
     $this->fields_list = array('id_now_block_customer_references' => array('title' => $this->module->l('ID', 'AdminBlockCustomerReferences'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'image' => array('title' => $this->module->l('Image', 'AdminBlockCustomerReferences'), 'align' => 'center', 'image' => 'now_block_customer_references', 'class' => 'fixed-width-xs', 'orderby' => false, 'search' => false), 'name' => array('title' => $this->module->l('Name', 'AdminBlockCustomerReferences'), 'width' => 'auto'), 'active' => array('title' => $this->module->l('Enabled', 'AdminBlockCustomerReferences'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'position' => array('title' => $this->module->l('Position', 'AdminBlockCustomerReferences'), 'filter_key' => 'a!position', 'position' => 'position', 'align' => 'center'), 'date_upd' => array('title' => $this->module->l('Updated Date', 'AdminBlockCustomerReferences'), 'width' => 'auto', 'type' => 'datetime'));
     $aCmsList = array();
     foreach (CMS::listCms($this->context->language->id) as $aRow) {
         $aCmsList[] = array('id_cms' => $aRow['id_cms'], 'name' => $aRow['meta_title']);
     }
     parent::__construct();
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:23,代码来源:AdminBlockCustomerReferences.php

示例13: __construct

 public function __construct()
 {
     $this->bootstrap = true;
     $this->table = 'now_block_presentation';
     $this->className = 'NowBlockPresentation';
     $this->module = new now_block_presentation();
     $this->lang = true;
     $this->_defaultOrderBy = 'position';
     $this->orderBy = 'position';
     $this->position_identifier = 'position';
     $this->addRowAction('edit');
     $this->addRowAction('delete');
     $this->bulk_actions = array('delete' => array('text' => $this->module->l('Delete selected', 'AdminBlockPresentation'), 'confirm' => $this->module->l('Delete selected items?', 'AdminBlockPresentation'), 'icon' => 'icon-trash'));
     $this->context = Context::getContext();
     $this->fieldImageSettings = array('name' => 'image', 'dir' => 'now_block_presentation');
     $this->imageType = 'png';
     $this->fields_list = array('id_now_block_presentation' => array('title' => $this->module->l('ID', 'AdminBlockPresentation'), 'align' => 'center', 'class' => 'fixed-width-xs'), 'image' => array('title' => $this->module->l('Image', 'AdminBlockPresentation'), 'align' => 'center', 'image' => 'now_block_presentation', 'class' => 'fixed-width-xs', 'orderby' => false, 'search' => false), 'name' => array('title' => $this->module->l('Name', 'AdminBlockPresentation'), 'width' => 'auto'), 'active' => array('title' => $this->module->l('Enabled', 'AdminBlockPresentation'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false, 'class' => 'fixed-width-sm'), 'position' => array('title' => $this->module->l('Position', 'AdminBlockPresentation'), 'filter_key' => 'a!position', 'position' => 'position', 'align' => 'center'), 'date_upd' => array('title' => $this->module->l('Updated Date', 'AdminBlockPresentation'), 'width' => 'auto', 'type' => 'datetime'));
     $aCmsList = array();
     foreach (CMS::listCms($this->context->language->id) as $aRow) {
         $aCmsList[] = array('id_cms' => $aRow['id_cms'], 'name' => $aRow['meta_title']);
     }
     $this->fields_options = array('contact' => array('title' => $this->module->l('Presentation of the company option', 'AdminBlockPresentation'), 'fields' => array('NOW_PRESENTATION_CMS_ID' => array('title' => $this->module->l('CMS Page', 'AdminBlockPresentation'), 'desc' => $this->module->l('CMS page witch redirect when to click on the button "EN SAVOIR PLUS sur neon flexible"', 'AdminBlockPresentation'), 'cast' => 'intval', 'type' => 'select', 'identifier' => 'id_cms', 'list' => $aCmsList, 'visibility' => Shop::CONTEXT_ALL)), 'submit' => array('title' => $this->module->l('Save', 'AdminBlockPresentation'))));
     parent::__construct();
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:24,代码来源:AdminBlockPresentation.php

示例14: getContent

    public function getContent()
    {
        global $cookie;
        if (Tools::isSubmit('submitBlocktopmenu')) {
            if (Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'))) {
                $this->_html .= $this->displayConfirmation($this->l('Settings Updated'));
            } else {
                $this->_html .= $this->displayError($this->l('Unable to update settings'));
            }
            Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', (bool) Tools::getValue('search'));
        }
        if (Tools::isSubmit('submitBlocktopmenuLinks')) {
            if (Tools::getValue('link') == '') {
                $this->_html .= $this->displayError($this->l('Unable to add this link'));
            } else {
                MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0));
                $this->_html .= $this->displayConfirmation($this->l('The link has been added'));
            }
        }
        if (Tools::isSubmit('submitBlocktopmenuRemove')) {
            $id_link = Tools::getValue('id_link', 0);
            MenuTopLinks::remove($id_link);
            Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK' . $id_link . ',', 'LNK' . $id_link), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
            $this->_html .= $this->displayConfirmation($this->l('The link has been removed'));
        }
        $this->_html .= '
    <fieldset>
      <legend><img src="' . $this->_path . 'logo.gif" alt="" title="" />' . $this->l('Settings') . '</legend>
      <form action="' . $_SERVER['REQUEST_URI'] . '" method="post" id="form">
        <div style="display: none">
  			<label>' . $this->l('Items') . '</label>
  			<div class="margin-form">
          <input type="text" name="items" id="itemsInput" value="' . Configuration::get('MOD_BLOCKTOPMENU_ITEMS') . '" size="70" />
  			</div>
  			</div>

        <div class="clear">&nbsp;</div>
        <table style="margin-left: 130px;">
          <tbody>
            <tr>
              <td>
				        <select multiple="multiple" id="items" style="width: 300px; height: 160px;">';
        $this->makeMenuOption();
        $this->_html .= '</select><br/>
                <br/>
				        <a href="#" id="removeItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);">' . $this->l('Remove') . ' &gt;&gt;</a>
              </td>
              <td style="padding-left: 20px;">
                <select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
        // BEGIN CMS
        $this->_html .= '<optgroup label="' . $this->l('CMS') . '">';
        $_cms = CMS::listCms($cookie->id_lang);
        foreach ($_cms as $cms) {
            $this->_html .= '<option value="CMS' . $cms['id_cms'] . '" style="margin-left:10px;">' . $cms['meta_title'] . '</option>';
        }
        $this->_html .= '</optgroup>';
        // END CMS
        // BEGIN SUPPLIER
        $this->_html .= '<optgroup label="' . $this->l('Supplier') . '">';
        $suppliers = Supplier::getSuppliers(false, $cookie->id_lang);
        foreach ($suppliers as $supplier) {
            $this->_html .= '<option value="SUP' . $supplier['id_supplier'] . '" style="margin-left:10px;">' . $supplier['name'] . '</option>';
        }
        $this->_html .= '</optgroup>';
        // END SUPPLIER
        // BEGIN Manufacturer
        $this->_html .= '<optgroup label="' . $this->l('Manufacturer') . '">';
        $manufacturers = Manufacturer::getManufacturers(false, $cookie->id_lang);
        foreach ($manufacturers as $manufacturer) {
            $this->_html .= '<option value="MAN' . $manufacturer['id_manufacturer'] . '" style="margin-left:10px;">' . $manufacturer['name'] . '</option>';
        }
        $this->_html .= '</optgroup>';
        // END Manufacturer
        // BEGIN Categories
        $this->_html .= '<optgroup label="' . $this->l('Categories') . '">';
        $this->getCategoryOption(1, $cookie->id_lang);
        $this->_html .= '</optgroup>';
        // END Categories
        // BEGIN Products
        $this->_html .= '<optgroup label="' . $this->l('Products') . '">';
        $this->_html .= '<option value="PRODUCT" style="margin-left:10px;font-style:italic">' . $this->l('Choose ID product') . '</option>';
        $this->_html .= '</optgroup>';
        // END Products
        // BEGIN Menu Top Links
        $this->_html .= '<optgroup label="' . $this->l('Menu Top Links') . '">';
        $links = MenuTopLinks::gets($cookie->id_lang);
        foreach ($links as $link) {
            $this->_html .= '<option value="LNK' . $link['id_link'] . '" style="margin-left:10px;">' . $link['label'] . '</option>';
        }
        $this->_html .= '</optgroup>';
        // END Menu Top Links
        $this->_html .= '</select><br />
                <br />
                <a href="#" id="addItem" style="border: 1px solid rgb(170, 170, 170); margin: 2px; padding: 2px; text-align: center; display: block; text-decoration: none; background-color: rgb(250, 250, 250); color: rgb(18, 52, 86);">&lt;&lt; ' . $this->l('Add') . '</a>			
              </td>
            </tr>
          </tbody>
        </table>
        <div class="clear">&nbsp;</div>
        <script type="text/javascript">
//.........这里部分代码省略.........
开发者ID:greench,项目名称:prestashop,代码行数:101,代码来源:blocktopmenu.php

示例15: hookFooter

 /**
  * Returns module content
  *
  * @param array $params Parameters
  * @return string Content
  */
 function hookFooter($params)
 {
     global $smarty, $cookie;
     $smarty->caching = 0;
     $cms = CMS::listCms($cookie->id_lang, $this->id);
     $id_cms = array();
     $rewlink = array();
     foreach ($cms as $row) {
         $id_cms[] = intval($row['id_cms']);
     }
     $links = CMS::getLinks($cookie->id_lang, $id_cms);
     for ($x = 0; $x < count($links); $x++) {
         $l = $links[$x]["link"];
         $s = strpos($l, "/prestashop/");
         $links[$x]["link"] = substr($l, $s);
     }
     //                echo("<pre>");   print_r($links);   echo("</pre>");
     $smarty->assign('cmslinks', $links);
     return $this->display(__FILE__, 'blockvariouslinks.tpl');
 }
开发者ID:redb,项目名称:prestashop,代码行数:26,代码来源:blockvariouslinks.php


注:本文中的CMS::listCms方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。