example: i have a table "table_1" i want to join product collection to get the product data? but I don't know how to join product collection? so everybody can help me pls?

  • List item

  • 1
    What join you need and what is relationShip Between Magento product collection & table_1.
    – Amit Bera
    Commented May 3, 2019 at 9:04
  • Where you want to join?
    – Amit Bera
    Commented May 3, 2019 at 9:04
  • i want get all attribute of product for column controls in my grid
    – NewBie
    Commented May 3, 2019 at 9:20

1 Answer 1


Found this one, you can try it (this is untested):

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$collection = $objectManager->get('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory')->getCollection();
$collection->getSelect()->join( array('custom_table'=> 'table_1'), 'custom_table.id = main_table.entity_id', array('custom_table.sku'));   

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.