2

I used this code but it not working. Please help me!

$customerEntity = $locationList->getTable('customer_entity');

$locationList = $this->mpSellerMapLocatorModel->getCollection();
$locationList->getSelect()->join(
            $customerEntity.' as cpev',
            'main_table.seller_id = cpev.entity_id',
            ['firstname','lastname']
        );

1 Answer 1

1

Try below solution:

    $locationList->getSelect()
    ->join(array('cpev' => 'customer_entity'), 
    'cpev.entity_id=main_table.seller_id', 
array('firstname' => 'firstname', 'lastname' => 'lastname'));

Also donot call the collection using model class using $locationList = $this->mpSellerMapLocatorModel->getCollection();

Use Collection Class means {VendorName}/{ModuleName}/Model/ResourceModel/{Entity}/Collection

1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.