seltzer
seltzer copied to clipboard
Member Module - Convert plan price from string to integer
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.
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?
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.
would integer not break things if the prices charged were not a whole pound/dollar/euro etc