Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am still looking for a good solution myself. But as an approach I would like to contribute my knowledge so far based on Magento 1.7</p> <ul> <li>I prefer use of <code>setCollection</code> instead of <code>_prepareCollection()</code>. It seems there are less problems with filtering etc. when using <code>setCollection</code></li> <li><p>The perfect attribute is so close yet so far. shipping_description can be found in <code>sales_order_flat</code>. Unfortunately the default collection is based upon <code>sales_flat_order_grid</code>. One possible solution is to switch this by overwriting <code>_getCollectionClass</code></p> <pre><code>protected function _getCollectionClass() { //return 'sales/order_grid_collection'; return 'sales/order_collection'; } </code></pre> <p>It's important to say that this leads to other problems. E.g. shipping name and billing name are empty because they got their info from <code>sales_flat_order_grid</code>. We could get them from <code>sales_flat_order_address</code> but I am not sure if this leads to far away from a good solution...</p></li> <li><p>Another approach is to join with <code>sales_order_flat</code>. This way we keep all information from <code>sales_flat_order_grid</code> and also can get the <code>shipping_method</code>. Problem here is a count(*) statement that occurs while filtering. The error is about an ambigious <code>increment_id</code>. At the moment I think it is a Magento bug because <code>increment_id</code> should not be used without conjunction to its table. </p></li> <li><p>Not to forget a third way: We could extend <code>saled_flat_order_grid</code> and add <code>shipping_method</code>, but I think that would be way to harsh. Dont't touch <code>app/code/core</code> und the tables as long as nobody stands behind you with a gun in his hands ;-)</p></li> </ul> <p>So far I am still undecided which way to go. Perhaps there is another (better) way that I didn't list here?</p>
    singulars
    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.
    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