Skip to content

Instantly share code, notes, and snippets.

@brobie
Created May 25, 2017 01:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brobie/5cfb055ec190f40bb8c059c31ab430f6 to your computer and use it in GitHub Desktop.
Save brobie/5cfb055ec190f40bb8c059c31ab430f6 to your computer and use it in GitHub Desktop.
Joining Data For Order Grid
<virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
<arguments>
<argument name="joins" xsi:type="array">
<item name="table_that_you_want_to_join" xsi:type="array">
<item name="table" xsi:type="string">table_that_you_want_to_join</item>
<item name="origin_column" xsi:type="string">entity_id</item>
<item name="target_column" xsi:type="string">parent_id</item>
</item>
</argument>
<argument name="columns" xsi:type="array">
<item name="column_name_you_need" xsi:type="string">table_that_you_want_to_join.column_name_you_need</item>
</argument>
</arguments>
</virtualType>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment