Note that there are some explanatory texts on larger screens.

plurals
  1. POJoin tables and display the data in Magento Grid using XML
    primarykey
    data
    text
    <p>I am trying to customise Magento Sales/Order/Grid by adding columns to display data for </p> <p>Customer_Id Billing_Address Shipping_Address</p> <p>I've created a module following an earlier post </p> <p>I am now trying to join the tables but haven't been able to figure out how to do this using XML. </p> <pre><code>&lt;gridcontrol&gt; &lt;grids&gt; &lt;sales_order_grid&gt; &lt;!-- remove order id --&gt; &lt;shipping_address&gt; &lt;add&gt; &lt;header&gt;Shipping Address&lt;/header&gt; &lt;!-- join shipping address from sales/order table --&gt; &lt;join table="sales_flat_order_address" condition="sales_flat_order_address.entity_id={{table}}.street" field="street"/&gt; &lt;/add&gt; &lt;after&gt;status&lt;/after&gt; &lt;/shipping_address&gt; &lt;billing_address&gt; &lt;add&gt; &lt;header&gt;Billing Address&lt;/header&gt; &lt;!-- join shipping address from sales/order table --&gt; &lt;join table="sales_flat_order_address" condition="sales_flat_order_address.entity_id={{table}}.street" field="street"/&gt; &lt;/add&gt; &lt;after&gt;status&lt;/after&gt; &lt;/billing_address&gt; &lt;customer_id&gt; &lt;add&gt; &lt;header&gt;Customer Id&lt;/header&gt; &lt;!-- join shipping address from sales/order table --&gt; &lt;join table="sales_flat_order" condition="main_table.cutomer_id={{table}}.customer_id" field="customer_id"/&gt; &lt;/add&gt; &lt;after&gt;status&lt;/after&gt; &lt;/customer_id&gt; &lt;/sales_order_grid&gt; &lt;/grids&gt; &lt;/gridcontrol&gt; </code></pre> <p>I have the new columns showing in my grid but there are empty so I know I am doing something incorrectly and I assume it is something really simple. I would be grateful if someone could show me how to join the correct tables using this method.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload