Developer forum

Forum » Integration » Request calculate order sent - shippingfee is NaN

Request calculate order sent - shippingfee is NaN

Rene Poulsen
Reply

Hi,

I'm setting up a webshop with integration to AX. The shop is running in danish and english. On the english site the Requrst calculate order sent has "0" in ShippingFee (that's what i want). On the danish one it has "NaN". I can't figure out why "NaN" is in the danish request and don't know where to start looking. Anyone?

<?xml version="1.0" encoding="UTF-8"?>
<CalculateOrder>
   <Orders>
      <Order>
         <column columnName="OrderCustomerAccessUserExternalId">Anonymous</column>
         <column columnName="CreateOrder">False</column>
         <column columnName="OrderID">CART198</column>
         <column columnName="OrderCurrencyCode">DKK</column>
         <column columnName="OrderDate">20-03-2015 12:01:52</column>
         <column columnName="OrderPaymentMethodName" />
         <column columnName="OrderShippingMethodName" />
         <column columnName="OrderCustomerName" />
         <column columnName="OrderCustomerAddress" />
         <column columnName="OrderCustomerAddress2" />
         <column columnName="OrderCustomerCity" />
         <column columnName="OrderCustomerCountryCode" />
         <column columnName="OrderCustomerEmail" />
         <column columnName="OrderCustomerFax" />
         <column columnName="OrderCustomerPhone" />
         <column columnName="OrderCustomerZip" />
         <column columnName="OrderDeliveryName" />
         <column columnName="OrderDeliveryAddress" />
         <column columnName="OrderDeliveryAddress2" />
         <column columnName="OrderDeliveryCity" />
         <column columnName="OrderDeliveryCountryCode" />
         <column columnName="OrderDeliveryEmail" />
         <column columnName="OrderDeliveryFax" />
         <column columnName="OrderDeliveryPhone" />
         <column columnName="OrderDeliveryZip" />
         <column columnName="OrderShippingFee">NaN</column>
         <Fields>
            <column columnName="TestFelt" />
            <column columnName="CustomShippingFee">40</column>
         </Fields>
      </Order>
   </Orders>
   <OrderLines>
      <OrderLine>
         <column columnName="OrderLineID" />
         <column columnName="OrderLineProductID">995000001</column>
         <column columnName="OrderLineQuantity">1</column>
         <column columnName="OrderLinePriceWithoutVAT">349</column>
         <column columnName="OrderLineUnitPriceWithoutVAT">349</column>
      </OrderLine>
   </OrderLines>
</CalculateOrder>

Replies

 
Rene Poulsen
Reply

And as you can also see in the above XML, the OrderLineID is not set. When I click the "Add to cart" link on the page I get the following error:

"The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 20 ("@p18"): The supplied value is not a valid instance of data type float. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision."

I believe this error occurs because of the "NaN" in the shipping fee, but I'm not sure.

 
Rene Poulsen
Reply

Somehow solved the issue. I think it had something to do with the currencies and a "0" exchange rate? (valuta kurs).

 
Nicolai Høeg Pedersen
Reply

Yes, 0 currency rate is not good. 100/0 is not good....

 
Rene Poulsen
Reply

Hi Nicolai,

Actually 0 is what I wanted - but instead it was "NaN" :-) That problem was solved by changing the exchange rate - now it is "0" on the danish as well as on the english shop.

 

You must be logged in to post in the forum