I just read through the thread started by Alf' re retrieving coupon codes from a database, showthread.php?t=5584
I followed Jason's reply and have utilised his suggestions, which work :)
I did something similar a while ago, but the result, (which worked), was pretty complex.
I like Jason's solution much better, as it allows continued use of the eCart Discount Tab interface, whereas my earlier approach used lots of hand coding.
To get to the point, what i would like to do is extend Jason's database approach, but replace the name, (or part of the name) of the discount with a database value, rather than just plain text,and retain the ability to make edits via the Discount Tab interface.
So for example, I may have a 5% and 10% discount coupon with different codes, and depending on the coupon value, the discount would display the appropriate name.