0

I have installed a shipping tracker module and configured the UPS shipping method on Magento 2.1.5 local. The module with the same tracking id is working in other version but not in the Magento 2.1.5. I'm getting this in the debug.log file

[2021-05-21 06:19:38] main.DEBUG: array (
  'request' => '<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>XXXXXXXXXXXXXXXXX</AccessLicenseNumber>
  <UserId>xxxxxxx</UserId>
  <Password>xxxxxxx</Password>
</AccessRequest><?xml version="1.0" ?>
<TrackRequest xml:lang="en-US">
    <Request>
        <RequestAction>Track</RequestAction>
        <RequestOption>activity</RequestOption>
    </Request>
    <TrackingNumber>XXXXXXXXXXXXXXXX</TrackingNumber>
    <IncludeFreight>01</IncludeFreight>
</TrackRequest>',
  'result' => '',
) {"is_exception":false} []

Note that I have replaced the real credentials with XXXXXXXXX.

In the backend, when clicking on track this shipment it shows no tracking details as shown in the below screenshot,

screensho1

I have also checked on the ups site to track details which are completely fine. Please let me know if anyone has any ideas.

EDIT

shipping_tracking_popup.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Magento\Shipping\Block\Tracking\Popup" name="shipping.tracking.popup1" template="Vendor_Module::tracking/popup.phtml"/>
            <referenceBlock name="shipping.tracking.popup" remove="true" />
        </referenceContainer>
    </body>
</page>

popup.phtml

$results = $block->getTrackingInfo();

I'm getting $results as shown in the below screenshot,

Screenshot3

I have checked in the Magento\Shipping\Block\Tracking\Popup class, by echoing $info->getTrackingInfo() shows same as the above screenshot.

Magento\Shipping\Block\Tracking\Popup.php

  /**
     * Retrieve array of tracking info
     *
     * @return array
     */
    public function getTrackingInfo()
    {
        /* @var $info \Magento\Shipping\Model\Info */
        $info = $this->_registry->registry('current_shipping_info');

        return $info->getTrackingInfo();
    }

1 Answer 1

0

There was no issue in the code.

In Stores -> Configuration -> Sales -> Shipping Methods

Under UPS, in Tracking XML URL field,

before it was set as,

https://wwwe.ups.com/ups.app/xml/Track

changed to,

https://wwwcie.ups.com/ups.app/xml/Track

Now it's working. This issue is only in Magento 2.1

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.