doujia2463 2018-01-29 22:53
浏览 60
已采纳

PrestaShop - 获取登录用户的订单

How to fetch user order history programmatically in a custom module via $this->context?

$this->context->link->getOrderHistory(); ???
  • 写回答

1条回答 默认 最新

  • doushi7805 2018-01-29 22:59
    关注

    You can use the static getCustomerOrders function from the Order class:

    Order::getCustomerOrders((int)$this->context->customer->id))
    

    It will return an array of the customer orders

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?