本文整理汇总了PHP中Shop::getFullUrlCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP Shop::getFullUrlCategory方法的具体用法?PHP Shop::getFullUrlCategory怎么用?PHP Shop::getFullUrlCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shop
的用法示例。
在下文中一共展示了Shop::getFullUrlCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
if ($_GET['order'] == 'desc') {
$order .= " desc";
}
}
unset($url[$n]);
unset($current_url_pages[count($current_url_pages) - 1]);
}
$smarty->assign("dir", $dirs);
for ($f = 0; $f < count($cat_list); $f++) {
$url_to_check = implode("/", $url) . '/';
if ($cat_list[$f]['full_url'] == $url_to_check) {
$cat_content = $cat_list[$f];
if (empty($cat_content['param_level'])) {
$categories = $shop->getCategories(1);
if (!empty($categories[0]['id'])) {
$redirectUrl = $shop->getFullUrlCategory($categories[0]['id'], 'catalog');
header("Location: " . BASE_URL . '/' . $redirectUrl);
die;
}
}
$page_found = true;
if (isset($title_template)) {
$page_title = $title_template;
} else {
if ($cat_content['name'] != '/') {
$page_title = $cat_content['name'];
}
}
if ($cat_content['meta_keywords'] != '') {
$meta_keywords = $cat_content['meta_keywords'];
}
示例2: IN
}
/* -------------- пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ -------------- */
$main_menu = $db->get_all("SELECT id,name,url,param_level,param_left,param_right FROM fw_tree WHERE param_level IN ('1') AND in_menu='1' and status='1' ORDER BY param_left");
$main_menu = String::unformat_array($main_menu, 'front');
foreach ($main_menu as $key => $val) {
$submenu = $db->get_all("SELECT id,name,url,param_level FROM fw_tree WHERE param_left BETWEEN '{$val['param_left']}' AND '{$val['param_right']}' AND param_level = '" . ($val['param_level'] + 1) . "' AND in_menu = '1' ORDER BY param_left");
if (isset($submenu) && count($submenu) > 0) {
$main_menu[$key]['submenu'] = $submenu;
}
}
$smarty->assign("main_menu", $main_menu);
$shop_menu = $db->get_all("\n\tSELECT * \n\tFROM fw_catalogue as a\n\tWHERE a.param_level = '1' AND a.status='1' \n\tORDER BY a.param_left limit 7");
//добавляем в массив полный путь до категории
if ($shop_menu) {
foreach ($shop_menu as $key => $val) {
$shop_menu[$key]['full_url'] = $shop->getFullUrlCategory($val['id'], "catalog");
/*$shop_menu[$key]['children'] = $shop->getChildrenCategor($val, 2);
if ($shop_menu[$key]['children'])
foreach ($shop_menu[$key]['children'] as $key2=>$val2)
$shop_menu[$key]['children'][$key2]['full_url'] = $shop->getFullUrlCategory($val2['id'], "catalog");*/
}
}
$smarty->assign("shop_menu", $shop_menu);
$smarty->assign('top_products', $shop->getTopProducts());
if (!isset($page_title)) {
if (isset($node_content['title']) && $node_content['title'] != '') {
$page_title = $node_content['title'];
} else {
$page_title = isset($node_content['name']) ? $node_content['name'] : '';
}
}