实现ZenCart首页随机产品横向滚动效果
1.将文件夹YOUR_TEMPLATE改为你模板的名称 2.将includestemplatesYOUR_TEMPLATEtemplatestpl_random_default.php中文件末尾 1 <script type=”text/javascript”src=”includes/templates/YOUR_TEMPLATE/jscript/random.js”></script> 中YOUR_TEMPLATE改为你模板的名称 3.上传文件即可 使用方法 在需要调用的地方增加 1 <?php 2 require($template->get_template_dir(‘/tpl_random_default.php’,DIR_WS_TEMPLATE,$current_page_base,’templates’).’/tpl_random_default.php’); ?> 小技巧 1.修改随机产品个数 修改includestemplatesYOUR_TEMPLATEtemplatestpl_random_default.php 1 $num=10;//随机产品数量 2.删除产品名称或价格,在includestemplatesYOUR_TEMPLATEtemplatestpl_random_default.php将注释名称和价格的下的代码注释 3.更改自动移动速度,在includestemplatesYOUR_TEMPLATEjscriptrandom.js 1 AutoPlayObj = setInterval(‘ISL_GoDown();ISL_StopDown();’,3000); //间隔时间 有朋友说js效果不滚动等原因,但是我自己在默认模板 IE Firefox…