Calculation and Conversion of numerical quantities in CMS

I have artwork on a website which has dimensions. It need to be shown in CM and inches, a conversion done brilliantly by a computer, but only tediously by a human data entry operative.


I've got two suggestions... either....

1 - have a number field type that also can accept units. These could be anything ... Km, Centigrade, grammes, seconds. Then allow the item to be displayed in another unit... by selecting a compatible one in the display field on the website.

So I might have in my CMS [Number][mm], where I enter '124'

On my website I place a number field, associate it with this CMS item and select [inches] as the display format... so it shows as '4.88' or '4.9' if it's rounded to 1 decimal place.

This is very simple for the user... allows products to show alternative metrics and is fairly easy to understand.


Personally I favour option two...


2 - A Calculated field inside the CMS. I like this because it's more flexible. I could work out a surface area by multiplying two linear dimensions together. Perhaps I could use another database to look up a value (like a VAT rate against a product type) by which to multiply the first value.

The idea here is that the values can be stored in the record rather than calulated on the fly so is done during data entry, not by the server or client.


What I want to avoid is a person having to convert loads of data into alternative units.


Thanks.

Brian.



  • Brian O'Carroll
  • Mar 1 2022
CMS