This website uses cookies to ensure you get the best experience on our website. Read more
Shopping Cart
You have no items in your shopping cart.
Click here to continue shopping.
public function drawMainMenu() { if ($this->hasData('mainMenu')) { return $this->getData('mainMenu'); } $desktopHtml = []; $mobileHtml = []; $rootCategory = $this->getRootCategory(); $storeId = $this->_storeManager->getStore()->getId(); $categories = $this->getTreeMenu($storeId, $rootCategory->getId()); $contentCatTop = $this->getContentCatTop(); foreach ($contentCatTop as $ext) { $this->extData[$ext->getCatId()] = $ext->getData(); } // --- Safe handling for dropdown IDs --- $dropdownValue = $this->_sysCfg->general['dropdown'] ?? ''; $dropdownValue = is_string($dropdownValue) ? $dropdownValue : ''; $dropdownIds = $dropdownValue !== '' ? explode(',', $dropdownValue) : []; $counter = 1; $this->removeChildrenWithoutActiveParent($categories, 0); foreach ($categories as $catTop) { $itemPositionClassPrefix = 'nav-' . $counter; $idTop = $catTop->getEntityId(); $urlTop = '' . $this->getThumbnail($catTop) . '' . $catTop->getName() . $this->getCatLabel($catTop) . '' . ''; $classTop = $itemPositionClassPrefix . ' ' . $this->_getActiveClasses($idTop); $isDropdown = in_array($idTop, $dropdownIds) ? ' dropdown' : ''; $options = ''; if ($isDropdown) { $classTop .= $isDropdown; $catChild = $catTop->getChildren(); $childHtml = $this->getTreeCategories($catChild, $itemPositionClassPrefix); $menu = ['desktop' => $childHtml, 'mobile' => $childHtml]; } else { $data = $this->extData[$idTop] ?? []; $blocks = ['top' => '', 'left' => '', 'right' => '', 'bottom' => '']; if (!empty($data)) { foreach ($blocks as $key => $value) { $html = $this->getStaticBlock($data[$key] ?? ''); if ($html) $blocks[$key] = "
You have no items in your shopping cart.
Click here to continue shopping.