ECSHOP: displays sub-category items on the home page, and click the Tab to switch to a category item _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.