Jump to content

Promotional Code issue


dutchy

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated