Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public function getOrders()
  2. {
  3. if (!($customerId = $this->_customerSession->getCustomerId())) {
  4. return false;
  5. }
  6. if (!$this->orders) {
  7. $this->orders = $this->getOrderCollectionFactory()->create($customerId)->addFieldToSelect(
  8. '*'
  9. )->addFieldToFilter(
  10. 'status',
  11. ['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
  12. )->addFieldToFilter('my_attribute', array("eq" => "Some value"))
  13. ->addFieldToFilter("category_ids", array("nin" => 9))
  14. ->setOrder(
  15. 'created_at',
  16. 'desc'
  17. );
  18. }
  19. return $this->orders;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement