• 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产品详细页幻灯片效果

  • 相关阅读:
    java图形化Swing教程(一)
    NYOJ467 中缀式变后缀式 【栈】
    火云开发课堂
    Egret项目Typescript的编译报错
    Java学习笔记(八):集合类
    Java学习笔记(七):内部类、静态类和泛型
    认识JavaScript的原型
    Java学习笔记(六):面向对象、接口和抽象类
    Java学习笔记(五):异常处理
    Java学习笔记(四):流程控制
  • 原文地址:https://www.cnblogs.com/lookyou/p/2229479.html
Copyright © 2020-2023  润新知