MAGENTO custom options grid -
MAGENTO custom options grid -
i have extention - advanced custom options. display related options every products in order/grid.
this code use:
protected function _preparecollection() { $collection = mage::getresourcemodel('sales/order_grid_collection'); $collection->getselect()->join ( 'sales_flat_order_item', 'sales_flat_order_item.order_id = main_table.entity_id', array ( 'price' => new zend_db_expr('group_concat(sales_flat_order_item.price separator "<br><br><hr>")'), 'proname' => new zend_db_expr('group_concat(sales_flat_order_item.name separator "<br><hr>")'), 'proptions' => new zend_db_expr('group_concat(sales_flat_order_item.product_options separator "<br><hr>")'), ) ); $collection->getselect()->group('main_table.entity_id'); $this->setcollection($collection); homecoming mage_adminhtml_block_widget_grid::_preparecollection(); }
the result incomplete array of product alternative related product.
how can (proptions) lables/title?
can add together next line above return
statement , give me output? have feeling if you're getting partial response, may related sql query itself.
mage::log($collection->getselect()->__tostring());
you might seek giving leftjoin shot instead of inner bring together using $collection->getselect()->leftjoin()
, depending on construction of query.
magento grid sales
Comments
Post a Comment