我是阿布

旋转,跳跃,不停歇…

best seller 带有图片的设置

  • 30 六月 2010 9:56 上午

打开includes\modules\sideboxes\your_template\best_sellers.php,查找

select distinct p.products_id, pd.products_name, p.products_ordered

将其替换为:

select distinct p.products_id, p.products_image, p.products_price, pd.products_name, p.products_ordered

(注意:我这里使用的版本是zencart 1.38,在此版本下,最好将此文件的第34,51两行都替换,另外如果your_template下没有相应文件,则从template_default下复制);

步骤2

查找:

$bestsellers_list[$rows]['name'] = $best_sellers->fields['products_name'];

在其它下面加入:

$bestsellers_list[$rows]['image'] = $best_sellers->fields['products_image'];

$bestsellers_list[$rows]['price'] = $best_sellers->fields['products_price'];

步骤3

打开includes\templates\your_template\sideboxes\ tpl_best_sellers.php

(如果你使用的模板没有这个文件,请从默认模板下复制这个文件)

查找:

for ($i=1; $i<=sizeof($bestsellers_list); $i++) {

在其它下面加入:

$content .=’<a href=”‘ . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), ‘products_id=’ . $bestsellers_list[$i]['id']) . ‘”>’

.zen_image(DIR_WS_IMAGES . $bestsellers_list[$i]['image'], $best_sellers->fields['products_name'], SMALL_IMAGE_WIDTH*0.7, SMALL_IMAGE_HEIGHT*0.7)

.’</a>’ . $currencies->format(zen_trunc_string($bestsellers_list[$i]['price'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE), true, $orders->info['currency'], $orders->info['currency_value']);

4 Comments

  1. sveinjoe - 2010年07月1日 at 6:38 下午

    哈,刚好在找这个

  2. 王玉明 - 2010年08月1日 at 6:54 下午

    忽忽,你的页面还有错误的代码哦

  3. sportica旗舰店 - 2010年08月26日 at 1:01 上午

    看文章 。en。。o(∩_∩)o 哈哈

  4. 阿布 - 2010年08月26日 at 8:58 上午

    请高手赐教哦。。

Leave a Reply

Leave A Comment