I am trying to edit a credit memo email template. Currently when a credit memo is submitted the template renders all of the products from the order.
<?php $i=0; foreach ($_order->getAllItems() as $_item): ?> <?php if($_item->getParentItem()) continue; else $i++; ?> <tbody<?php echo $i%2 ? '' : '' ?>> <?php echo $this->getItemHtml($_item) ?> </tbody> <?php endforeach; ?>
I need to get the returns data so I can tell the loop to ignore products with the id of any returned items from an order. As far as I can see return details are not included in the order object. So how, using the order id, can I get a list of returned products from an order.
Any alternative methods/suggestions welcome also.