I’m wondering which is the better way to add some information to a payment in magento (188.8.131.52).
Let’s say I want to add an information called “payment_duedate” which would be the date the customer has to pay his invoice.
Actually, there is a field in the sales_flat_order_payment called “additional_information” which contain serialized data set by the method setAdditionalInformation($arg1,$arg2); available in the ‘sales/payment’ model.
So I could save my date by :
But one could also choose to add a payment attribute, which would have as effect to create a new column called ‘payment_duedate’ in the ‘sales_flat_order_payment’ and then save my date by doing :
The main differences are :
- with the “additional_information method”, datas are serialized, and so, not queryable easily.
- with the “setPaymentDuedate() method”, datas are queryable and a new field is created in the table
So, in your opinion, which of the two ways is the best ?