Log File Formatting

  • Posts: 5
  • Thank you received: 1
7 years 4 months ago #274433

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.3.29
-- Error-message(debug-mod must be tuned on) -- : No error message, a question on log formatting

Good day all;

We are working with a client who wants to switch over to HikaShop and FedEx Web Services to trouble shoot a discrepancy between the rates being returned by Web Services API and the clients actual meter.

I believe the issue lies with FedEx and they are not accepting a text file output from the plugin debug as proof.

According to FedEx Web Services they need the Debug Log in XML or SOAP/XML format "however our Technical Support only supports transaction coding in XML or Soap/XML format".

Is there a way to convert the data produced by the Debug into this format?

Thank you in advance,

Scott

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
7 years 4 months ago #274436

This should probably be moved to the Shipping Methods sub forum.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 4 months ago #274434

Hello,

You can see to use the __getLastRequest function ( php.net/manual/en/soapclient.getlastrequest.php ) just after the line

$response = $client->getRates($request);
So you can retrieve from the $client (a soapclient object) the last request content which will be the XML raw data sent to their API.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Scott-EP

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
7 years 3 months ago #274611

Thank you for the reply Jerome. I was able to obtain the XML request that is sent to the FedEx API and am now even more confused then ever.

The PHP output from Debug shows the dimensions being included in the Requested Package Line Items

'RequestedPackageLineItems' => 
    array (
      0 => 
      array (
        'SequenceNumber' => 1,
        'GroupPackageCount' => 1,
        'Weight' => 
        array (
          'Value' => '2.2049997181',
          'Units' => 'LB',
        ),
        0 => 
        array (
          'Dimensions' => 
          array (
            'Length' => '9',
            'Width' => '6',
            'Height' => '24',
            'Units' => 'IN',
          )
But the XML Output does not.
<ns1:RequestedPackageLineItems>
               <ns1:SequenceNumber>1</ns1:SequenceNumber>
               <ns1:GroupPackageCount>1</ns1:GroupPackageCount>
               <ns1:Weight>
                  <ns1:Units>LB</ns1:Units>
                  <ns1:Value>2.2049997181</ns1:Value>
               </ns1:Weight>
            </ns1:RequestedPackageLineItems>
Is there some way to tell if the dimensions are actually being sent to FedEx? When FedEx sees the file with the missing dimensions their support will stop at that point and state that is causing the problem with the lower rate that is being sent back via web services API versus the clients meter.

Last edit: 7 years 3 months ago by Jerome. Reason: [code] is nice

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
7 years 3 months ago #274656

Hello,

You'll just have to check what's in the "$data" variable to know which package informations are sent near these lines :

			$pkg_values = $this->xml2array('<root>'.$data['XMLpackage'].'</root>');
			$pkg_values = $pkg_values['root'];
			$pkg_count = count($pkg_values);

Note that you can also check the content of the "pkg_values" variable which is a php array containing information about the packages that are sent to FedEx.

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum