Magento的订单导出机制内置不导出商品订单我想问一下如何导出每个订单上的一个Worksheet Worksheet里面的每一条数据都是商品信息
以下是示例
<Workbook>
<Worksheet ss:Name="order1">
<Table>
<Row>
<Cell><Data ss:Type="String">Order #</Data></Cell>
<Cell><Data ss:Type="String">SKU</Data></Cell>
<Cell><Data ss:Type="String">Qty</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell><Data ss:Type="String">A1</Data></Cell>
<Cell><Data ss:Type="Number">3</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell><Data ss:Type="String">A2</Data></Cell>
<Cell><Data ss:Type="Number">5</Data></Cell>
</Row>
</Table>
</Worksheet>
<Worksheet ss:Name="order2">
<Table>
<Row>
<Cell><Data ss:Type="String">Order #</Data></Cell>
<Cell><Data ss:Type="String">SKU</Data></Cell>
<Cell><Data ss:Type="String">Qty</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell><Data ss:Type="String">B1</Data></Cell>
<Cell><Data ss:Type="Number">2</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell><Data ss:Type="String">B2</Data></Cell>
<Cell><Data ss:Type="Number">3</Data></Cell>
</Row>
</Table>
</Worksheet>
通过了解lib/Varien/Convert/Parser/Xml/Excel.php,Magento本身不支持multi-Worksheet Export 我打算再写一个Parser,做multi-Worksheet Export。
但是更大的问题,导出数据需要通过app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php的_prepareColumns()处理但是我找不到怎么调用数据库
希望能帮到你,谢谢