當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。