Model/Sales/Quote.php
private function processAbandonedCartsForGuests($storeId, $websiteId, $result)
    {
        $secondGuestEnabled = $this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_TWO, $storeId);
        $thirdGuestEnabled = $this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_THREE, $storeId);

        //first guest
        if ($this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_ONE, $storeId) ||
            $secondGuestEnabled ||
            $thirdGuestEnabled
        ) {
            $result[$storeId]['firstGuest'] = $this->processGuestFirstAbandonedCart($storeId);
        }
        //second guest
        if ($secondGuestEnabled) {
            $result[$storeId]['secondGuest'] = $this->processExistingAbandonedCart(
                $this->getLostBasketGuestCampaignId(self::GUEST_LOST_BASKET_TWO, $storeId),
                $storeId,
                $websiteId,
                self::GUEST_LOST_BASKET_TWO,
                true
            );
        }
        //third guest
        if ($thirdGuestEnabled) {
            $result[$storeId]['thirdGuest'] = $this->processExistingAbandonedCart(
                $this->getLostBasketGuestCampaignId(self::GUEST_LOST_BASKET_THREE, $storeId),
                $storeId,
                $websiteId,
                self::GUEST_LOST_BASKET_THREE,
                true
            );
        }

        return $result;
    }
private function processAbandonedCartsForGuests($storeId, $websiteId, $result)
    {
        $secondGuestEnabled = $this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_TWO, $storeId);
        $thirdGuestEnabled = $this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_THREE, $storeId);

        //first guest
        if ($this->isLostBasketGuestEnabled(self::GUEST_LOST_BASKET_ONE, $storeId) ||
            $secondGuestEnabled ||
            $thirdGuestEnabled
        ) {
            $result[$storeId]['firstGuest'] = $this->processGuestFirstAbandonedCart($storeId);
        }
        //second guest
        if ($secondGuestEnabled) {
            $result[$storeId]['secondGuest'] = $this->processExistingAbandonedCart(
                $this->getLostBasketGuestCampaignId(self::GUEST_LOST_BASKET_TWO, $storeId),
                $storeId,
                $websiteId,
                self::GUEST_LOST_BASKET_TWO,
                true
            );
        }
        //third guest
        if ($thirdGuestEnabled) {
            $result[$storeId]['thirdGuest'] = $this->processExistingAbandonedCart(
                $this->getLostBasketGuestCampaignId(self::GUEST_LOST_BASKET_THREE, $storeId),
                $storeId,
                $websiteId,
                self::GUEST_LOST_BASKET_THREE,
                true
            );
        }

        return $result;
    }
private function processAbandonedCartsForGuests ( $ storeId , $ websiteId , $ result ) { $ secondGuestEnabled = $ this -> isLostBasketGuestEnabled ( self :: GUEST_LOST_BASKET_TWO , $ storeId ) ; $ thirdGuestEnabled = $ this -> isLostBasketGuestEnabled ( self :: GUEST_LOST_BASKET_THREE , $ storeId ) ; //first guest if ( $ this -> isLostBasketGuestEnabled ( self :: GUEST_LOST_BASKET_ONE , $ storeId ) || $ secondGuestEnabled || $ thirdGuestEnabled ) { $ result [ $ storeId ] [ 'firstGuest' ] = $ this -> processGuestFirstAbandonedCart ( $ storeId ) ; } //second guest if ( $ secondGuestEnabled ) { $ result [ $ storeId ] [ 'secondGuest' ] = $ this -> processExistingAbandonedCart ( $ this -> getLostBasketGuestCampaignId ( self :: GUEST_LOST_BASKET_TWO , $ storeId ) , $ storeId , $ websiteId , self :: GUEST_LOST_BASKET_TWO , true ) ; } //third guest if ( $ thirdGuestEnabled ) { $ result [ $ storeId ] [ 'thirdGuest' ] = $ this -> processExistingAbandonedCart ( $ this -> getLostBasketGuestCampaignId ( self :: GUEST_LOST_BASKET_THREE , $ storeId ) , $ storeId , $ websiteId , self :: GUEST_LOST_BASKET_THREE , true ) ; } return $ result ; }
Process abandoned carts for guests

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

@return array
Process abandoned carts for guests