dutchy Posted June 15, 2014 Share Posted June 15, 2014 Hi Guys I am trying to setup a "1 off" Promotional Code for new clients The Promotional Code issues a $100 discount on new server orders. Whats happening is when you signup for a plan @ $69.95, it applies the $100 discount on the signup page, but when you look at the created invoice, it has the following: Promotional Code: ********* - $69.95 USD One Time Discount $-69.95 USD ------------------------------------------------------ Sub Total: $-32.64 USD Credit: $0.00 USD Total: $-32.64 USD ------------------------------------------------------ Why is it issuing a $69.95 discount when the promotion is for $100 :-/ Is it because the purchase amount is less than the discount that is applied? If so then is there a way to get the full discount to apply and carry over in recurring payments till the credit runs out? Thanks in advance for your help Regards Mike 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted June 15, 2014 Share Posted June 15, 2014 would it not be better to just offer it free first time by making it a discount of 100% rather than $100 0 Quote Link to comment Share on other sites More sharing options...
dutchy Posted June 16, 2014 Author Share Posted June 16, 2014 would it not be better to just offer it free first time by making it a discount of 100% rather than $100 Unfortunately, we have had a pile of $100 discount vouchers printed out, that are being distributed, so that option is not doable :-/ We have been informed by support that it wont work if the discount exceeds the purchase order, so theres not much we can do apart from manually editing each new order to make up the shortfall 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted June 16, 2014 Share Posted June 16, 2014 Instead of promotion codes, you could just use the codes you used on the printed vouchers, to add credit. Here is how I would handle it: Remove all of promotion codes, and create a table in your WHMCS database called something like "mod_vouchers". Within the table, add the promotion codes within a "voucher" field, then add a "userid" field for the client id. You would then need to create a new WHMCS page, that prompts the user for the code, and contains some PHP logic to query the database and check the "mod_vouchers" table for the existence of the code: http://docs.whmcs.com/Creating_Pages If the code matches, write the client id to the "mod_vouchers" table under "userid", then apply the credit to the client's account using the "addcredit" API function: http://docs.whmcs.com/API:Add_Credit When you query the database, for the voucher code, check to see if a client id has been written to the "userid" field in the "mod_vouchers" table. If so, that means the voucher has been used, and cannot be used again. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.