In the checkout-cart (template/checkout/cart/item/default.phtml)
I have this code:
$simpleProduct = $this->getItem()->getOptionByCode('simple_product')->getProduct();
I want to use the same code in the Order Mail (template/email/order/items/order/default.phtml)
<?php $_item = $this->getItem() ?>
...
$simpleProduct = $_item->getOptionByCode('simple_product')->getProduct();
This leads to this error:
PHP Fatal error: Call to a member function getProduct() on a non-object
So how can I get the simple_product of configurable product in mail order?