Model/ResourceModel/Order/Collection.php
public function getStoreQuotesForGuestsAndCustomers($storeId, $updated)
    {
        $salesCollection = $this->quoteCollection->create();
        $salesCollection->addFieldToFilter('is_active', 1)
            ->addFieldToFilter('items_count', ['gt' => 0])
            ->addFieldToFilter('customer_email', ['neq' => ''])
            ->addFieldToFilter('main_table.store_id', $storeId)
            ->addFieldToFilter('main_table.updated_at', $updated);

        if ($this->helper->isOnlySubscribersForAC($storeId)) {
            $salesCollection = $this->subscriberFilterer->filterBySubscribedStatus($salesCollection);
        }

        return $salesCollection;
    }
public function getStoreQuotesForGuestsAndCustomers($storeId, $updated)
    {
        $salesCollection = $this->quoteCollection->create();
        $salesCollection->addFieldToFilter('is_active', 1)
            ->addFieldToFilter('items_count', ['gt' => 0])
            ->addFieldToFilter('customer_email', ['neq' => ''])
            ->addFieldToFilter('main_table.store_id', $storeId)
            ->addFieldToFilter('main_table.updated_at', $updated);

        if ($this->helper->isOnlySubscribersForAC($storeId)) {
            $salesCollection = $this->subscriberFilterer->filterBySubscribedStatus($salesCollection);
        }

        return $salesCollection;
    }
public function getStoreQuotesForGuestsAndCustomers ( $ storeId , $ updated ) { $ salesCollection = $ this -> quoteCollection -> create ( ) ; $ salesCollection -> addFieldToFilter ( 'is_active' , 1 ) -> addFieldToFilter ( 'items_count' , [ 'gt' => 0 ] ) -> addFieldToFilter ( 'customer_email' , [ 'neq' => '' ] ) -> addFieldToFilter ( 'main_table.store_id' , $ storeId ) -> addFieldToFilter ( 'main_table.updated_at' , $ updated ) ; if ( $ this -> helper -> isOnlySubscribersForAC ( $ storeId ) ) { $ salesCollection = $ this -> subscriberFilterer -> filterBySubscribedStatus ( $ salesCollection ) ; } return $ salesCollection ; }
Get store quotes for both guests and customers, excluding inactive and empty.

@param int $storeId
@param array $updated

@return \Magento\Quote\Model\ResourceModel\Quote\Collection
Get store quotes for both guests and customers excluding inactive and empty .