Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getOrders()
- {
- if (!($customerId = $this->_customerSession->getCustomerId())) {
- return false;
- }
- if (!$this->orders) {
- $this->orders = $this->getOrderCollectionFactory()->create($customerId)->addFieldToSelect(
- '*'
- )->addFieldToFilter(
- 'status',
- ['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
- )->addFieldToFilter('my_attribute', array("eq" => "Some value"))
- ->addFieldToFilter("category_ids", array("nin" => 9))
- ->setOrder(
- 'created_at',
- 'desc'
- );
- }
- return $this->orders;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement