Developer forum

Forum » Integration » Live integration - Error in FindPrice()

Live integration - Error in FindPrice()

Kenneth Radoor
Reply

on a site with liveintegration to NAV we are getting a lot of errors like this:

Error: Unknown error during FindPrice(). Exception: Type 'Dynamicweb.eCommerce.Products.ProductVatGroupCollection' in Assembly 'Dynamicweb, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable. 

We are using the sample live integration supplied by DW, where we have made the nessesary changes.

The Error is beeing looged from PrepareProductInfoProvider.cs / FindPrice(.......).

There has been made no changes to that method.

Does anybody have some good pointers to where i should look to solve the bug, or is it a bug in DW

/Kenneth

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Kenneth

Can we see the full stack and your entire integration project?

Also information on which version you are running on.

BR Nicolai

 
Kenneth Radoor
Reply

Sure.

DW version is: 8.6.1.16

I have mailed the project to you.

/Kenneth

 
Kenneth Radoor
Reply

Sure.

DW version is: 8.6.1.16

I have mailed the project to you.

/Kenneth

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Kenneth

The problem on this is this piece of code in our sample code:

if (Product.VariantID == VariantID || (string.IsNullOrEmpty(VariantID) && string.IsNullOrEmpty(Product.VariantID))) {

requestProduct = Product;

}

else {

requestProduct = Product.Clone();

requestProduct.VariantID = VariantID;

}

When the price provider is used for products with variants, the product instance is cloned - and that it should not. The integration framework does not support variants out of the box, since NAV etc. does not have a standard solution for variants.

The solution is to remove the conditional and not clone the product instance, but simply use the same instance wether it is a variant or not.

We have changed this in our sample code and will release an updated version.

Solutions with no variants is not impacted.

TFS#18831

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum