请问如何实现首页精美单列商品列表显示?

用于收藏精华贴子、网友共享的资料等。可以回复,不能发新贴。

版主: daimadaquan

版面规则
本版面不能发新贴,可以回复

请问如何实现首页精美单列商品列表显示?

帖子Smile » 2008-03-01 20:05

如下图所示,已经修改设置实现了每行只显示一个商品,却无法显示商品介绍和购买按钮。商店设置中默认已经打开了这些显示,似乎只是对二级页面起作用,那首页上如何实现呢?非常感谢
14901-osc-b.jpg
Smile
新手上路
新手上路
 
帖子: 9
注册: 2007-05-26 21:17

Re: 请问如何实现首页精美单列商品列表显示?

帖子radnows » 2008-03-01 21:26

首页显示的话以新进商品为例,需要编辑modules/new_products.php里的
代码: 全选
'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

把做好的表格套进'text' => '表格',再把
代码: 全选
'<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price

的各个内容插进表格相应位置。
头像
radnows
论坛版主
论坛版主
 
帖子: 3128
注册: 2005-08-09 23:57
地址: radnows.com

Re: 请问如何实现首页精美单列商品列表显示?

帖子Smile » 2008-03-02 22:03

无语了,版主对Zen-cart太熟悉了,帮了我大忙了,非常感谢!
Smile
新手上路
新手上路
 
帖子: 9
注册: 2007-05-26 21:17

Re: 请问如何实现首页精美单列商品列表显示?

帖子ebloger » 2008-03-26 20:45

学习了。
ebloger
普通会员
普通会员
 
帖子: 22
注册: 2007-11-21 21:28
地址: http://www.a-lian.net

Re: 请问如何实现首页精美单列商品列表显示?

帖子high9 » 2008-05-15 15:51

老大,对我们菜鸟来说有点深奥,不太明白. 我想在首页的新进产品中添加"Model:"字段,能告诉我具体怎么修改吗?
high9
中级会员
中级会员
 
帖子: 94
注册: 2008-01-15 21:12

Re: 请问如何实现首页精美单列商品列表显示?

帖子high9 » 2008-05-17 16:32

顶一下,老大帮帮我吧
high9
中级会员
中级会员
 
帖子: 94
注册: 2008-01-15 21:12

Re: 请问如何实现首页精美单列商品列表显示?

帖子上帝的眼泪 » 2008-06-20 1:55

This is how to add the product description to the featured products box on the home page:

1. Copy the file: includes/modules/featured_products.php

2. Place it in an overrides folder like this:

includes/modules/your_template/featured_products.php

3. Add the code for the 'product description' and 'more info link' variables:

$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_g et_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);

$info_link = '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '"> more info...</a>';

4. Replace the $list_box_contents variable with this code:

$list_box_contents[$row][$col] = array('params' =>'class="centerBoxContentsFeatured centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br /><a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $products_price . '<br />' . $products_description . $info_link);

5. Upload the file to your overrides folder.

Note: You can add the product description to the specials box by editing the specials_index.php file. Just replace all instances of $featured_products with $specials_index

首页调试产品的介绍...
上帝的眼泪
普通会员
普通会员
 
帖子: 30
注册: 2008-03-22 13:59

Re: 请问如何实现首页精美单列商品列表显示?

帖子shoesid » 2009-03-19 22:43

学习了
shoesid
中级会员
中级会员
 
帖子: 70
注册: 2008-06-23 11:34

Re: 请问如何实现首页精美单列商品列表显示?

帖子ty040422 » 2009-04-05 0:09

請問在那裡加上?:

3. Add the code for the 'product description' and 'more info link' variables:

$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_g et_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);

$info_link = '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '"> more info...</a>';
ty040422
初来乍到
初来乍到
 
帖子: 1
注册: 2009-04-05 0:07

Re: 请问如何实现首页精美单列商品列表显示?

帖子wolikezencart » 2010-08-15 15:27

good
wolikezencart
中级会员
中级会员
 
帖子: 54
注册: 2010-04-27 11:50
QQ 帐号: 374253930

下一页

回到 精华共享

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客