如何安全验证客户在退货时输入了正确的订单ID?
目前我这样做:
if ($return_info['order_id'] && $this->customer->isLogged() && $this->customer->getId() == $return_info['customer_id']) {
如果客户未登录,我该如何为客人结账?
答案 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
}