ECSHOP: Home Implementation Display sub-categories of goods, and achieve click tab to switch categories of products _php Tutorial

Source: Internet
Author: User
< span="">Start: 1. Open Debug Switch file address: Include/cls_template.php found:
function _eval ($content)
function body the first line increases: Echo ($content); The rewrite is commented out after debugging is complete. 2. Modify the goods get function to display sub-classifications. Files: include/cls_goods.php found functions: function Assign_cat_goods, in $cat [' id '] = $cat _id; Add a line after:
$cat [' cat_id '] = Get_child_tree ($cat _id);

Invokes sub-categorization information.

3. Modify the template Cat_goods.lbi, display sub-categories and call sub-products

      < span="">
    • Class= "Active" >{$rec _cat.name|escape:html}





This loop gets the current product category ID, the incoming Get product information collection

$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]);
?>
Active "Id=" tab{$rec _cat1.id} ">




{$goods. short_name|escape:html}

Market Price:

    • {$goods _cat.name|escape:html}


More >>






{$goods. short_name|escape:html}

Market Price: . < span="">Corrected as follows: 1. Increase the current large classification ID if there is a value to be judged increase location: Product Classification Template The first line Cat_goods.lbi code:
 
       

2. Modify the Get current ID code. The code is as follows:

      
 
       < span="">< span="">       
   
       < span="">< span="">->_var[' Curcat '];    ->assign (' Goods_cat_ '). < span="">  < span="">  < span=""> < span=""> , Assign_cat_goods (< span="">< span="">, 4< span="">->assign (' Cat_goods_nf ',< span="">->_var[' Cat_goods_ '.< span="">< span="">

http ://www.bkjia.com/phpjc/440369.html www.bkjia.com true http:// www.bkjia.com/PHPjc/440369.html techarticle start: 1. Open Debug Switch file address: Include/cls_template.php found: function _eval ($content) The body of the first line increased: Echo ($content); After rewriting debugging is finished, 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.