paul Posted June 7, 2010 Share Posted June 7, 2010 实现Categories和Manufacturers联合搜索产品 实现Categories和Manufacturers联合搜索.txt Link to comment Share on other sites More sharing options...
paul Posted June 7, 2010 Author Share Posted June 7, 2010 如图 Link to comment Share on other sites More sharing options...
21846657 Posted June 7, 2010 Share Posted June 7, 2010 这是一次相当不错的尝试!谢谢分享到中文社区。从用户角度考虑,使用该代码后,我们在浏览产品时,可以同时知道产品是属于哪个category和属于哪个manufactuer。但是,要同时让用户知道这两点,也就是说,让用户浏览产品时,还可以知道产品是属于哪个manufactuer(隶属category是默认就有的),有更容易实现的方法。譬如,在(定制模板的)product.tpl或product-list.tpl,使用smarty变量{$manufactuer_name}或{$product->manufacturer_name}来显示隶属manufactuer的名称(更可以使用其他smarty变量来显示manufactuer的logo)。这么做的好处是,仅修改了模板的代码,保持了主程序代码良好的版本兼容性和可维护性;比起“隶属manufactuer”的字体highlighted,有更好的用户体验。欢迎拍砖!Thanks again Paul! Link to comment Share on other sites More sharing options...
paul Posted June 7, 2010 Author Share Posted June 7, 2010 版主考虑全面,赞一个 Link to comment Share on other sites More sharing options...
paul Posted June 8, 2010 Author Share Posted June 8, 2010 一楼写的txt文档少写了样式manufacturer显示部分补充打开 modules/blockmanufacturer/blockmanufacturer.tpl查找 title="{l s='More about' mod='blockmanufacturer'}在其前面插入代码{if $id_manufacturer_temp == $manufacturer.id_manufacturer} class = "selected" {/if} 可以看到点击主页manufacturer块中的 manufacturer 时多了一个选择样式 Link to comment Share on other sites More sharing options...
paul Posted June 8, 2010 Author Share Posted June 8, 2010 重新上传 实现Categories和Manufacturers联合搜索.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now