Developer forum

Forum » Development » FillProductPrices not working in Integration Framework v2

FillProductPrices not working in Integration Framework v2

Anders Ebdrup
Anders Ebdrup
Reply

Hi Dynamicweb,

 

After upgrading to Dynamicweb.Ecommerce.1.5.34 the property "Prices" in "Product" is readonly and a method in "ProductProviderBase" is not working anymore in this project: Dynamicweb.Ecommerce.LiveIntegration (2.0.1.BETA 2).

The method is:

        public virtual void FillProductPrices(Product product, ProductInfo productInfo)
        {
            var prices = (IList<ProductPrice>)productInfo["Prices"];

            foreach (var price in prices.OrderBy(p => p.Quantity.GetValueOrDefault()))
            {
                product.Prices.Add(new Price
                {
                    Id = price.Id,
                    Amount = price.Amount.GetValueOrDefault(),
                    Quantity = price.Quantity.GetValueOrDefault(),
                    ProductId = price.ProductId,
                    VariantId = price.ProductVariantId,
                    LanguageId = Common.Context.LanguageID,
                    UserCustomerNumber = price.UserCustomerNumber,
                    IsInformative = false,
                    CurrencyCode = Common.Context.Currency.Code
                });
            }
        }

 

Can you please look into this?

 

Best regards, Anders


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Anders,

I have registered this as a bug.

TFS# 59533 FillProductPrices not working in Integration Framework v2

The problem occurs because of another bug fix related to this: Price provider not thread safe

Sorry about the inconvenience.

Best regards,
Morten

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Morten,

 

Sounds great. I can see that this change is scheduled for 9.7, but I hope that it can be fixed before?

 

Best regards, Anders

 
Nicolai Pedersen
Reply

Hi Anders

We did make a fix in the live provider v2.0.2.

But what do you need? We cannot make the Product.Prices a writable property again as it was the cause of some nasty issues. Do you want the new source from live 2.0.2, should we merge to live 1.* or how would you like it?

BR Nicolai

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Nicolai,

 

Access to source for v2.0.2 would be great, thank you! :-) And if possible it will lovely if the change can be merged down to 1.*.

Thanks

 

Best regards, Anders

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Anders

Find the liveprovider code attached.

We will look into the merge after release on Tuesday.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum