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(); }
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()))); }