質問

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']
        );
役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top