From fdd7df928bdcaee2ee4e9dc7845a904326b58635 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Wed, 10 Jan 2024 16:14:52 +0800 Subject: [PATCH] * Remove closed products on 2.5 menu. bug #43430. --- module/design/ui/ajaxswitchermenu.html.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/module/design/ui/ajaxswitchermenu.html.php b/module/design/ui/ajaxswitchermenu.html.php index 1430ac132f..298c0cfd14 100644 --- a/module/design/ui/ajaxswitchermenu.html.php +++ b/module/design/ui/ajaxswitchermenu.html.php @@ -21,7 +21,7 @@ $defaultItem['text'] = $lang->product->all; $defaultItem['active'] = $productID == 0; $defaultItem['type'] = 'product'; -$data = array('normal' => array($defaultItem), 'closed' => array()); +$data = array('normal' => array($defaultItem)); foreach($products as $product) { @@ -32,14 +32,7 @@ foreach($products as $product) $item['type'] = 'product'; $item['keys'] = zget(common::convert2Pinyin(array($product->name)), $product->name, ''); - if($product->status == 'closed') - { - $data['closed'][] = $item; - } - else - { - $data['normal'][] = $item; - } + if($product->status != 'closed') $data['normal'][] = $item; } /** @@ -47,14 +40,12 @@ foreach($products as $product) * Define every group name, include expanded group. */ $tabs = array(); -$tabs[] = array('name' => 'closed', 'text' => $lang->product->closedProduct); $tabs[] = array('name' => 'normal', 'text' => ''); $json = array(); $json['data'] = $data; $json['tabs'] = $tabs; $json['searchHint'] = $lang->searchAB; -$json['expandName'] = 'closed'; $json['itemType'] = 'product'; $json['link'] = array('product' => sprintf($link, '{id}'));