I think having an "original value" field for the db table would help when troubleshooting issues with multiple deductions, etc. This field will never be touched in any operations involving processing of certificates, it'll simply be there for reference.

Comments

torgospizza’s picture

Title: Add new field `original_value` to uc_gift_certificates » Add new fields `original_value` and `order_ids` to uc_gift_certificates

I also think adding a serialized array of order_ids_used that a gift certificate has been used on would be helpful. Although this might duplicate effort of the order_product_id field, but it'll mean one less JOIN we have to make.

jrust’s picture

How about also adding a "created_on" field. That would be nice just for cleaning up the admin interface so we could order by most recent gift certs.

torgospizza’s picture

Sounds good. I wouldn't mind adding more of a "logging" feature, similar to how userpoints behaves.