seltzer icon indicating copy to clipboard operation
seltzer copied to clipboard

Member Module - Convert plan price from string to integer

Open elplatt opened this issue 12 years ago • 3 comments

The price of a membership plan is currently stored as a string. It should be stored as a mysql integer type.

You can look at the way the payment module stores payment amounts for example. The member_install() function should convert the old strings to integers so no data is lost. There are useful functions in the payment module for parsing and normalizing dollar amounts.

elplatt avatar Dec 12 '12 01:12 elplatt

Because it is currently stored as a varchar type, admins can put the currency symbol in the field, however, this will not work once the field is changed to decimal. Should the currency symbol be rendered & displayed, or just gotten rid of?

chris18890 avatar Feb 12 '13 02:02 chris18890

Actually, we abandoned decimal for integer in the payment module, so it should actually be an integer here. We would have to add another field for currency code.

elplatt avatar Feb 12 '13 02:02 elplatt

would integer not break things if the prices charged were not a whole pound/dollar/euro etc

chris18890 avatar Feb 12 '13 02:02 chris18890