How to update a database table upon successful completion of a transaction
1) I am trying to use e-cart to update a user's subscription expiration date upon transaction success. How can I accomplish this?
2) I have created a product attribute field within the products table called 'AccessDays' that will be used to add that specific number of days to the user's current expiration date. I also need to figure out how to aggregate those days into a grand total, similar to the grand total for the sum of (price*quantity) of all items in the cart. For example, there is a product for 6 month subscription that has 180 days access, and the product for a 1 year subscription has 365 days access; so if a user wished to purchase 1 year and 6 months of access and added both products to the cart, it needs to aggregate to a grand total of 545 days, then add that number to the user's existing expiration date upon transaction success.
Any guidance would be very appreciated.