ECSHOP: The home page displays sub-category items, and click the Tab to switch to category items. Start: 1. open the debug switch file address: includecls_template.php find: function_eval ($ content) added to the first line of the function body: echo ($ content); comment out after debugging
Start: 1. open the debug switch file address: include/cls_template.php find:
function _eval($content)
The first line of the function body is added: echo ($ content); comment out the function after rewrite and debugging. 2. modify the goods function to display subcategories. File: include/cls_goods.php find function: function assign_cat_goods, add a line after $ cat ['id'] = $ cat_id:
$cat['cat_id'] = get_child_tree($cat_id);
// Call sub-category information.
3. modify the template cat_goods.lbi to display the subcategory and call the subitem
- Class = "active" >{$ Rec_cat.name | escape: html}
// Here, the current item category ID is obtained cyclically, and the item information set is obtained through
$ Cid = $ this-> _ var ['rec _ cat1'] ['id'];
$ This-> assign ('goods _ cat _ '. $ cid, assign_cat_goods ($ cid, 4 ));
$ This-> assign ('cat _ goods_nf ', $ this-> _ var ['cat _ goods _'. $ cid]);
?>
{$ Goods. short_name | escape: html}
Market price:
- {$ Goods_cat.name | escape: html}
More>
{$ Goods. short_name | escape: html}
Market price :. Correct the following: 1. add a value for the current big Classification ID: add the position: cat_goods.lbi code in the first line of the product classification template:
2. modify and obtain the current ID code. The code is as follows:
_var['curCat']; ->assign('goods_cat_'., assign_cat_goods(, 4->assign('cat_goods_nf',->_var['cat_goods_'.?>
Lifecycle 1. open the debug switch file address: include/cls_template.php find: function _ eval ($ content) added in the first line of the function body: echo ($ content ); comment out...