zencart 实用语句

1 <?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?>

在 includes/templates/{youtemplate}/templates/tpl_product_info_display.php, 可实现显示评论条数:Current Reviews: 8

 

includes\functions 函数库,如html_output内置了一些方便字符格式化的函数。比如站内的超链接zen_href_link('index', 'cPath='.$categories_array[$key]['id'].'')这个就是一个产品分类的连接方式。 当然你可以把前面的INDEX改成对应的红到includes\filenames.php里面有自己看,对了如果要找函数的话,可以用DW的文件夹查找,速度快,而且方便。

 

取得购物车总额:<?php echo $_SESSION['cart']->show_total(); ?>      300

带格式化: <?php echo $currencies->format($_SESSION['cart']->show_total()); ?>   $300.00

 

获取某产品在购物篮的数量:$_SESSION['cart']->get_quantity($_GET['products_id'])

 

目录常量

 

define('DIR_WS_INCLUDES', 'includes/');网站(前台)

define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');模板目录

define('DIR_WS_TEMPLATE', DIR_WS_TEMPLATES . $template_dir . '/');模板页

 

 

2.如何让超链接访问后和访问前的颜色不同且访问后仍保留hover和active效果?
方法:

1 a:link{color:#03c;}
2 a:visited{color:#666;}
3 a:hover{color:#f30;}
4 a:active{color:#c30;}

 

 引入最行JQuery版本

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

 

posted @ 2013-05-15 15:05  海阔天空XM  阅读(208)  评论(0)    收藏  举报