2

Situation

We are using m2epro in version 6.3.7 on a magento 1.9.0 and we are facing a little problem with mapping phone numbers from ebay to magento orders. In Ebay the information is setup with a non prefixed phone number, like in the first image (Ebay: Buyer details).

Ebay: Buyer details (valid phone number, without prefix)

However, in magento orders the phone number is replaced with the bogus value of 0000000000, as shown in the second image (Magento: Sales > Orders).

Magento: Sales > Orders

This holds for both; the shipping and the billing address.

Analysis

As we understand it correctly, ebay orders are delivered in a two step process which moves data through m2e before they end up in magento: ebay --1--> m2e --2--> magento. Thus, the phone number must being corrupted somewhere in step 1 or 2. Nonetheless, we assume the error occurs in step 1, because the orders in m2e all have an Invalid Request set as their Telephone number as in the image (Magento: Sales on ebay > Sales > Edit shipping address):

Magento: Sales on ebay > Sales > Edit shipping address

Code Reference

Searching this bogus value in the m2e codebase, reveals three possible reads in following Files:

  • \Ess_M2ePro_Model_Buy_Order_ShippingAddress
  • \Ess_M2ePro_Model_Ebay_Order_ShippingAddress
  • \Ess_M2ePro_Model_Amazon_Order_ShippingAddress

Code

Each of these reads set '0000000000' as the default phone number, when the phone otherwise would be equal to the empty string ''.

private function getPhone()
{
    $phone = $this->getData('phone');

    if ($phone == '') {
        $phone = '0000000000';
    }

    return $phone;
}

Question

Does anybody have encountered a similar problem before and knows a solution to this? So, if there is a valid1 phone number present in ebay, that it is delivered correctly to magento? Any debugging suggestions are welcome as well, e.g. : Is it anyhow possible to configure the m2e logging, so that it outputs errors numbers returned by calls to the ebay APIs?

1valid: a phone number with or without prefix, not being empty.

Research

The changelog on m2e doesn't include any fixes on this behalf. Looking for answers on the stackexchange networks didn't match anything useful either.

0

Browse other questions tagged or ask your own question.