Nicolas,
Thanks for the feedback.
2. If your goal is to give access or not to some content for 60 days after the purchase, why do you need a coupon code for that ? Coupons are made to give a discount on a purchase, not to give access to some content. AWO Coupon won't help in that respect and HikaShop coupons won't either.
A professional will purchased the coupon (for 100% of product cost) and send it to his client. His client will be the one to purchase the product using the coupon so there is no outlay for the client.
I can set the user group after the product is purchased which I can use to restrict access to the program that they bought. So far so good. The issue is that we only want the client to have access to the program for 60 days. So I agree that there isn't a need to do anything concerning time until after the product is purchased.
What I had in mind is that after the 60 day period, the client would be removed from the 'user group', thus denying them access to that content. So upon purchase, when the client is added to the usergroup, there needs to be a setting for a 'expiration_date'. Once that date is passed, then the client would be removed from the usergroup. In thinking this through, I'm not sure what would be the best way to take advantage of any calls similar to "onBeforeDiscountCreate", so that when the order is 'confirmed', the current date+60 days would be stored in a date field and then when a client logs in, it checks the date field and if it is before the date of login, then the expiration period has been reached and the client would be removed from the 'user group'. This would keep from having to create some type of plugin that would run via a cron job just to remove people from specific user groups.
Now as each single product (program) will only be used by one client (customer), I thought that simply adding an 'expiration_date' to the 'XXX_hikashop_user' table would be sufficient. But the issue is linkage with the Joomla 'XXX_user_usergroup_map' table. Sine this table actually would have the user linked to the group, this would probably be the best place to put a 'expiration_date' field. Then I would have to check the Joomla documentation and create some type of check at the time of login to remove the user from the group if the 'expiration_date' has passed. This would effectively block their access to the content.
Do you feel this approach is practical?