magentom2e-pro

Magento: Add additional info to Invoice PDF


I am utilizing M2EPro to sync orders from eBay and Amazon.

I would like to add the Amazon Order ID and Ebay Order ID to my PDF invoices.

I need the data from:

Column amazon_order_id from m2epro_ebay_order

and

Column ebay_order_id from m2epro_amazon_order 

Can anyone offer suggestions as to a protected function to add to Abstract.php or any other solution?


Solution

  • Thank you for the help! I used:

    $order = Mage::getModel('sales/order')->load(entity_id); 
    $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment()) 
    ->setIsSecureMode(true);
    
    $channelOrderId = $paymentInfo->getChannelOrderId();