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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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