View Full Version : Mini Mods - vBDiscounts - Give subscription discounts to your members!
zefyx
04-17-2009, 10:00 PM
This modification is released with permission of the Re-usable Code from this modification (https://vborg.vbsupport.ru/showthread.php?t=173778).
https://vborg.vbsupport.ru/external/2015/08/1.jpg
vBDiscounts v1.0:
This hack allows the user to input a discount 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 $10.00 off the first month! Just register and enter discount code 10OFF"
2. In Admincp -> vbDiscounts you configure a discount called 10OFF with value of 10, and set a date for the validity of the discount.
3. User registers, and enters discount code 10OFF 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 discount unless the subscription runs out before the discount validity does; thus it's better to use short-validity discounts and constantly change them.
2. The value of the discount in the Admin Panel is given as a monetary value, e.g. a discount 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.
Features:
* Fully working on vBulletin 3.8.x
* Manage Discounts: Singly Add/Edit/Delete; Mass-delete.
* Set discount valid for particular subscription ID's.
* Limit use by date or times it can be used.
* Mass-Generate discounts for distribution.
* Generate discount 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.
thanks, I may have a need for this in the future.
Jasem
04-18-2009, 08:21 AM
Nice work, thank you!
Installed
SpaMMerGR
04-18-2009, 09:00 AM
This rocks!
820Media
04-18-2009, 12:59 PM
This is very very cool indeed.
But as i installed the vB coupons (3.6version) and got it working, ill keep that installed for now.
projectego
04-18-2009, 01:55 PM
Great idea for a mod. I'll definitely be able to find use for this. Cheers!
Hornstar
04-18-2009, 02:09 PM
I just thought of a feature that could enhance this modification alot! ^^
Is it possible to have a coupon that changes the length of the subscription?
eg. I have a subscription that goes for 1 year. I set up a coupon, and when the user enters in the coupon they end up getting the subscription for 2 years. or 10 years. etc.
AzzidReign
04-18-2009, 04:13 PM
This is great!! I will be installing this very shortly!
brettxw
04-19-2009, 01:24 AM
can I do it for a percentage off instead of a money amount?
brettxw
04-19-2009, 01:59 AM
ok so why when I create a discount code, nothing appears on the payment page where they can input a code for the discount?
3xigames
04-19-2009, 03:18 AM
ok so why when I create a discount code, nothing appears on the payment page where they can input a code for the discount?
I'm having the same problem..
I'm not sure why.
Diesel,
04-19-2009, 11:03 AM
I'm having the same problem..
I'm not sure why.
Me too
zefyx
04-19-2009, 04:59 PM
can I do it for a percentage off instead of a money amount?
Sorta.
Let's say you want to do 10% off of $25, you would put 2.50 for the discount (which is 10%).
zefyx
04-19-2009, 05:21 PM
I'm not sure why it wouldn't be showing for you two unless you both have modified subscription templates.
brettxw
04-19-2009, 05:41 PM
I'm not sure why it wouldn't be showing for you two unless you both have modified subscription templates.
Nope. No modified template. You can check to see.
www.BlackberryOS.com
99.9% sure I dont.
DjEddie
04-20-2009, 01:51 PM
Hi, installed this with no problems on the install,
One thing i've noticed is when I set it to discount on Subscription ID 3 .. it also knocks a smaller amount off the other IDs ..
Any ideas?
Thanks
zefyx
04-21-2009, 07:25 AM
Hi, installed this with no problems on the install,
One thing i've noticed is when I set it to discount on Subscription ID 3 .. it also knocks a smaller amount off the other IDs ..
Any ideas?
Thanks
This is a problem I'm trying to sort out with vBulletin itself, the best thing I can suggest is to closely monitor the subscriptions for now.
DjEddie
04-21-2009, 10:05 AM
This is a problem I'm trying to sort out with vBulletin itself, the best thing I can suggest is to closely monitor the subscriptions for now.
Ill have to leave this as disabled on my site until you have a fix for it, ill keep an eye out for the next version, is a very good mod, really could use it. So ill wait for next fix :)
Thanks
Diesel,
04-21-2009, 11:12 AM
I have no edits, ive installed a fresh vbulletin starting my boards from scratch lol.
3xigames
04-24-2009, 09:02 AM
I still need my problem fixed :/
Doesn't show up.
I've tried several times.
zefyx
04-27-2009, 05:38 PM
PM your admin info, I'll take a look.
Same here..
At payments template nothink show up.
You have to post install steps here :|
I just show the .nfo file
I make the edits and works fine.
Suggestion..
Please make it work with discount x% and not -$
brettxw
06-02-2009, 04:30 AM
I still cant get this to work. It shows in the admin cp, i made a discount code but nothing shows on the subscriptions page.
stamos2003
06-02-2009, 06:34 AM
thanks for this!
though after adding the coupon to the subscription and going to paypal, paypal screams:
The link you have used to enter the PayPal system contains an incorrectly formatted item amount.
nalexandre
06-02-2009, 10:46 AM
Hi, is it possible to join this mod, a form to field for example with name, adress, others, to use in a forum where the subscripton is for membership?
A member makes it through the registration form, this form would be submitted to a forum id designate.
It´s possible?
Sorry my english.
Obrigado.
maidos
06-03-2009, 03:17 PM
can discounts be used for registration and without subscription and only for existing members to advance userroup?
zefyx
06-06-2009, 05:55 AM
I haven't had much time as of late. If nothing is showing up in your payments.php, open your subscriptions template & put $discountsbit at the very bottom.
underESTIMATED
06-07-2009, 09:21 PM
Mod is complete fail for me as well.
Installed on 2 board, nothing in the template after posting the $discountsbit.
Installed on fresh vb, and still thing.
Mod = Fail & uninstalling.
underESTIMATED
06-15-2009, 07:51 PM
bump...
stamos2003
06-19-2009, 01:55 PM
yet just another unsupported mod.
uninstalling....
underESTIMATED
07-02-2009, 06:51 PM
yet just another unsupported mod.
uninstalling....
I concur....
Really sad too, this is one of my most beneficial mods. :down:
underESTIMATED
08-26-2009, 04:15 PM
Almost 2 months later...and no response from the author. Sweet.
Kick this mod to the garbage as it doesn't work as author states.
patrick6411
09-07-2009, 12:26 AM
Ok in hopes that the author will show back up, is it possible to give a free months subscription with this mod?
Hi-Jack
09-21-2009, 10:58 AM
Warning... If you use this tool to offer a rebate it's fine, but the functions assigned to the subscription will not be processed automatically as the subscription will complain about an invalid amount (amount paid does not match amount configured in subscription) and will not kick into action...
Such a good tool, such a poor working system...
This was just a quick idea poorly executed...
the tool is with vBCoupon identical...es only the names have been replaced (coupon "» discounts) …the code itself is unchanged!¡!
checked with Beyond Compare...
nAsH
jluerken
10-28-2009, 09:29 AM
thanks for this!
though after adding the coupon to the subscription and going to paypal, paypal screams:
The link you have used to enter the PayPal system contains an incorrectly formatted item amount.
I am getting the same error message. Whats the solution for this?
Developer Last Online: Oct 2009
Any update? Thanks.
RichieBoy67
02-02-2010, 04:24 AM
Does anyone actually have this working??
I have it installed for a client and all the templates are ok but discounts are not going through to PayPal once a member is redirected there..
Thanks
MichaelDance
05-08-2010, 09:55 PM
Does anyone actually have this working??
I have it installed for a client and all the templates are ok but discounts are not going through to PayPal once a member is redirected there..
Thanks
I have almost the same problem, i charge ?4 per month VIP and the discount ment to discount ?2 but no its not taken off the costs even though it states its updated the prices. :l
Premiumkenti
09-01-2015, 02:27 AM
Database error in vBulletin 3.8.8:
Invalid SQL:
CREATE TABLE IF NOT EXISTS `coupons` (
`couponid` int(10) unsigned NOT NULL auto_increment,
`couponname` varchar(50) NOT NULL default '',
`couponvalue` int(3) unsigned NOT NULL default '0',
`couponvalidfrom` DATE,
`couponvalidto` DATE,
PRIMARY KEY (`couponid`)
) TYPE=MyISAM;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 8
Error Number : 1064
Request Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Error Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Script : http://www.premiumkenti.com/gizlicp/plugin.php?do=productimport
Referrer : http://www.premiumkenti.com/gizlicp/plugin.php?do=productadd
IP Address : REMOVED
Username : REMOVED
Classname : vB_Database
MySQL Version : 5.5.42-cll
TheLastSuperman
09-01-2015, 09:18 PM
Database error in vBulletin 3.8.8:
Invalid SQL:
CREATE TABLE IF NOT EXISTS `coupons` (
`couponid` int(10) unsigned NOT NULL auto_increment,
`couponname` varchar(50) NOT NULL default '',
`couponvalue` int(3) unsigned NOT NULL default '0',
`couponvalidfrom` DATE,
`couponvalidto` DATE,
PRIMARY KEY (`couponid`)
) TYPE=MyISAM;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 8
Error Number : 1064
Request Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Error Date : Tuesday, September 1st 2015 @ 04:27:39 AM
Script : http://www.premiumkenti.com/gizlicp/plugin.php?do=productimport
Referrer : http://www.premiumkenti.com/gizlicp/plugin.php?do=productadd
IP Address : REMOVED
Username : REMOVED
Classname : vB_Database
MySQL Version : 5.5.42-cll
I removed your username and IP address form this error message, never post your IP - simply edit and remove ;).
Also please do not report a modification thread unless its a security risk, a general error is not deemed a report worthy.... umm report!
Edit: Ignore the below strike through notes, I left them for reference purposes only. Instead of doing the below edit, simply download the file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml " and install that XML file instead of the one included, this willnew version will check to see what mysql version you're on and assign type or engine accordingly. I took the original file and edited for those who do not know how. *This is NOT required unless you have an error identical to Premiumkenti's issue above.
On a side note, seems the .xml needs to be edited, edit the .xml file with Notepad++ (Google it and download and install that program to edit, DO NOT USE Windows Notepad/Wordpad it can cause issues) and find this in the file:
TYPE=MyISAM;
Change to:
ENGINE=MyISAM;
Save the .xml file, now install the mod and done :cool:.
TheLastSuperman
09-02-2015, 05:45 PM
Updated once more, the fixed file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml" now checks your mysql version and assigns TYPE or ENGINE accordingly :cool:.
Example:
// Check for TYPE or ENGINE based on version from what I read it was still in 5.1.45 fully but only partially there afterwords - TheLastSuperman
$mysql_version = $db->query_first("SELECT version() AS version");
define('MYSQL_VERSION', $mysql_version['version']);
$type_or_engine = (version_compare(MYSQL_VERSION, '5.1.45', '<')) ? 'TYPE' : 'ENGINE';
$vbulletin->db->query_write("
CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."discounts` (
`discountid` int(10) unsigned NOT NULL auto_increment,
`discountname` varchar(50) NOT NULL default '',
`discountvalue` int(3) unsigned NOT NULL default '0',
`discountvalidfrom` DATE,
`discountvalidto` DATE,
PRIMARY KEY (`discountid`)
) $type_or_engine=MyISAM
");
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.