1
我有一個擴展 - 高級自定義選項。 我想在訂單/網格中顯示每個產品的相關選項。MAGENTO自定義選項網格
這是我使用的代碼:
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);
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
}
結果我得到的是與產品有關的產品選項的完全數組。
我如何獲得(標題)標籤?