In our custom live integration, we have the ability of loading quantity prices for the products by using a piece of code like:
product.Prices.Clear();
foreach (var price in prices)
{
product.Prices.Add(new Price
{
Id = price.Id,
Amount = price.Amount.GetValueOrDefault(),
Quantity = price.Quantity.GetValueOrDefault(),
ProductId = price.ProductId,
VariantId = price.ProductVariantId,
LanguageId = Context.LanguageID,
UserCustomerNumber = price.UserCustomerNumber,
IsInformative = false,
CurrencyCode = Context.Currency.Code
});
}
After upgrading one of our solutions to 9.5.5 it breaks because the Prices property is now read only and can’t be changed with this piece of code.
Is there any other way to do this without having to write the prices in DW database by using the Price.SavePrices method?