I've been trying to join 2 tables with the existing collection of Customers (customer_entity).

I've added like below.

$items->getSelect()->join('customer_entity_text as second', 'main_table.entity_id = second.entity_id');

Above is working fine, But if i add one more table to join with this is that is customer_entity_varchar than its not working.

Below is my code to join 2 tables.

$items->getSelect()->join('customer_entity_text as second', 
'main_table.entity_id = second.entity_id')
->join('customer_entity_varchar as third', 'main_table.entity_id = third.entity_id');

Any guide ?


  • 1
    It should work fine for more than 2 tables also. Can you share your code for 3 tables? May 25, 2018 at 13:34
  • just a question: why do you want to join and not simple addAttributeToSelect()? May 25, 2018 at 21:49
  • @MohitKumarArora, Check i've updated question.
    – anonymous
    May 26, 2018 at 4:14

1 Answer 1


Try to do with the addition of joins , example : (substitute your columns)

                    'e.entity_id = table1join.product_id',
                    'e.entity_id = table1join.product_id',
                'e.entity_id = table2join.product_id',

I hope my answer brings you closer to the solution.

Your Answer

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

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