Developer forum

Forum » Development » PricePriority in EcomPrices?

PricePriority in EcomPrices?

Anders Ebdrup
Reply

Dear DynamicWeb,

 

We have a requirement where we need to prioritize prices when multiple prices apply.

Initially, I was pleased to find the PricePriority field in the EcomPrices table, as it seems to be designed exactly for this purpose. However, during implementation, we have observed that the field does not appear to have any effect in practice. After reviewing the source code, it also looks like the field is currently not used by the pricing logic.

Could you please clarify the original intention behind the PricePriority field?

  • Is it intended to be used for price selection or prioritization?
  • And if not, are there any plans to support it in future versions?

This information would help us determine whether we can rely on this field or need to implement a custom prioritization approach.

 

Best regards, Anders


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Anders

Yes, I guess that is the thought - thoug it is not part of the current logic. I can see 100 things going wrong if we change it - so we probably added the field to use in custom priceproviders.

There are these settings that will affect in which order the prices are fetched from DB, cached and in what order the DefaultPriceProvider handles them:

/Globalsettings/Ecom/Price/List/UseCustomOrder = True
/Globalsettings/Ecom/Price/List/CustomOrder = "PricePriority,Id"

But - if you have 2 prices, lets say 100 with priority 2 and 110 with priority 1, I still think the 100 will be returned as it is lower than 110.

 
Anders Ebdrup
Reply

Hi Nicolai,

 

Thanks for the answer - that was also my thought/worries about this.

I am pretty sure that e.g. BC uses priorities, so it will try to find the most specific price for a customer, and in that "group" of prices find the lowest price, so we are really missing the full implementation of the priority field.

BTW It seems like a lot of coding to do by us to implement this behaviour in our own priceprovider, as all it seems to require will be a change like this:

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Anders,

 

If it's getting the lowest price anyway, what does priority matter?

 

Unless we'd have to save which "price Id" it matched (i.e. Price = $100; PriceID = XmasSpecial as opposed to Price=$100 ; PriceID = PriceAgreement202509), which I don't believe it's done anywhere.

 

// Nuno

 

You must be logged in to post in the forum