本文整理匯總了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');
}
}
示例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')));
}
示例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();
}
}