NOTICE:
This module comes PREINSTALLED with THT 1.3.5 Reworked! PLEASE do not install it on 1.3.5 Reworked. You don't need to.
Module: Coupon System
Module Version: 1.0
For THT Version: 1.3 Reworked
Author: Na'ven Enigma
Website: http://thelifemaster.com
PATCHES
Invoice Total Fix - 3/28/2012 - This module fixes the issue where the invoice reports an invorrect amount do to a mathamatical error. It also fixes the total post count when the user and admin have not visited their invoice area.
DESCRIPTION:
This module will allow you to add coupons to THT to be used during the order process and the invoice payment process as well. The system is designed to give you as much control over your codes as possible. Below is a list of things you can set a coupon to do.
1.) You can make coupons only work during the order process and/or you can have them work on the invoice payment process.
2.) You can make the coupon good for just the bill its being used on, or it can be used for the rest of the lifetime on the account, or a set period of months.
3.) You can set a coupon expiration date so no one can enter the coupon code for use after that date or you can have it never expire. (You can still delete it from the system.)
4.) If you delete a coupon, you have the option of keeping iton the system for those who have already entered it.
5.) If you edit a coupon, you can opt to change it for the people who are using it currently, or just for a future date.
6.) You can make a coupon available to only one user by entering their current username.
7.) You can select what packages the coupon may be used on or allow it to be used on all of them.
8.) You can set it to discount the dollar amount or the number of posts. You can also set these as a percentage.
9.) You can set how many times you want each coupon to be used or set it to unlimited.
10.) The invoicing system got an overhaul and now users can add/remove coupons and pay less than the balance due.
11.) The new invoicing system lays the ground work for a more expansive invoicing system, such as future mods for different payment methods.
12.) The invoicing system now handles chargebacks and refunds and other negative value transactions in such a way that it subtracts the amount from the invoice instead of marking it as paid.
13.) You can now set the grace period for P2H users so they can have a period of time before they get suspended for not posting the monthly amount.
14.) Admins can add credits and charges to accounts and those show in both the admin and client's transactions list for paid and P2H users.
15.) Admins can make payment arrangements for paid accounts. (P2H requires a credit added for the full amount before the end of the month and then removed the next month to avoid cron suspending them.)
16.) Admins can remove invoices and can see which invoices are orphaned.
PREREQUISITES:
1.) AutoMod: http://thehostingtool.com/forum/thread-1754.html
2.) Bug Fix - Paid Cron: http://thehostingtool.com/forum/thread-1757.html
3.) THT SDK: http://thehostingtool.com/forum/thread-1758.html
Note: This module is the reason I couldn't release AutoMod right away and therefore no other mods could be released. I wanted to wait until I could test AutoMod with a full featured extensive production module. Sorry about the wait! =)
Small tweak:
In includes/paypal/paypal.class.php:
FIND:
And remove it. This was in there before I added further code and I forgot to remove it. The bit below it handles whether or not it should be set to paid by checking if the amount paid is sufficient. I'll update the module for download as well. Only 2 people downloaded this so far.
This module comes PREINSTALLED with THT 1.3.5 Reworked! PLEASE do not install it on 1.3.5 Reworked. You don't need to.
Module: Coupon System
Module Version: 1.0
For THT Version: 1.3 Reworked
Author: Na'ven Enigma
Website: http://thelifemaster.com
PATCHES
Invoice Total Fix - 3/28/2012 - This module fixes the issue where the invoice reports an invorrect amount do to a mathamatical error. It also fixes the total post count when the user and admin have not visited their invoice area.
DESCRIPTION:
This module will allow you to add coupons to THT to be used during the order process and the invoice payment process as well. The system is designed to give you as much control over your codes as possible. Below is a list of things you can set a coupon to do.
1.) You can make coupons only work during the order process and/or you can have them work on the invoice payment process.
2.) You can make the coupon good for just the bill its being used on, or it can be used for the rest of the lifetime on the account, or a set period of months.
3.) You can set a coupon expiration date so no one can enter the coupon code for use after that date or you can have it never expire. (You can still delete it from the system.)
4.) If you delete a coupon, you have the option of keeping iton the system for those who have already entered it.
5.) If you edit a coupon, you can opt to change it for the people who are using it currently, or just for a future date.
6.) You can make a coupon available to only one user by entering their current username.
7.) You can select what packages the coupon may be used on or allow it to be used on all of them.
8.) You can set it to discount the dollar amount or the number of posts. You can also set these as a percentage.
9.) You can set how many times you want each coupon to be used or set it to unlimited.
10.) The invoicing system got an overhaul and now users can add/remove coupons and pay less than the balance due.
11.) The new invoicing system lays the ground work for a more expansive invoicing system, such as future mods for different payment methods.
12.) The invoicing system now handles chargebacks and refunds and other negative value transactions in such a way that it subtracts the amount from the invoice instead of marking it as paid.
13.) You can now set the grace period for P2H users so they can have a period of time before they get suspended for not posting the monthly amount.
14.) Admins can add credits and charges to accounts and those show in both the admin and client's transactions list for paid and P2H users.
15.) Admins can make payment arrangements for paid accounts. (P2H requires a credit added for the full amount before the end of the month and then removed the next month to avoid cron suspending them.)
16.) Admins can remove invoices and can see which invoices are orphaned.
PREREQUISITES:
1.) AutoMod: http://thehostingtool.com/forum/thread-1754.html
2.) Bug Fix - Paid Cron: http://thehostingtool.com/forum/thread-1757.html
3.) THT SDK: http://thehostingtool.com/forum/thread-1758.html
Note: This module is the reason I couldn't release AutoMod right away and therefore no other mods could be released. I wanted to wait until I could test AutoMod with a full featured extensive production module. Sorry about the wait! =)
Small tweak:
In includes/paypal/paypal.class.php:
FIND:
PHP Code:
return false; //If we return it as false, the set paid won't execute.
And remove it. This was in there before I added further code and I forgot to remove it. The bit below it handles whether or not it should be set to paid by checking if the amount paid is sufficient. I'll update the module for download as well. Only 2 people downloaded this so far.
---
See my GitHub at https://github.com/cozylife
See my GitHub at https://github.com/cozylife