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


PHP Supplier::isAssociatedToShop方法代码示例

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


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

示例1: initContent

 /**
  * Assign template vars related to page content
  * @see FrontController::initContent()
  */
 public function initContent()
 {
     parent::initContent();
     if (Validate::isLoadedObject($this->supplier) && $this->supplier->active && $this->supplier->isAssociatedToShop()) {
         $this->productSort();
         // productSort must be called before assignOne
         $this->assignOne();
         $this->setTemplate(_PS_THEME_DIR_ . 'supplier.tpl');
     } else {
         $this->assignAll();
         $this->setTemplate(_PS_THEME_DIR_ . 'supplier-list.tpl');
     }
 }
开发者ID:prestanesia,项目名称:PrestaShop,代码行数:17,代码来源:SupplierController.php

示例2: initContent

 /**
  * Assign template vars related to page content
  * @see FrontController::initContent()
  * @param id_categoy : for select suppliers by category
  */
 public function initContent($id_category = null)
 {
     if (Tools::getValue('ajax')) {
         return;
     }
     parent::initContent();
     if (Validate::isLoadedObject($this->supplier) && $this->supplier->active && $this->supplier->isAssociatedToShop()) {
         if (Validate::isLoadedObject($this->category) && $this->category->active && $this->category->isAssociatedToShop()) {
             $this->productSort();
             // productSort must be called before assignOne
             $this->assignOneCategory();
             $this->setTemplate(_PS_THEME_DIR_ . 'supplier.tpl');
         } else {
             $this->productSort();
             // productSort must be called before assignOne
             $this->assignOne();
             $this->setTemplate(_PS_THEME_DIR_ . 'supplier.tpl');
         }
     } else {
         if ($id_category == null) {
             $this->assignAll();
         } else {
             $this->assignAllByCategory($id_category);
         }
         $this->setTemplate(_PS_THEME_DIR_ . 'supplier-list.tpl');
     }
     $this->context->smarty->assign(array('HOOK_LEFT_COLUMN' => Hook::exec('leftColumn')));
 }
开发者ID:yewed,项目名称:share,代码行数:33,代码来源:SupplierController.php

示例3: initContent

 /**
  * Assign template vars related to page content.
  *
  * @see FrontController::initContent()
  */
 public function initContent()
 {
     if (Configuration::get('PS_DISPLAY_SUPPLIERS')) {
         parent::initContent();
         if (Validate::isLoadedObject($this->supplier) && $this->supplier->active && $this->supplier->isAssociatedToShop()) {
             $this->assignSupplier();
             $this->label = $this->trans('List of products by supplier %s', array($this->supplier->name), 'Shop.Theme.Catalog');
             $this->doProductSearch('catalog/listing/supplier', array('entity' => 'supplier', 'id' => $this->supplier->id));
         } else {
             $this->assignAll();
             $this->label = $this->trans('List of all suppliers', array(), 'Shop.Theme.Catalog');
             $this->setTemplate('catalog/suppliers', array('entity' => 'suppliers'));
         }
     } else {
         $this->redirect_after = '404';
         $this->redirect();
     }
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:23,代码来源:SupplierController.php


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