zoukankan      html  css  js  c++  java
  • ECSHOP让产品浏览历史按照先后进行排序

    ecshop本身默认的产品浏览历史是按照商品ID排序

    这样似乎用户体验不太好,国内几个大型电商网站,都是用的浏览先后次序进行排序。

    只需修改一行代码便能实现该功能,让浏览历史按照浏览先后进行排序。

    打开 includes/lib_insert.php,找到 insert_history() 函数部分,将

    ” WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0″;

    修改为

    ” WHERE $where AND is_on_sale = 1 AND is_alone_sale = 1 AND is_delete = 0 order by INSTR(‘”.$_COOKIE['ECS']['history'].”‘,goods_id)”;

    这样,产品浏览历史便可按照先后进行排序了。

    ------------------------------------------华丽丽的分割线--------------------- ------------------------------------

    源厂制造10-10000级洁净无尘车间防静电防尘用品!网址:http://www.lgfjd.com 微信号:614412
  • 相关阅读:
    linux ioctl
    pkg-config用法和gcc cflags
    boost noncopyable类
    google protobuf使用2
    跨平台编译CMake使用
    Linux epoll
    docker安装
    python 脚本转成exe可执行程序
    shell相关知识
    tcpdump使用
  • 原文地址:https://www.cnblogs.com/wangblognet/p/2876509.html
Copyright © 2011-2022 走看看