本文整理汇总了PHP中AgileSellerManager::get_current_logged_seller_home_category_id方法的典型用法代码示例。如果您正苦于以下问题:PHP AgileSellerManager::get_current_logged_seller_home_category_id方法的具体用法?PHP AgileSellerManager::get_current_logged_seller_home_category_id怎么用?PHP AgileSellerManager::get_current_logged_seller_home_category_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AgileSellerManager
的用法示例。
在下文中一共展示了AgileSellerManager::get_current_logged_seller_home_category_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$id_seller_home = AgileSellerManager::get_current_logged_seller_home_category_id();
$id_category = intval(Tools::getValue('id_category'));
$id_parent = intval(Tools::getValue('id_parent'));
if ($id_seller_home > 0) {
$url2sellerhome = "./index.php?controller=AdminCategories&id_category=" . $id_seller_home . "&viewcategory&token=" . Tools::getAdminTokenLite("AdminCategories");
if ($id_category == 0 && $id_parent == 0) {
Tools::redirectAdmin($url2sellerhome);
}
if ($id_category > 0 && $id_category != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
Tools::redirectAdmin($url2sellerhome);
}
if ($id_parent > 0 && $id_parent != $id_seller_home && !AgileHelper::isSuccessor($id_seller_home, $id_category)) {
Tools::redirectAdmin($url2sellerhome);
}
}
parent::__construct();
if (Module::isInstalled('agilemultipleseller')) {
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
if (!$this->is_seller) {
$this->bulk_actions['assignto'] = array('text' => $this->l('Assign to seller'), 'confirm' => $this->l('Assign selected items to the seller?'));
}
}
if (Module::isInstalled('agilemultipleseller')) {
$this->agilemultipleseller_list_override();
}
}
示例2: getRootCategory
public static function getRootCategory($id_lang = null, Shop $shop = null)
{
if (!Module::isInstalled('agilemultipleseller')) {
return parent::getRootCategory($id_lang, $shop);
}
$id_seller_home = AgileSellerManager::get_current_logged_seller_home_category_id();
if ((int) $id_seller_home <= 0) {
return parent::getRootCategory($id_lang, $shop);
}
if ((int) $id_lang <= 0) {
$id_lang = Context::getContext()->language->id;
}
$category = new Category($id_seller_home, $id_lang);
if (!Validate::isLoadedObject($category)) {
return parent::getRootCategory($id_lang, $shop);
}
return $category;
}