I have a bundled product with 3 associated Bundle Items:
When a customer makes their 3 choices and places an order, the line items for each choice don't show up in the Magento Orders admin page. I checked the rendered HTML and no rows are rendered in the body of this table for Items Ordered, only the table header with the column headings:
The line items do however show up if you then click on the Invoice button:
Line items show up correctly for simple products and configurable products. Does anyone know what is causing the line items to not show?
Updated:
We are using the Amasty Pre-order extension and it seems to be this which is causing the bundled products to not show in the Order line items. https://amasty.com/magento-pre-order.html
The line items table is rendered using this code:
<tbody class="DANIEL <?php echo $i%2?'even':'odd' ?>">
<?php Mage::log('++ Admin>Sales>Order>View>Items.phtml', null, 'crocodile.log', true) ?>
<?php echo $this->getItemHtml($_item) ?>
<?php echo $this->getItemExtraInfoHtml($_item) ?>
</tbody>
In the rendered HTML we see the "DANIEL" class on the but not inner html.
getItemHtml is from Mage/Adminhtml/Block/Sales/Items/Abstract.php
public function getItemHtml(Varien_Object $item)
{
if ($item->getOrderItem()) {
$type = $item->getOrderItem()->getProductType();
} else {
$type = $item->getProductType();
}
//return $this->getItemRenderer($type)
// ->setItem($item)
// ->setCanEditQty($this->canEditQty())
// ->toHtml();
$renderer = $this->getItemRenderer($type)
->setItem($item)
->setCanEditQty($this->canEditQty());
Mage::log('get_class(renderer): '.get_class($renderer), null, 'mylog.log', true);
return $renderer->toHtml();
The log shows that the renderer is of type Amasty_Preorder_Block_Rewrite_Bundle_Adminhtml_Sales_Order_View_Items_Renderer and calling toHtml returns a blank string:
get_class(renderer): Amasty_Preorder_Block_Rewrite_Bundle_Adminhtml_Sales_Order_View_Items_Renderer
This returns a blank string:
var $theHtml = $renderer->toHtml();