zen cart模仿taobao销售排行

2010-09-16 23:56 来源:www.chinab4c.com 作者:admin

???? zen cart目前所有的销售排行。是十分简单的。也是十分粗浅的.我们将结合ecshop的开发和zen cart开发的共性。来用zen cart模仿taobao销售排行.从而达到对zen cart二次开发的有效性.

??? 1:includes/modules/sideboxes/best_sellers.php修改以下代码

???? $bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id'];
??????????????? $best_sellers->fields['products_name'] =? zen_trunc_string($best_sellers->fields['products_name'],5);
??????? $bestsellers_list[$rows]['name']? = $best_sellers->fields['products_name'];

??????? $bestsellers_list[$rows]['products_image']? = $best_sellers->fields['products_image'];
??????? $bestsellers_list[$rows]['products_image'] =? zen_image(DIR_WS_IMAGES . $best_sellers->fields['products_image'], $best_sellers->fields['products_name'], 70, 70);
??????? $best_sellers->MoveNext();

????? 2:includes/templates/template_default/sideboxes/tpl_best_sellers.php修改成以下代码.

????? for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
??? $content .= '

  • ';
    ??? $content .='';
    ??? $content .='';
    ??? $content .='
    ';
    ??? $content .='
  • ' . "\n";
    ? }

    ????? 通过以上修改。达到模仿taobao 销售排行的目的。

     来源:http://www.chinab4c.com

    ?