从退货中获取订单信息

时间:2015-03-20 10:35:37

标签: opencart opencart2.x

如何安全验证客户在退货时输入了正确的订单ID?

目前我这样做:

if ($return_info['order_id'] && $this->customer->isLogged() && $this->customer->getId() == $return_info['customer_id']) {   

如果客户未登录,我该如何为客人结账?

1 个答案:

答案 0 :(得分:3)

if ($return_info['order_id'] && 
   $this->customer->isLogged() &&
   $this->customer->getId() == $return_info['customer_id']) {
   //Condition for register user

} else if ($return_info['order_id'] && 
  !$this->customer->isLogged() && 
  $return_info['customer_id'] == 0 ){

   //Condition for guest user
}