* All rights reserved * * Reuse or modification of this source code is not allowed * without written permission from creativestyle GmbH * * @category Creativestyle * @package Creativestyle_CheckoutByAmazon * @copyright Copyright (c) 2012 creativestyle GmbH (http://www.creativestyle.de) * @author Marek Zabrowarny / creativestyle GmbH */ class Creativestyle_CheckoutByAmazon_Block_Adminhtml_Logger_Grid_Renderer_Order extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { protected static $_orderIdMapper = array(); public function render(Varien_Object $row) { $realOrderIds = array(); if (is_array($row->getOrderId()) && count($row->getOrderId())) { foreach ($row->getOrderId() as $orderId) { if (isset(self::$_orderIdMapper[$orderId])) { $realOrderIds[] = self::$_orderIdMapper[$orderId]; } else { $order = Mage::getModel('sales/order')->load($orderId); if ($order->getId()) $realOrderIds[] = $order->getIncrementId(); unset($order); } } } return implode(', ', $realOrderIds); } }