PDA

View Full Version : Mini Mods - vbCoupons - coupons / discounts for paid subscriptions


benstillman
01-19-2011, 10:00 PM
Updated the original mod by ringleader (https://vborg.vbsupport.ru/showthread.php?t=173778). Code is marked as reusable. The original developer hasn't been on since September 2009, so I figured I'd re-release it with the patches for 3.8 in it. Hopefully as a community we can get this mod updated to vB4.


About this mod:
This mod allows the user to input a coupon code that deducts the value of it from the subscription costs before they go to pay for a subscription.

For example:
1. You advertise for new members and have and advert saying 'Join before the end of April and get $5.00 off the first month! Just register and enter coupon code OFFER1"
2. In Admincp -> vbCoupons you configure a coupon called OFFER1 with value of 5, and set a date for the validity of the coupon.
3. User registers, and enters coupon code OFFER1 on the payments.php page. The page updates the normal subscription prices to reflect the offer. Then they go to pay for it.

Notes:
1. Since the offer code expires when you set it to, the users will not be able to renew with that coupon unless the subscription runs out before the coupon validity does; thus it's better to use short-validity coupons and constantly change them.
2. The value of the coupon in the Admin Panel is given as a monetary value, e.g. a coupon with value 3.50 will give $3.50 (?3.50; ?3.50, depending on currencies activated) off paid subscription before the user goes to pay for it.
3. You cannot end up with a total value of $0.00. If you charge $30 for a subscription, and give away $30 coupon codes, the users will get "invalid currency" errors. I haven't figured this one out yet.
4. I plan on attempting to set it to use autotemplating, as well as eventually try to port it for vB4. Anyone who wants to help is more than welcome.

Features:
* Manage Coupons: Singly Add/Edit/Delete; Mass-delete.
* Set coupon valid for particular subscription ID's.
* Limit use by date or times it can be used.
* Mass-Generate coupons for distribution.
* Generate coupon discount codes and post to a new thread in a specified forum. A message may be sent with the codes. You can decide the thread title too.

UPGRADING: Do NOT choose 'yes' to overwrite an old xml or you will get an error!


Installing:
* Read the instructions file included in the zip.

Brandon Sheley
01-20-2011, 02:53 PM
cool mod, hopefully someone ports it to 4.x :)

regitbull
01-20-2011, 03:14 PM
nice, been waiting for a update for the coupon mod.

bada_bing
01-22-2011, 04:17 AM
Awesome.. I will tag this until its been tested working by others, im currently having issues with members not getting upgrated to the designed usergroup when paying via paypal so I dont want to add additional issues

EddyMaxx
01-22-2011, 11:11 AM
Working 100% on 3.8.6. Cool mod. Thanks.

Loget
02-03-2011, 11:32 AM
Hey,

Any luck in figuring out why it does this:


3. You cannot end up with a total value of $0.00. If you charge $30 for a subscription, and give away $30 coupon codes, the users will get "invalid currency" errors. I haven't figured this one out yet.

It'd be great if the above was possible!

Thanks.

cheech47
02-07-2011, 07:13 PM
Great Mod working well, is there any chance of being able to set a % off, eg 20%, as we have several types of subscriptions and a set monetary value will only work for 1 type, thanks

bada_bing
02-07-2011, 07:47 PM
Great Mod working well, is there any chance of being able to set a % off, eg 20%, as we have several types of subscriptions and a set monetary value will only work for 1 type, thanks

This would be nice also. maybe an option for both ..

benstillman
02-08-2011, 03:05 PM
Great Mod working well, is there any chance of being able to set a % off, eg 20%, as we have several types of subscriptions and a set monetary value will only work for 1 type, thanks

It should be as easy as changing the math in the functions file to *(couponvalue/100). I'll take a look at it when I get some free time.

Booyakan
02-08-2011, 04:05 PM
I have automatic yearly recurring subscriptions..

If they use a coupon, can it be for the first year only?

Example: Subscription is $15 and $5 coupon knocks price down to $10.
When the subscription automatically renews next year through paypal can it be set so it renews at original price of $15?

joshskeety
03-10-2011, 07:10 PM
I'm trying to modify it to a % myself so it applies evenly across each subscription and for the different durations.

Can't seem to make it work. This just causes a white page:

$newvalue = *($coupon_value/100)['couponvalue']));

stamos2003
03-22-2011, 03:24 PM
this is again not working!
paypal gives back an error message, wrong currency format!

obviously it has a problem with the .xx amounts, e.g. 30.95
it gives it to paypal as 30,95 but it should be 30.95 (. instead of ,)

benstillman
04-04-2011, 02:48 PM
this is again not working!
paypal gives back an error message, wrong currency format!

obviously it has a problem with the .xx amounts, e.g. 30.95
it gives it to paypal as 30,95 but it should be 30.95 (. instead of ,)

Interesting. I just tried it ($1.50 off) and it worked fine. What currency are you using?

Morrus
04-05-2011, 04:20 PM
The only problem I can see with this idea is that existing subscribers would cancel their subscriptions and sign up again to take advantage of the offer. I worry that overall I'd end up losing money, not gaining it.

benstillman
07-25-2011, 09:46 PM
The only problem I can see with this idea is that existing subscribers would cancel their subscriptions and sign up again to take advantage of the offer. I worry that overall I'd end up losing money, not gaining it.

Only users you give the code to get the discount, so.........

Manoel J?nior
07-26-2011, 01:03 AM
Installed and five stars for you!

Thanks

christon26
01-29-2012, 07:52 AM
Any further development on being able to use percentages with this mod? I have uninstalled it for the time being as I need to use percentages, but am eagerly waiting to see if it can be done lol

rrpnow
10-25-2012, 12:07 PM
Is there a vB 4.xx update or similar mod that has been released?

Ichigo88
05-04-2013, 06:37 PM
up! any similar mod for vb4?

Ravallojr
07-19-2015, 10:07 PM
Anything for vb4?

Premiumkenti
08-31-2015, 11:30 PM
MYSQL error.

TC-Jamech
09-01-2015, 11:48 AM
I keep getting the vbulletin error message upon plugin install.

KyuubtiK
10-23-2017, 06:35 PM
is there some other releases for vb4?
need a discount mod