We are using real time calls for getting the prices to show and use in the shop.
The prices must be added/updated in the EcomPrices, so DynamicWeb can use these prices.
Using the API, not all fields are filled in the database. While the fields are filled when debugging the code.
The next fields (we are using) do not get filled using the API:
-PriceShopID
- PriceValidFrom
- PriceValidTo
- PriceUserID <- our most important
The normal API function is used:
Dim custPrice As Price = New Price
custPrice.Amount = prodPrice custPrice.ProductID = prodId custPrice.Quantity = 1 custPrice.LanguageID = "LANG1" custPrice.CurrencyCode = "EUR" custPrice.ShopID = "SHOP1" custPrice.UserID = userId custPrice.User.ID = userId custPrice.User.UserName = u.UserName custPrice.UserCustomerNumber = u.CustomerNumber custPrice.VariantID = variantId custPrice.ValidFrom = Now.AddHours(-1) custPrice.ValidTo = Now.AddYears(1) _pricesToSave.Add(custPrice)
For Each newPrice As Price In _pricesToSave newPrice.Save(newPrice.ID, newPrice.ProductID, newPrice.CurrencyCode) Next
We tried several options to get the UserID filled, but without succes.