Developer forum

Forum » PIM » Price fields recommendation

Price fields recommendation

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

We have a project where one of the custom fields we need to implement is "Recommended Retail Price" (other similar ones may exist too).

 

Initially we were thinking of making it of type decimal, so it could take "2.99", and would be rendered within a Field Display Group with other fields (not necessarily prices). The problem is that this would not be formatted, (currency symbol).

 

So what would be the best option for such scenarios? I feel there's not a great option without having to customize to get it in the frontend nicely because:

  • Using "Prices" with "Is Informative" gives me everything as a Price, but I can't show it in a Field Display Group
    (In Swift there's no way to render just 1 informational price at least yet - so it requires custom work)
  • Using it as a decimal field, we'd need to customize the template to represent it as a price
  • Using it as a string, forces the currency symbol to be there
    (likely our best option for now since it's single currency, but not a scalable solution)

 

What would it be the best recommended way to achieve this? Maybe using it as informational Price, but then have a specific type of custom field that acts as an alias to get it from a particular price matrix value (so it could be handled within a Field Display Group)?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

It has to be in the price matrix as informational.

Why do you need it in a display group?

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks. In my case it's a matter of design. This is for a project where they only have 6 or 7 custom fields and the goal is to display them all in a table/list, much like Display Groups would.

 

Due to the small volume of data and/or requirements, it does not make a lot of sense to treat this field separately (but I can still talk to the customer about it). Worst case scenario, for this project I can really go with a string and enforce the currency symbol, avoiding customizations on templates (which will hinder Swift updates).

 

If I need something different, I can create a "Paragraph" (to be a future Products Component) that allows me to pick which informational field I want from the Price Matrix. That should give me the flexibility to expose individual Prices, and we'd try to stay away from rendering them with other fields (meaning, avoid using them within a Field Display Group if we can)

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum