商家查看订单详情页面中,商家做发货操作,操作记录中订单改变状态改变显示错误,如下图所示:
原因是在订单表中未读取status字段,下面代码引用的时候默认为0,所以显示状态为交易关闭。12月22日之前的源码有此问题,可以根据以下修改。之后下载使用的源码已经修复,可以忽略。
修改代码如下:
打开frontend/models/Seller_orderShippedForm.php
public function formData($post = null)
{
if(!$post->order_id || !($orderInfo = OrderModel::find()->alias('o')->select('o.order_id,order_sn,buyer_id,seller_id,buyer_name,seller_name,express_no,express_comkey,ex.phone_mob')->joinWith('orderExtm ex', false)->where(['o.order_id' => $post->order_id, 'seller_id' => $this->store_id])->andWhere(['in', 'status', [Def::ORDER_SUBMITTED, Def::ORDER_ACCEPTED, Def::ORDER_SHIPPED]])->asArray()->one())) {
$this->errors = Language::get('no_such_order'),
return false;
}
return $orderInfo;
}
//修改为
public function formData($post = null)
{
if(!$post->order_id || !($orderInfo = OrderModel::find()->alias('o')->select('o.order_id,o.status,order_sn,buyer_id,seller_id,buyer_name,seller_name,express_no,express_comkey,ex.phone_mob')->joinWith('orderExtm ex', false)->where(['o.order_id' => $post->order_id, 'seller_id' => $this->store_id])->andWhere(['in', 'status', [Def::ORDER_SUBMITTED, Def::ORDER_ACCEPTED, Def::ORDER_SHIPPED]])->asArray()->one())) {
$this->errors = Language::get('no_such_order'),
return false;
}
return $orderInfo;
}