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


PHP Manufacturer::getManufacturers方法代码示例

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


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

示例1: hookLeftColumn

 public function hookLeftColumn($params)
 {
     if (!$this->isCached('blockmanufacturer.tpl', $this->getCacheId())) {
         $this->smarty->assign(array('manufacturers' => Manufacturer::getManufacturers(), 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS')));
     }
     return $this->display(__FILE__, 'blockmanufacturer.tpl', $this->getCacheId());
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:7,代码来源:blockmanufacturer.php

示例2: renderForm

 public function renderForm()
 {
     if (!$this->object->id) {
         $this->object->price = -1;
     }
     $this->fields_form = array('legend' => array('title' => $this->l('Catalog price rules'), 'icon' => 'icon-dollar'), 'input' => array(array('type' => 'text', 'label' => $this->l('Name'), 'name' => 'name', 'maxlength' => 32, 'required' => true, 'hint' => $this->l('Forbidden characters') . ' <>;=#{}'), array('type' => 'select', 'label' => $this->l('Shop'), 'name' => 'shop_id', 'options' => array('query' => Shop::getShops(), 'id' => 'id_shop', 'name' => 'name'), 'condition' => Shop::isFeatureActive(), 'default_value' => Shop::getContextShopID()), array('type' => 'select', 'label' => $this->l('Currency'), 'name' => 'id_currency', 'options' => array('query' => array_merge(array(0 => array('id_currency' => 0, 'name' => $this->l('All currencies'))), Currency::getCurrencies()), 'id' => 'id_currency', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Country'), 'name' => 'id_country', 'options' => array('query' => array_merge(array(0 => array('id_country' => 0, 'name' => $this->l('All countries'))), Country::getCountries((int) $this->context->language->id)), 'id' => 'id_country', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Group'), 'name' => 'id_group', 'options' => array('query' => array_merge(array(0 => array('id_group' => 0, 'name' => $this->l('All groups'))), Group::getGroups((int) $this->context->language->id)), 'id' => 'id_group', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('From quantity'), 'name' => 'from_quantity', 'maxlength' => 10, 'required' => true), array('type' => 'text', 'label' => $this->l('Price (tax excl.)'), 'name' => 'price', 'disabled' => $this->object->price == -1 ? 1 : 0, 'maxlength' => 10, 'suffix' => $this->context->currency->getSign('right')), array('type' => 'checkbox', 'name' => 'leave_bprice', 'values' => array('query' => array(array('id' => 'on', 'name' => $this->l('Leave base price'), 'val' => '1', 'checked' => '1')), 'id' => 'id', 'name' => 'name')), array('type' => 'datetime', 'label' => $this->l('From'), 'name' => 'from'), array('type' => 'datetime', 'label' => $this->l('To'), 'name' => 'to'), array('type' => 'select', 'label' => $this->l('Reduction type'), 'name' => 'reduction_type', 'options' => array('query' => array(array('reduction_type' => 'amount', 'name' => $this->l('Amount')), array('reduction_type' => 'percentage', 'name' => $this->l('Percentage'))), 'id' => 'reduction_type', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Reduction with or without taxes'), 'name' => 'reduction_tax', 'align' => 'center', 'options' => array('query' => array(array('lab' => $this->l('Tax included'), 'val' => 1), array('lab' => $this->l('Tax excluded'), 'val' => 0)), 'id' => 'val', 'name' => 'lab')), array('type' => 'text', 'label' => $this->l('Reduction'), 'name' => 'reduction', 'required' => true)), 'submit' => array('title' => $this->l('Save')));
     if (($value = $this->getFieldValue($this->object, 'price')) != -1) {
         $price = number_format($value, 6);
     } else {
         $price = '';
     }
     $this->fields_value = array('price' => $price, 'from_quantity' => ($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1, 'reduction' => number_format(($value = $this->getFieldValue($this->object, 'reduction')) ? $value : 0, 6), 'leave_bprice_on' => $price ? 0 : 1);
     $attribute_groups = array();
     $attributes = Attribute::getAttributes((int) $this->context->language->id);
     foreach ($attributes as $attribute) {
         if (!isset($attribute_groups[$attribute['id_attribute_group']])) {
             $attribute_groups[$attribute['id_attribute_group']] = array('id_attribute_group' => $attribute['id_attribute_group'], 'name' => $attribute['attribute_group']);
         }
         $attribute_groups[$attribute['id_attribute_group']]['attributes'][] = array('id_attribute' => $attribute['id_attribute'], 'name' => $attribute['name']);
     }
     $features = Feature::getFeatures((int) $this->context->language->id);
     foreach ($features as &$feature) {
         $feature['values'] = FeatureValue::getFeatureValuesWithLang((int) $this->context->language->id, $feature['id_feature'], true);
     }
     $this->tpl_form_vars = array('manufacturers' => Manufacturer::getManufacturers(), 'suppliers' => Supplier::getSuppliers(), 'attributes_group' => $attribute_groups, 'features' => $features, 'categories' => Category::getSimpleCategories((int) $this->context->language->id), 'conditions' => $this->object->getConditions(), 'is_multishop' => Shop::isFeatureActive());
     return parent::renderForm();
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:27,代码来源:AdminSpecificPriceRuleController.php

示例3: hookHome

 function hookHome($params)
 {
     global $smarty, $cookie;
     $manufacturer = Manufacturer::getManufacturers(false, $cookie->id_lang, true);
     $smarty->assign(array('manufacturer' => $manufacturer));
     return $this->display(__FILE__, 'tdmanufacturerblock.tpl');
 }
开发者ID:reshman,项目名称:swkart-presta,代码行数:7,代码来源:tdmanufacturerblock.php

示例4: 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

示例5: hookdisplayGroupSports

 public function hookdisplayGroupSports($params)
 {
     if (!$this->isCached('brandsslider.tpl', $this->getCacheId())) {
         $manufacturers = Manufacturer::getManufacturers();
         foreach ($manufacturers as $key => $item) {
             foreach ($manufacturers as &$item) {
                 $item['image'] = $item['id_manufacturer'] . '-brand-136x69.jpg';
             }
         }
         $this->smarty->assign('manufacturers', $manufacturers);
     }
     return $this->display(__FILE__, 'brandsslider.tpl', $this->getCacheId());
 }
开发者ID:abdoumej,项目名称:libsamy,代码行数:13,代码来源:brandsslider.php

示例6: hookLeftColumn

 public function hookLeftColumn($params)
 {
     if (!$this->isCached('blockmanufacturer.tpl', $this->getCacheId())) {
         $manufacturers = Manufacturer::getManufacturers();
         foreach ($manufacturers as &$manufacturer) {
             $manufacturer['image'] = $this->context->language->iso_code . '-default';
             if (file_exists(_PS_MANU_IMG_DIR_ . $manufacturer['id_manufacturer'] . '-' . ImageType::getFormatedName('medium') . '.jpg')) {
                 $manufacturer['image'] = $manufacturer['id_manufacturer'];
             }
         }
         $this->smarty->assign(array('manufacturers' => $manufacturers, 'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'), 'text_list_nb' => Configuration::get('MANUFACTURER_DISPLAY_TEXT_NB'), 'form_list' => Configuration::get('MANUFACTURER_DISPLAY_FORM'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS')));
     }
     return $this->display(__FILE__, 'blockmanufacturer.tpl', $this->getCacheId());
 }
开发者ID:zangles,项目名称:lennyba,代码行数:14,代码来源:blockmanufacturer.php

示例7: hookDisplayHome

 public function hookDisplayHome($params)
 {
     if (!$this->isCached('tmbrandlogo.tpl', $this->getCacheId())) {
         $manufacturers = Manufacturer::getManufacturers();
         foreach ($manufacturers as &$manufacturer) {
             $manufacturer['image'] = $this->context->language->iso_code . '-default';
             if (file_exists(_PS_MANU_IMG_DIR_ . $manufacturer['id_manufacturer'] . '-' . ImageType::getFormatedName('medium') . '.jpg')) {
                 $manufacturer['image'] = $manufacturer['id_manufacturer'];
             }
         }
         $this->smarty->assign(array('manufacturers' => $manufacturers, 'tm_slider' => Configuration::get('TM_BRAND_SLIDER'), 'tm_logoname' => Configuration::get('TM_BRAND_NAME'), 'display_link_manufacturer' => Configuration::get('PS_DISPLAY_SUPPLIERS')));
     }
     return $this->display(__FILE__, 'tmbrandlogo.tpl', $this->getCacheId());
 }
开发者ID:IngenioContenidoDigital,项目名称:serta,代码行数:14,代码来源:tmbrandlogo.php

示例8: renderContent

 public function renderContent($setting)
 {
     $t = array('name' => '', 'html' => '');
     $setting = array_merge($t, $setting);
     $data = Manufacturer::getManufacturers(false, 0, true, 1, $setting['limit']);
     foreach ($data as $key => $item) {
         $item['image'] = !file_exists(_PS_MANU_IMG_DIR_ . $item['id_manufacturer'] . '-' . ImageType::getFormatedName('medium') . '.jpg') ? Context::getContext()->language->iso_code . '-default' : $item['id_manufacturer'];
         $data[$key] = $item;
     }
     $setting['manufacturers'] = $data;
     $setting['link'] = Context::getContext()->link;
     $output = array('type' => 'manufacture', 'data' => $setting);
     return $output;
 }
开发者ID:vuduykhuong1412,项目名称:GitHub,代码行数:14,代码来源:manufacture.php

示例9: renderContent

 public function renderContent($args, $setting)
 {
     $t = array('name' => '', 'html' => '');
     $setting = array_merge($t, $setting);
     $plimit = $setting['limit'] ? (int) $setting['limit'] : 10;
     $image_type = $setting['image'] ? $setting['image'] : 'small' . '_default';
     $data = Manufacturer::getManufacturers(true, Context::getContext()->language->id, true, 1, $plimit, false);
     foreach ($data as &$item) {
         $id_images = !file_exists(_PS_MANU_IMG_DIR_ . '/' . $item['id_manufacturer'] . '-' . $image_type . '.jpg') ? Language::getIsoById(Context::getContext()->language->id) . '-default' : $item['id_manufacturer'];
         $item['image'] = _THEME_MANU_DIR_ . $id_images . '-' . $image_type . '.jpg';
     }
     $setting['manufacturers'] = $data;
     $output = array('type' => 'manufacture', 'data' => $setting);
     return $output;
 }
开发者ID:evgrishin,项目名称:mh16014,代码行数:15,代码来源:manufacture.php

示例10: assignAll

 /**
  * Assign template vars if displaying the manufacturer list
  */
 protected function assignAll()
 {
     if (Configuration::get('PS_DISPLAY_SUPPLIERS')) {
         $data = Manufacturer::getManufacturers(false, $this->context->language->id, true, false, false, false);
         $nbProducts = count($data);
         $this->n = abs((int) Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')));
         $this->p = abs((int) Tools::getValue('p', 1));
         $data = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false);
         $this->pagination($nbProducts);
         foreach ($data as &$item) {
             $item['image'] = !file_exists(_PS_MANU_IMG_DIR_ . $item['id_manufacturer'] . '-' . ImageType::getFormatedName('medium') . '.jpg') ? $this->context->language->iso_code . '-default' : $item['id_manufacturer'];
         }
         $this->context->smarty->assign(array('pages_nb' => ceil($nbProducts / (int) $this->n), 'nbManufacturers' => $nbProducts, 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'manufacturers' => $data, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY')));
     } else {
         $this->context->smarty->assign('nbManufacturers', 0);
     }
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:20,代码来源:ManufacturerController.php

示例11: process

 public function process()
 {
     if (Validate::isLoadedObject($this->manufacturer) and $this->manufacturer->active) {
         $nbProducts = $this->manufacturer->getProducts($this->manufacturer->id, NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
         $this->pagination($nbProducts);
         self::$smarty->assign(array('nb_products' => $nbProducts, 'products' => $this->manufacturer->getProducts($this->manufacturer->id, (int) self::$cookie->id_lang, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay), 'path' => $this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : '', 'manufacturer' => $this->manufacturer));
     } elseif (!Tools::getValue('id_manufacturer')) {
         if (Configuration::get('PS_DISPLAY_SUPPLIERS')) {
             $result = Manufacturer::getManufacturers(true, (int) self::$cookie->id_lang, true);
             $nbProducts = count($result);
             $this->pagination($nbProducts);
             $manufacturers = Manufacturer::getManufacturers(true, (int) self::$cookie->id_lang, true, $this->p, $this->n);
             foreach ($manufacturers as &$row) {
                 $row['image'] = !file_exists(_PS_MANU_IMG_DIR_ . '/' . $row['id_manufacturer'] . '-medium.jpg') ? Language::getIsoById((int) self::$cookie->id_lang) . '-default' : $row['id_manufacturer'];
             }
             self::$smarty->assign(array('pages_nb' => ceil($nbProducts / (int) $this->n), 'nbManufacturers' => $nbProducts, 'mediumSize' => Image::getSize('medium'), 'manufacturers' => $manufacturers, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY')));
         } else {
             self::$smarty->assign('nbManufacturers', 0);
         }
     }
 }
开发者ID:greench,项目名称:prestashop,代码行数:21,代码来源:ManufacturerController.php

示例12: renderContent

 public function renderContent($setting)
 {
     $t = array('name' => '', 'html' => '', 'columns' => 4, 'list_mode' => 'grid', 'display_mode' => 'carousel', 'nbr_desktops' => 4, 'nbr_tablets' => 2, 'nbr_mobile' => 1, 'widgetid' => 'manu-' . time());
     $setting = array_merge($t, $setting);
     $manufacturers = Manufacturer::getManufacturers();
     foreach ($manufacturers as &$manufacturer) {
         $manufacturer['image'] = Context::getContext()->language->iso_code . '-default';
         if (file_exists(_PS_MANU_IMG_DIR_ . $manufacturer['id_manufacturer'] . '-' . ImageType::getFormatedName('medium') . '.jpg')) {
             $manufacturer['image'] = $manufacturer['id_manufacturer'];
         }
     }
     $setting['manufacturers'] = $manufacturers;
     $list_mode_tpl = _PS_MODULE_DIR_ . '/pspagebuilder/views/templates/front/widgets/sub/item_manufacturer_' . $setting['list_mode'] . '.tpl';
     $tlist_mode_tpl = _PS_ALL_THEMES_DIR_ . _THEME_NAME_ . '/modules/pspagebuilder/views/templates/front/widgets/sub/item_manufacturer_' . $setting['list_mode'] . '.tpl';
     if (file_exists($tlist_mode_tpl)) {
         $list_mode_tpl = $tlist_mode_tpl;
     }
     $setting['list_mode_tpl'] = $list_mode_tpl;
     $output = array('type' => 'manufacturer', 'data' => $setting);
     return $output;
 }
开发者ID:vuduykhuong1412,项目名称:GitHub,代码行数:21,代码来源:manufacturer.php

示例13: renderContent

 public function renderContent($args, $setting)
 {
     $t = array('name' => '', 'html' => '');
     $setting = array_merge($t, $setting);
     $items_page = $setting['itemspage'] ? (int) $setting['itemspage'] : 3;
     $columns_page = $setting['columns'] ? (int) $setting['columns'] : 3;
     $items_tab = $setting['itemstab'] ? (int) $setting['itemstab'] : 6;
     $interval = isset($setting['interval']) ? (int) $setting['interval'] : 8000;
     $image_type = $setting['image'] ? $setting['image'] : 'small_' . 'default';
     $data = Manufacturer::getManufacturers(true, Context::getContext()->language->id, true, false, $items_tab, false);
     foreach ($data as &$item) {
         $id_images = !file_exists(_PS_MANU_IMG_DIR_ . '/' . $item['id_manufacturer'] . '-' . $image_type . '.jpg') ? Language::getIsoById(Context::getContext()->language->id) . '-default' : $item['id_manufacturer'];
         $item['image'] = _THEME_MANU_DIR_ . $id_images . '-' . $image_type . '.jpg';
     }
     $setting['manufacturers'] = $data;
     $setting['itemsperpage'] = $items_page;
     $setting['columnspage'] = $columns_page;
     $setting['scolumn'] = 12 / $columns_page;
     $setting['interval'] = $interval;
     $setting['tab'] = 'leomanulogocarousel' . rand(20, rand());
     $output = array('type' => 'manucarousel', 'data' => $setting);
     return $output;
 }
开发者ID:ekachandrasetiawan,项目名称:BeltcareCom,代码行数:23,代码来源:manucarousel.php

示例14: getContent

    public function getContent()
    {
        $id_lang = (int) Context::getContext()->language->id;
        $languages = $this->context->controller->getLanguages();
        $default_language = (int) Configuration::get('PS_LANG_DEFAULT');
        $labels = Tools::getValue('label') ? array_filter(Tools::getValue('label'), 'strlen') : array();
        $links_label = Tools::getValue('link') ? array_filter(Tools::getValue('link'), 'strlen') : array();
        $spacer = str_repeat('&nbsp;', $this->spacer_size);
        $divLangName = 'link_label';
        $update_cache = false;
        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_HOME', (bool) Tools::getValue('home'));
            $update_cache = true;
        } else {
            if (Tools::isSubmit('submitBlocktopmenuLinks')) {
                if (!count($links_label) && !count($labels)) {
                } else {
                    if (!count($links_label)) {
                        $this->_html .= $this->displayError($this->l('Please, fill the "Link" field'));
                    } else {
                        if (!count($labels)) {
                            $this->_html .= $this->displayError($this->l('Please add a label'));
                        } else {
                            if (!isset($labels[$default_language])) {
                                $this->_html .= $this->displayError($this->l('Please add a label for your default language'));
                            } else {
                                MenuTopLinks_mod::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int) Shop::getContextShopID());
                                $this->_html .= $this->displayConfirmation($this->l('The link has been added'));
                            }
                        }
                    }
                }
                $update_cache = true;
            } else {
                if (Tools::isSubmit('submitBlocktopmenuRemove')) {
                    $id_linksmenutop = Tools::getValue('id_linksmenutop', 0);
                    MenuTopLinks_mod::remove($id_linksmenutop, (int) Shop::getContextShopID());
                    Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK' . $id_linksmenutop . ',', 'LNK' . $id_linksmenutop), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
                    $this->_html .= $this->displayConfirmation($this->l('The link has been removed'));
                    $update_cache = true;
                } else {
                    if (Tools::isSubmit('submitBlocktopmenuEdit')) {
                        $id_linksmenutop = (int) Tools::getValue('id_linksmenutop', 0);
                        $id_shop = (int) Shop::getContextShopID();
                        if (!Tools::isSubmit('link')) {
                            $tmp = MenuTopLinks_mod::getLinkLang($id_linksmenutop, $id_shop);
                            $links_label_edit = $tmp['link'];
                            $labels_edit = $tmp['label'];
                            $new_window_edit = $tmp['new_window'];
                        } else {
                            MenuTopLinks_mod::update(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int) $id_shop, (int) $id_linksmenutop, (int) $id_linksmenutop);
                            $this->_html .= $this->displayConfirmation($this->l('The link has been edited'));
                        }
                        $update_cache = true;
                    }
                }
            }
        }
        if ($update_cache) {
            $this->clearMenuCache();
        }
        $this->_html .= '
        <fieldset>
            <div class="multishop_info">
            ' . $this->l('The modifications will be applied to') . ' ' . (Shop::getContext() == Shop::CONTEXT_SHOP ? $this->l('shop:') . ' ' . $this->context->shop->name : $this->l('all shops')) . '.
            </div>
            <legend><img src="' . $this->_path . 'logo.gif" alt="" title="" />' . $this->l('Settings') . '</legend>
            <form action="' . Tools::safeOutput($_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="' . Tools::safeOutput(Configuration::get('MOD_BLOCKTOPMENU_ITEMS')) . '" size="70" />
                </div>
                </div>

                <div class="clear">&nbsp;</div>
                <table style="margin-left: 130px;">
                    <tbody>
                        <tr>
                            <td style="padding-left: 20px;">
                                <select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
        // BEGIN CMS
        $this->_html .= '<optgroup label="' . $this->l('CMS') . '">';
        $this->getCMSOptions(0, 1, $id_lang);
        $this->_html .= '</optgroup>';
        // BEGIN SUPPLIER
        $this->_html .= '<optgroup label="' . $this->l('Supplier') . '">';
        $suppliers = Supplier::getSuppliers(false, $id_lang);
        foreach ($suppliers as $supplier) {
            $this->_html .= '<option value="SUP' . $supplier['id_supplier'] . '">' . $spacer . $supplier['name'] . '</option>';
        }
        $this->_html .= '</optgroup>';
        // BEGIN Manufacturer
        $this->_html .= '<optgroup label="' . $this->l('Manufacturer') . '">';
        $manufacturers = Manufacturer::getManufacturers(false, $id_lang);
//.........这里部分代码省略.........
开发者ID:tmdhosting,项目名称:TMDHosting-PrestaShop-Technology-Theme,代码行数:101,代码来源:blocktopmenu_mod.php

示例15: _displayForm

 private function _displayForm()
 {
     $params = $this->params;
     $id_lang = $this->context->language->id;
     $id_btmegamenu = (int) Tools::getValue('id_btmegamenu');
     $obj = new Btmegamenu($id_btmegamenu);
     $tree = $obj->getTree();
     $categories = LeoBtmegamenuHelper::getCategories();
     $manufacturers = Manufacturer::getManufacturers(false, $id_lang, true);
     $suppliers = Supplier::getSuppliers(false, $id_lang, true);
     $cmss = CMS::listCms($this->context->language->id, false, true);
     $menus = $obj->getDropdown(null, $obj->id_parent);
     require_once dirname(__FILE__) . '/form.php';
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:14,代码来源:leobootstrapmenu.php


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