Ecshop Home top10 number of modified bars

Source: Internet
Author: User
Tags php template
Download the template for two development, do not know whether it is ecshop own bug or template has been changed, the background can not set TOP10 display bar number, only show 5 data.


After some Baidu, not fruit, began to look at the call template \library\top10_goods.lbi, there is no control to display the number of statements.

Prior to understanding the template mechanism, is pre-set in the index.php template call array data, found in 127 rows: $smarty->assign (' Top_goods ', GET_TOP10 ()); Sales ranking

OK, this confirmation is the function get_top10 ();

But ctrl+f incredibly index.php not, OK, don't know how to come, with EditPlus Direct file Lookup function statement. \includes\lib_goods.php

The target function was found in line 164 of \includes\lib_goods.php, and OK is close to the target.


Well? Seems to be the global variable, again Baidu, found the place for global variable settings: \lib_common.php


The amount!! Why is 10, but the front desk can only call 5 data, to now do not understand, it may be the original template author where the changes have been made.

No way, only return to \includes\lib_goods.php

Directly modify the number of control bar numbers in the SQL statement:


Front desk refresh, OK, can use.


Always do the front end, rarely do PHP development, the first time with ecshop two times development, avoid strong first use O (∩_∩) o haha ~

The above describes the Ecshop home Top10 the number of changes, including the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    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.