ZenCart产品页多产品展示幻灯片效果,(文件已经下载 放在blog文件内)

效果图

 

下载地址:http://dl.dbank.com/c0t7snsvsy

使用方法:

1.上传文件,将YOUR_TEMPLATES改为自己的模板名

2.将includes\templates\YOUR_TEMPLATES\templates\tpl_product_info_mobile_products.php中

YOUR_TEMPLATES改为自己的模板名

includes/templates/你的模板/templates/tpl_product_info_display.php顶部加上

  1. <?php require($template->get_template_dir('/tpl_product_info_mobile_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_product_info_mobile_products.php');?>

注:

修改循环产品的数量

将includes\templates\YOUR_TEMPLATES\templates\tpl_product_info_mobile_products.php中

  1. $flash_page_query = "select p.products_id,p.products_image,pd.products_name from " . TABLE_PRODUCTS ." p, ". TABLE_PRODUCTS_DESCRIPTION . " pd where p.`products_id`=pd.`products_id` AND p.`products_status`='1'  AND pd.`language_id` = '" . (int)$_SESSION['languages_id'] . "' AND p.`master_categories_id` = " . zen_get_products_category_id($products_id) . " ORDER BY rand() limit 12";

中12改为自己想要的数值。

扩大显示范围到全部产品

将includes\templates\YOUR_TEMPLATES\templates\tpl_product_info_mobile_products.php中

  1. $flash_page_query = "select p.products_id,p.products_image,pd.products_name from " . TABLE_PRODUCTS ." p, ". TABLE_PRODUCTS_DESCRIPTION . " pd where p.`products_id`=pd.`products_id` AND p.`products_status`='1'  AND pd.`language_id` = '" . (int)$_SESSION['languages_id'] . "' AND p.`master_categories_id` = " . zen_get_products_category_id($products_id) . " ORDER BY rand() limit 12";

改为

  1. $flash_page_query="select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
  2.                                 p.products_date_added, p.products_price, p.products_type, p.master_categories_id
  3.                            from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
  4.                            where p.products_id = pd.products_id
  5.                            and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
  6.                            and   p.products_status = 1 limit 12";

参考自http://hi.baidu.com/liu731/blog/item/2d7f14f7b284b076ddc474b5.html,并做部分改进。

 

文件名称是 zencart产品详细页幻灯片效果

posted @ 2011-10-30 20:05  小2010  阅读(536)  评论(2编辑  收藏  举报