0

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?

Robert
  • 114
  • 8

2 Answers2

1

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();
Robert
  • 114
  • 8
0

You should create models for the tables (if there aren't any available already) How to create a model Then you can simply get an instance of the model

$ebay = Mage::getModel('m2epro/ebay')->load($row_id);
echo $ebay->getData('ebay_order_id');
Cobolt
  • 935
  • 2
  • 11
  • 24