1

\Block\Account\Message\Message.php

public function getAffiliateCustomerCollection()
        {
            $customerId = $this->customerSession->getCustomer()->getId(); 
            $affiliatecustomer = $this->_affiliateFactory->create();
            $customer = $this->_customerFactory->create()->getCollection();
            $collection = $affiliatecustomer ->getCollection();

        $joinConditions = 'customer_entity.entity_id = affiliate.customer_id';

        $collection->getSelect()->join(
            ['affiliate' => $collection->getTable('affiliate_account')],
            $joinConditions,
            []
        );

          $collection ->addFieldToFilter('customer_id',  $customerId);


         return $collection;
    }

This function not join the customer collection with affiliate customer collection and cannot identify the issue with joining these two collections

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.