本文整理汇总了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();
}
}