public function PreTemplateUpdate() { if ($this->smMenuExists === true) { $menuItem = SMMenuManager::GetInstance()->GetChild("SMMenuContent"); if ($menuItem !== null) { $menuItem->AddChild(new SMMenuItem($this->name, $this->getTranslation("Products"), SMExtensionManager::GetExtensionUrl($this->name) . "&SMShopEditProducts")); } } }