Index: site/App/ECommerce/Cart/config.php =================================================================== --- site/App/ECommerce/Cart/config.php (revision 5705) +++ site/App/ECommerce/Cart/config.php (revision 5706) @@ -2,10 +2,10 @@ $shopPages = []; -if (($url = Qs_SiteMap::findFirst(null, ['type' => 'ECommerce_Product_'], ['forceAction' => 'list'], 'url'))) { +if (($url = Qs_SiteMap::findFirst(['enabled' => 'y'], ['type' => 'ECommerce_Product_'], ['forceAction' => 'list'], 'url'))) { $shopPages[] = ['title' => 'Products', 'url' => $url]; } -if (($url = Qs_SiteMap::findFirst(null, ['type' => 'Event\\'], ['type' => 'calendar'], 'url'))) { +if (($url = Qs_SiteMap::findFirst(['enabled' => 'y'], ['type' => 'Event\\'], ['type' => 'calendar'], 'url'))) { $shopPages[] = ['title' => 'Events', 'url' => $url]; } Index: site/tpl/ECommerce/Cart/row-empty-list.tpl =================================================================== --- site/tpl/ECommerce/Cart/row-empty-list.tpl (revision 5707) +++ site/tpl/ECommerce/Cart/row-empty-list.tpl (revision 5708) @@ -1,5 +1,5 @@ - You have no items in the Shopping Cart, please shop + You have no items in the Shopping Cart{if $item->config.shopPages}, please shop{/if} {foreach from = $item->config.shopPages item = "shopPage" name = "page"} {if !$smarty.foreach.page.first}{if $smarty.foreach.page.last} or {else}, {/if}{/if} {$shopPage.title|htmlspecialchars} Index: site/App/Cms/Obj.php =================================================================== --- site/App/Cms/Obj.php (revision 5709) +++ site/App/Cms/Obj.php (revision 5710) @@ -463,9 +463,10 @@ return $this; } - protected function _prepareSiteMap(&$siteMap, &$list, $parentAlias = '') + protected function _prepareSiteMap(&$siteMap, &$list, $parent = []) { foreach ($siteMap as &$page) { + $parentAlias = Qs_Array::get($parent, 'fullAlias', ''); $page['fullAlias'] = rtrim($parentAlias, '/') . (($parentAlias) ? '/' : '') . $page['alias']; if (Qs_SiteMap::isSecurePage($page)) { $page['url'] = BASE_URL_LANGUAGE_HTTPS; @@ -482,10 +483,13 @@ if (empty($page['title'])) { $page['title'] = $page['menuTitle']; } + if ('n' == Qs_Array::get($parent, 'enabled')) { + $page['enabled'] = 'n'; + } if (isset($list[$page['id']])) { $page['sub'] = $list[$page['id']]; unset($list[$page['id']]); - $this->_prepareSiteMap($page['sub'], $list, $page['fullAlias']); + $this->_prepareSiteMap($page['sub'], $list, $page); } }