Search
Filters

Shipment via Odata couldn't be created in NopCommerce 4.10

Shipment via Odata couldn't be created in NopCommerce 4.10

Via the Odata interface of Nop4You almost all tables of the shop system nopCommerce can be read and written edited. This is enormously important for a good integration of a merchandise management system, because besides articles and orders, things like tracking information can also be transferred to the shop.

Unfortunately, this transfer does not work under all conditions. If NopCommerce was converted up from an older version to version 4.10, the server reports an error 500 - Internal server error as soon as an attempt is made to transfer a tracking number to the shop.

Newly created shops did not have this problem. In the end it turned out that the shipment table differs in date fields.

These are on a newly created system of the datatype "datetime2(7)" and on a shop updated from version 3.90 still on the datatype "datetime".

Unfortunately, it was not possible to change the data type via the SQL management console, but it was possible to do this with SQL commands. In any case, a data backup of the database should be performed beforehand.

ALTER TABLE Shipment ALTER column ShippedDateUtc datetime2
ALTER TABLE Shipment ALTER column DeliveryDateUtc datetime2
ALTER TABLE Shipment ALTER column CreatedOnUtc datetime2

After executing the three commands, the Odata plugin worked as expected.

Leave your comment