July 14, 2020


Thinking Magento

M2Epro Multi Channel Extension - Ebay Channel Url

You maybe using the M2Epro Multi Channel extension and realise that when you are viewing an order, there is no direct link to the order details on ebay. There is a link provided for Amazon orders.

To fix this issue so you can go straight from your Magento order to your ebay order requires the following change.

Open up Ess_M2ePro_Block_Adminhtml_Magento_Payment_Info

Add the following function

public function getChannelSalesRecord() {
    $order = Mage::getModel('M2ePro/ebay_order')->getCollection()
    ->addFieldToFilter('ebay_order_id', $this->getAdditionalData('channel_order_id'))
    return $order->getSellingManagerId();

Find the following function getChannelOrderUrl()

Change it so that Buy and Play stop so the URL is blank.

case Ess_M2ePro_Helper_Component_Ebay::NICK:
if ($this->getOrder())
$itemId = substr( $this->getChannelOrderId(), 0, strrpos( $this->getChannelOrderId(), '-' ) );
$transId = substr( $this->getChannelOrderId(), strrpos( $this->getChannelOrderId(), '-' )+1 );

$url = "http://k2b-bulk.ebay.co.uk/ws/eBayISAPI.dll?EditSalesRecord&;transid=".$transId."&urlstack=".$this->getChannelSalesRecord()."|Period_Last122Days|currentpage_SCSold|&itemid=".$itemId;

Then add the following code so that the URL for ebay is no longer blank

Save. Job complete.

You can either save this in the corresponding directory in local, or overwrite it in community, however any updates until this is fixed will be overwritten with each upgrade.