Question

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?

Was it helpful?

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();

OTHER TIPS

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');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top