帝国cms7.5在提交订单是默认选择自己新增的地址

发布时间:2021-02-21 16:11:49www.zcabc.com 作者: 浏览:

帝国cms7.5在提交订单是默认选择自己新增的地址?

首先进入文件/e/template/ShopSys/order.php
搜索下面的代码,
$addresssql=$empire->query("select addressid,addressname,isdefault from {$dbtbpre}enewsshop_address where userid='$user[userid]' ");
或者
$addresssql=$empire->query("select addressid,addressname,isdefault from {$dbtbpre}enewsshop_address where userid='$user[userid]'");

再其 userid='$user[userid]'后面增加如下内容:
order by addressid desc

整合后为:
$addresssql=$empire->query("select addressid,addressname,isdefault from {$dbtbpre}enewsshop_address where userid='$user[userid]' order by addressid desc");
即可实现了