买了magento 兰亭模板,将其中自己感觉有用的插件,抽取出来,供大家下载, 以下是显示客户浏览过最多次数的商品侧边栏的图示及代码
Hot Products是客户浏览最多的产品列表,这个是动态自动生成,可以去后台 system -> Configuration -> MostViewed 去设置该块显示产品个数
下载打包代码如下:
引用语法如下:
<block type="mostviewed/list" name="home.mostviewed.list" before="-" template="catalog/product/sidelist.phtml"/>
css引用如下:
/* Block: Hot Products */ .sidebar .block-hot-products ul{} .sidebar .block-hot-products li{border-bottom:1px solid #ddd; padding:4px 0; } .sidebar .block-hot-products li.last{border-bottom:0;} .sidebar .block-hot-products .product-img{display:block; width:70px; float:left;} .sidebar .block-hot-products .other-info{font-size:11px;padding:10px 0 0 5px;width:103px;float:right;} .sidebar .block-hot-products .home-name{ line-height:13px;overflow:hidden;} .sidebar .block-hot-products .home-name a{} .sidebar .block-hot-products .special-price{padding:0;} .sidebar .block-hot-products .price-box{margin:0;} .sidebar .block-hot-products strong{}