The core of the e-commerce part of the overall solution. This is an ecommerce shopping cart solution built on top of the DNN (DotNetNuke) CMS. Anyone can do commerce online now!
When using the REST API to update the order via a JSON request the LineItemDTO.ShippingCharge field is not marked as a DataMember of the DataContract. When the JSON is deserialized to the C# object the default value of ChargeShippingAndHandling that is set in the constructor is always set.
Software Versions
DNN: 09.10.06
Hotcakes: 03.06.00
To Reproduce
Steps to reproduce the behavior:
Create a Order object where each line item has a different shipping charge. ChargeShipping, ChargeHandling, etc.
Convert the Order to a OrderDTO object
Serialize the OrderDTO object to JSON
Deserialize the OrderDTO JSON back to a OrderDTO object.
Inspect each line item and see the ShippingCharge property is ChargeShippingAndHandling
Expected behavior
That the original ShippingCharge provided is kept
Actual behavior
The ShippingCharge property is always ChargeShippingAndHandling. When editing an order that was saved from the REST API the shipping will be re-calculated when the order is saved and will be different from when the order was placed.
Describe the bug
When using the REST API to update the order via a JSON request the LineItemDTO.ShippingCharge field is not marked as a DataMember of the DataContract. When the JSON is deserialized to the C# object the default value of ChargeShippingAndHandling that is set in the constructor is always set.
Software Versions
To Reproduce
Steps to reproduce the behavior:
Expected behavior
That the original ShippingCharge provided is kept
Actual behavior
The ShippingCharge property is always ChargeShippingAndHandling. When editing an order that was saved from the REST API the shipping will be re-calculated when the order is saved and will be different from when the order was placed.