本文整理汇总了PHP中AgileSellerManager::limited_by_membership方法的典型用法代码示例。如果您正苦于以下问题:PHP AgileSellerManager::limited_by_membership方法的具体用法?PHP AgileSellerManager::limited_by_membership怎么用?PHP AgileSellerManager::limited_by_membership使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AgileSellerManager
的用法示例。
在下文中一共展示了AgileSellerManager::limited_by_membership方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderView
public function renderView()
{
global $cookie;
if (Module::isInstalled('agilemultipleseller') && !intval(Tools::getValue('id_product')) and $this->is_seller and AgileSellerManager::limited_by_membership($cookie->id_employee)) {
$this->errors[] = Tools::displayError('You have not purchased membership yet or you have registered products more than limit allowed by your membership.');
return;
}
return parent::renderView();
}
示例2: initContentCommon
private function initContentCommon()
{
$gmkzlgzfm = "is_list_limited";
$dkihnndeclye = "is_list_limited";
${$dkihnndeclye} = AgileSellerManager::limited_by_membership($this->sellerinfo->id_seller);
if ($this->id_object == 0 and $this->sellerinfo->id_seller > 0 and ${${"GLOBALS"}["pqcobqrrf"]}) {
$this->errors[] = Tools::displayError("You have not purchased membership yet or you have registered products more than limit allowed by your membership.");
}
$newProductMenus = array();
// Unset Customize Product Menus
// unset($this->product_menus[1]);
unset($this->product_menus[2]);
unset($this->product_menus[3]);
unset($this->product_menus[4]);
unset($this->product_menus[5]);
unset($this->product_menus[6]);
unset($this->product_menus[7]);
unset($this->product_menus[8]);
unset($this->product_menus[9]);
// Re Arrange Name (REMOVE THE NUMBER)
foreach ($this->product_menus as $k => $v) {
$id = $v['id'];
$name = substr($v['name'], 3);
// Set value to the new product menu array
$newProductMenus[$k]['id'] = $id;
$newProductMenus[$k]['name'] = $name;
}
$defaultDesc = '1.Service detail<br/><br/><br/><br/>
2.Time schedule<br/><br/><br/><br/>
3.Option<br/>
-including<br/>
-excluding<br/><br/><br/><br/>
4. Notice';
$defaultDescJA = '1.Service detail<br/><br/><br/><br/>
2.Time schedule<br/><br/><br/><br/>
3.Option<br/>
-including<br/>
-excluding<br/><br/><br/><br/>
4. Notice';
$desc = mb_strlen($this->object->description[1]) > 0 ? $this->object->description[1] : $defaultDesc;
$descJa = mb_strlen($this->object->description[2]) > 0 ? $this->object->description[2] : $defaultDescJA;
$this->object->description[1] = $desc;
$this->object->description[2] = $descJa;
$this->object->description_short[2] = $this->object->description_short[1];
// die('<pre>'. print_r($this->object, true));
self::$smarty->assign(array("seller_tab_id" => 3, "is_list_limited" => ${$gmkzlgzfm}, "product_menus" => $newProductMenus, "product_menu" => $this->product_menu, "id_language" => $this->id_language, "id_product" => $this->id_object, "id_category_default" => $this->object->id_category_default, "product" => $this->object, "product_type" => (int) Tools::getValue("type_product", $this->object->getType())));
}