Try our conversational search powered by Generative AI!

GetPrices only gives me one price

Vote:
 

Hi!

I'm trying to use GetPrices() to get all available prices for a variation.

The pricing table looks like this:

11 cm 16893-01 SEK79.20 1/1/70, 1:00 AM - All Customers 0
11 cm 16893-01 SEK71.20 11/15/15, 1:00 AM - 1/1/60, 1:00 AM All Customers 0
11 cm 16893-01 SEK55.20 Aug 1, 2:00 AM - Sep 1, 2:00 AM All Customers 0

Three different prices, all vaild at the current date.

var priceFilter = new PriceFilter
                                  {
                                      CustomerPricing = new[] { CustomerPricing.AllCustomers },
                                      Quantity = 1,
                                      ReturnCustomerPricing = true,
                                      Currencies = new[] { "SEK" }
                                  };

 var prices =  _priceService.Service.GetPrices(
                    market.MarketId,
                    DateTime.Now,
                    new CatalogKey(_appContext.Service.ApplicationId, variationContent.Code),
                    priceFilter).ToList();

Shouldn't prices contain all three prices or am I missing something? I only get one prices and that is the 55.20 price. Why?

Thanks!

/Kristoffer

#181046
Aug 07, 2017 15:49
Vote:
 

Hi,

That is the expected behavior. More information can be found here http://vimvq1987.com/2017/07/price-optimizing-to-be-or-not-to-be

TL;DR: the price optimizing only keeps the best price at the current time

#181054
Aug 07, 2017 22:00
Vote:
 

Thanks Quan!

#181060
Aug 08, 2017 8:09
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.