Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBDiscounts - Give subscription discounts to your members! Details »»
vBDiscounts - Give subscription discounts to your members!
Version: 1.0, by zefyx zefyx is offline
Developer Last Online: Jan 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.x Rating:
Released: 04-17-2009 Last Update: 09-01-2015 Installs: 43
DB Changes Uses Plugins Template Edits
Re-useable Code Additional Files Translations Is in Beta Stage  
No support by the author.

Quote:
This modification is released with permission of the Re-usable Code from this modification.


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.

Download Now

File Type: zip product-vbdiscounts.v1.0.zip (32.0 KB, 403 views)
File Type: xml product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml (9.8 KB, 32 views)

Screenshots

File Type: jpg 1.jpg (74.0 KB, 0 views)
File Type: jpg 2.jpg (41.4 KB, 0 views)
File Type: jpg 3.jpg (35.4 KB, 0 views)
File Type: jpg 4.jpg (34.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 05-08-2010, 09:55 PM
MichaelDance MichaelDance is offline
 
Join Date: Dec 2009
Location: Warwickshire, UK
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
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
Reply With Quote
  #43  
Old 09-01-2015, 02:27 AM
Premiumkenti Premiumkenti is offline
 
Join Date: Sep 2013
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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/...=productimport
Referrer : http://www.premiumkenti.com/gizlicp/...?do=productadd
IP Address : REMOVED
Username : REMOVED
Classname : vB_Database
MySQL Version : 5.5.42-cll
Reply With Quote
  #44  
Old 09-01-2015, 09:18 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Premiumkenti View Post
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/...=productimport
Referrer : http://www.premiumkenti.com/gizlicp/...?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.

[S]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:
Code:
TYPE=MyISAM;
Change to:
Code:
ENGINE=MyISAM;
Save the .xml file, now install the mod and done .[/S]
Reply With Quote
  #45  
Old 09-02-2015, 05:45 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated once more, the fixed file "product-vbdiscountsTYPE-OR-ENGINE-MySQL-Fix.xml" now checks your mysql version and assigns TYPE or ENGINE accordingly .

Example:
PHP Code:
// 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
"
); 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06092 seconds
  • Memory Usage 2,294KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (6)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete