效果图
下载地址: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顶部加上
-
<?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中
-
$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中
-
$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";
改为
-
$flash_page_query="select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
-
-
p.products_date_added, p.products_price, p.products_type, p.master_categories_id
-
-
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
-
-
where p.products_id = pd.products_id
-
-
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
-
-
and p.products_status = 1 limit 12";
参考自http://hi.baidu.com/liu731/blog/item/2d7f14f7b284b076ddc474b5.html,并做部分改进。
文件名称是 zencart产品详细页幻灯片效果