ECSHOP首頁調取固定的某個分類

2021-06-09 06:48:10 字數 598 閱讀 6937

**的分類通常都很多,如果在**首頁全部調取,有時候會拉的很長。所以一直希望有乙個可以調取固定某些分類的方法,今天終於找到了。

首先開啟index.php

1、找到 $smarty->assign('shop_notice', $_cfg['shop_notice']); // 商店公告

在其後面新增(這裡調取了兩個分類為例)

$smarty->assign('huacai',     get_cat_info(8));                // 獲得子分類的資訊

$smarty->assign('yongtu',     get_cat_info(6));

2、找到

在其前面新增

/*** 獲得分類的資訊

** @param   integer $cat_id

** @return  void

*/function get_cat_info($cat_id)

return $arr;}

3、開啟模板資料夾library,新建乙個檔案category_index.lbi||

以上含義就是調取huacai代表分類id8和yongtu代表分類id6下的分類名稱。

ecshop首頁呼叫某分類下的商

ecshop首頁呼叫某分類下的商品 assign cat goods 同盟者 同盟者微群 歡迎有夢想有激情的年輕人加入 ecshop首頁呼叫分類下的商品其實很簡單,也有模板設定那裡可以設定,不過那個只可以用cat goods.lib,不方便,所以我想看看怎麼能簡單的實現ecshop首頁呼叫分類下的商...

ECSHOP首頁的精品 新品 熱銷裡顯示商家備註

ecshop首頁的精品 新品 熱銷裡顯示商家備註,如圖 1 修改 includes lib goods.php 查詢 promote start date,promote end date,g.goods brief,g.goods thumb,g.goods img,rand as rnd 修改為...

ecshop 首頁呼叫指定分類下的銷售排行

首頁呼叫指定分類下的銷售排行 function get cats top10 cat sql select g.goods id,g.goods brief,g.goods name,g.goods img,g.goods thumb,g.shop price,g.promote price,g.p...