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

同主题文章

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

你可能也喜欢

在网上找到一个合作伙伴
zencart 首信易 模块修正方案
escrow paypal credit card 相关
中国互联网战争局势图
excel 批量去除超链接
抱着老板的心态去打工
五大WordPress图片相册插件详解
mop猫扑的一批精彩回复收藏

当前位置: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. Prohibited Products
  2. 辛苦收集的澄海3c地图供大家下载
  3. 基本简单的SSH 命令
  4. 关于提升流量的google测试 艾萨克·牛顿
  5. 使用wordprss缓存插件总结
  6. 仿牌zencart网站建设
  7. wordpress设计退出链接
  8. 真受不了拍拍 paipai
用户名: 访客
邮箱:
评论内容:

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

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

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

rss sitemaps