I know that www.dimplesanddandelions.com/ did implement gift cards, coupons, and registry to their eCart site. I haven't done it personally, but I'd probably use a similar approach to inventory control where I keep track of the gift certificate used in the orders table and subtract it from the gift certificate amount in the SQL without ever really updating the amount itself.