Model/Sales/Quote.php
private function processAbandonedCartsForCustomers($storeId, $websiteId, $result)
    {
        $secondCustomerEnabled = $this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_TWO, $storeId);
        $thirdCustomerEnabled = $this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_THREE, $storeId);

        //first customer
        if ($this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_ONE, $storeId) ||
            $secondCustomerEnabled ||
            $thirdCustomerEnabled
        ) {
            $result[$storeId]['firstCustomer'] = $this->processCustomerFirstAbandonedCart($storeId);
        }

        //second customer
        if ($secondCustomerEnabled) {
            $result[$storeId]['secondCustomer'] = $this->processExistingAbandonedCart(
                $this->getLostBasketCustomerCampaignId(self::CUSTOMER_LOST_BASKET_TWO, $storeId),
                $storeId,
                $websiteId,
                self::CUSTOMER_LOST_BASKET_TWO
            );
        }

        //third customer
        if ($thirdCustomerEnabled) {
            $result[$storeId]['thirdCustomer'] = $this->processExistingAbandonedCart(
                $this->getLostBasketCustomerCampaignId(self::CUSTOMER_LOST_BASKET_THREE, $storeId),
                $storeId,
                $websiteId,
                self::CUSTOMER_LOST_BASKET_THREE
            );
        }

        return $result;
    }
private function processAbandonedCartsForCustomers($storeId, $websiteId, $result)
    {
        $secondCustomerEnabled = $this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_TWO, $storeId);
        $thirdCustomerEnabled = $this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_THREE, $storeId);

        //first customer
        if ($this->isLostBasketCustomerEnabled(self::CUSTOMER_LOST_BASKET_ONE, $storeId) ||
            $secondCustomerEnabled ||
            $thirdCustomerEnabled
        ) {
            $result[$storeId]['firstCustomer'] = $this->processCustomerFirstAbandonedCart($storeId);
        }

        //second customer
        if ($secondCustomerEnabled) {
            $result[$storeId]['secondCustomer'] = $this->processExistingAbandonedCart(
                $this->getLostBasketCustomerCampaignId(self::CUSTOMER_LOST_BASKET_TWO, $storeId),
                $storeId,
                $websiteId,
                self::CUSTOMER_LOST_BASKET_TWO
            );
        }

        //third customer
        if ($thirdCustomerEnabled) {
            $result[$storeId]['thirdCustomer'] = $this->processExistingAbandonedCart(
                $this->getLostBasketCustomerCampaignId(self::CUSTOMER_LOST_BASKET_THREE, $storeId),
                $storeId,
                $websiteId,
                self::CUSTOMER_LOST_BASKET_THREE
            );
        }

        return $result;
    }
private function processAbandonedCartsForCustomers ( $ storeId , $ websiteId , $ result ) { $ secondCustomerEnabled = $ this -> isLostBasketCustomerEnabled ( self :: CUSTOMER_LOST_BASKET_TWO , $ storeId ) ; $ thirdCustomerEnabled = $ this -> isLostBasketCustomerEnabled ( self :: CUSTOMER_LOST_BASKET_THREE , $ storeId ) ; //first customer if ( $ this -> isLostBasketCustomerEnabled ( self :: CUSTOMER_LOST_BASKET_ONE , $ storeId ) || $ secondCustomerEnabled || $ thirdCustomerEnabled ) { $ result [ $ storeId ] [ 'firstCustomer' ] = $ this -> processCustomerFirstAbandonedCart ( $ storeId ) ; } //second customer if ( $ secondCustomerEnabled ) { $ result [ $ storeId ] [ 'secondCustomer' ] = $ this -> processExistingAbandonedCart ( $ this -> getLostBasketCustomerCampaignId ( self :: CUSTOMER_LOST_BASKET_TWO , $ storeId ) , $ storeId , $ websiteId , self :: CUSTOMER_LOST_BASKET_TWO ) ; } //third customer if ( $ thirdCustomerEnabled ) { $ result [ $ storeId ] [ 'thirdCustomer' ] = $ this -> processExistingAbandonedCart ( $ this -> getLostBasketCustomerCampaignId ( self :: CUSTOMER_LOST_BASKET_THREE , $ storeId ) , $ storeId , $ websiteId , self :: CUSTOMER_LOST_BASKET_THREE ) ; } return $ result ; }
Process abandoned carts for customer

@param int $storeId
@param int $websiteId
@param array $result

@return array
Process abandoned carts for customer