zencart产品排序 - zencart : 网店系统 : CEO-Jack个人博客
  • 设为首页|收藏本站| 标签云|
  • ·外贸网站建设
  • 首页
  • SEO
  • 网店系统
  • 编程相关
  • 个人资源
  • 新闻
  • 联系我们
123

同主题文章

zen-cart ...
出售 zencar...
关于zencart...
zencart m...

你可能也喜欢

极度郁闷
paypal 禁止出售的产品
娱乐一下
推荐一款杀毒软件
pepperjamnetwork pepperjam 注册赚钱 流程
幸福的家庭往往是类似的,不幸的家庭有各自的不行!
辛苦收集的澄海3c地图供大家下载
生态位一方式链接建设服务

当前位置:Home > 网店系统 > zencart > zencart产品排序
zencart

zencart产品排序

发布者:老刘 发布时间: 2010-05-05

 

zencart产品排序的问题: 个人认为:后台是有这个选项的,但是很多客户都不喜欢这个,希望把最新的产品排到前面去! 参考别人的更改代码:用批量的sortorder 很明显是很不明智的做法,最好的方法是改核心的代码判断设置! 如果zencart产品排序 下面的办法不能解决的话,那么只要设置更改如下的简单方法: 根据后台设置她的排序为按model排序,那么就好办多了! 附完整步聚: 1.默认default:的 sql改为order by p.products_date_added DESC ,原来case5改为$product_sort = ” order by p.products_ordered DESC”; {文件地址:\includes\index_filters\default_filter.php} 2.修改product_listing.php的

array(‘Bestselling’,'Item Name’,'Price(Low to high)’,'Price(High to low)’,'New Arrival’); 为
$nsort = array(‘New Arrival’,'Item Name’,'Price(Low to high)’,'Price(High to low)’,'Bestselling’); {文件地址:\includes\modules\product_listing.php}
3.改代码:{文件地址:\includes\index_filters\default_filter.php}
// We show them all
$listing_sql = “select ” . $select_column_list . ” p.products_id, p.products_type,p.products_status,p.products_price,p.products_price_retail,p.products_price_sample,p.product_is_wholesale,p.product_wholesale_min,p.products_quantity, p.products_quantity_order_min, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from ” . TABLE_PRODUCTS_DESCRIPTION . ” pd, ” .
TABLE_PRODUCTS . ” p left join ” . TABLE_MANUFACTURERS . ” m on p.manufacturers_id = m.manufacturers_id, ” .
TABLE_PRODUCTS_TO_CATEGORIES . ” p2c left join ” . TABLE_SPECIALS . ” s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = ‘” . (int)$_SESSION['languages_id'].”‘”. $displayOrder. $priceOrder.”
and ” . $product_in_categories_sql;
}
}
————————————–>
// We show them all

if ($_GET['productsort'] ==”) {
$sort = ‘ order by p.products_date_added DESC’;
}else{
$sort = ”;
}
$listing_sql = “select ” . $select_column_list . ” p.products_id, p.products_type,p.products_status,p.products_price,p.products_price_retail,p.products_price_sample,p.product_is_wholesale,p.product_wholesale_min,p.products_quantity, p.products_quantity_order_min, p.master_categories_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status
from ” . TABLE_PRODUCTS_DESCRIPTION . ” pd, ” .
TABLE_PRODUCTS . ” p left join ” . TABLE_MANUFACTURERS . ” m on p.manufacturers_id = m.manufacturers_id, ” .
TABLE_PRODUCTS_TO_CATEGORIES . ” p2c left join ” . TABLE_SPECIALS . ” s on p2c.products_id = s.products_id
where p.products_status = 1
and p.products_id = p2c.products_id
and pd.products_id = p2c.products_id
and pd.language_id = ‘” . (int)$_SESSION['languages_id'].”‘”. $displayOrder. $priceOrder.”
and ” . $product_in_categories_sql . $sort;
}
}
可以参考上面的方法去解决,如果还是没能解决问题的话,....找我吧!


原创文章,欢迎转载。转载请注明:转载自http://www.wai-mao.net/happy/a-1878.html,谢谢!


相关文章:
  1. ecshop 首信易支付模块出售
  2. 2010年股市开盘时间
  3. 开心消消乐 android游戏 破解 购买道具免费版本
  4. 一篇哲学文章
  5. 长期坐着不动会得什么病?
  6. paypal反冻结,paypal防冻结2.0版本
  7. 关于中文赚钱博客
  8. FeedSky: 12c55597
用户名: 访客
邮箱:
评论内容:

   下一篇: zen cart 根据客户ip显示对应国家货币模块出售
上一篇: zencart 后台编码更改,让后台支持中文

首页| 关于我们| zencart优化| paypal防冻结| 在线留言| 新闻|

© 2005-2025 CEO-Jack个人博客 Copyright, All Rights Reserved.  2014-2020  

rss sitemaps