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

Reply
 
Thread Tools
vbCoupons - offer money-off coupons for paid subscriptions Details »»
vbCoupons - offer money-off coupons for paid subscriptions
Version: 1.4, by ringleader ringleader is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.9 Rating:
Released: 03-21-2008 Last Update: 04-14-2008 Installs: 94
DB Changes Uses Plugins Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

vbCoupons v1.4


About this mod:

This hack 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 40% off the first month! Just register and enter coupon code OFFER1"
2. In Admincp -> vbCoupons you configure a coupon called OFFER1 with value of 40, 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.

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.
* Input on features you would like to see for this hack is very welcome, but may not be possible to implement.

Time to install: 5 mins

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

Updates:

Version 1.0 (22nd March 2008):

* Release of this hack for vBulletin version 3.6.8
* This version should work on all vBulletin versions from 3.5.4 and up

Version 1.1 (25th March 2008):

* Fixed missing phrase
* Fixed non-functioning template call

Version 1.2 +1.3 (30th March 2008):

* Added coupon generator to this version
* Added ability to limit coupons to only be valid for a particular paid subscription.

Version 1.4 (14th April 2008):

* Generate coupons and post to thread
* Coupons can be limited to one or more subscriptionids
* MONETARY VALUES RATHER THAN PERCENTAGES ARE USED FROM NOW ON


MAKE SURE YOU CLICK INSTALL!
If you like this hack and use it then

Pictures (attached):

1. User (payments.php): Normal view before user adds a coupon that you configured in the admincp.
2. User (payments.php): View after the user adds a coupon to their account, with the new prices reflecting it.
3. Admin: Manage Existing Coupons
4. Admin: Add a single coupon discount code
5. Admin: Mass-generate coupons
6. Admin: Mass-generate coupons and post to a new thread
7. User: Thread view of mass-generated and posted coupon discount codes

Supporters / CoAuthors

Show Your Support

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

Comments
  #182  
Old 09-23-2008, 06:58 PM
EeeZee EeeZee is offline
 
Join Date: Jan 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this mod and find the max value for a coupon is 99. I need three digits because we deal with larger ticket items. Is there a quick mod? Also, I can't get rid of the not accepted currencies in the subscription cost listing. I know this is somewhat unrelated but need advice.

Update: I tinkered and now it is accepting three digit reductions. Nice little mod. Now if I could get rid of the unwanted currencies that are showing in the subscription section
Reply With Quote
  #183  
Old 10-13-2008, 05:47 PM
regitbull regitbull is offline
 
Join Date: Jan 2007
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

uuhm i just discovered a bug.

If you put 2 options in 1 subscription

Like $15 for 1 month and $50 for 3 months then there wont be a discount on any of thoose 2.

Could you please fix this ringleader.

Or does any1 else know how to fix this?
Reply With Quote
  #184  
Old 12-28-2008, 03:57 PM
abound abound is offline
 
Join Date: Nov 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ringleader,

I realize that this mod is currently limited to subtracting a discount from a subscription price, but adding just one piece of functionality outside that scope would make this mod perfect for me:

In payments.php, if you could add a check that when the cost is empty AND a coupon is used, then instead of issuing an error that the wrong currency was chosen, it simply skips payment, and goes to the next step, where the user is added to whatever group goes with the subscription.

Also, your latest posted version of vbcoupon was last April. You were hoping to get to several user requests at around the beginning of September. How's that coming? I want to install the mod, but will hold off if you're preparing for another release soon.
Reply With Quote
  #185  
Old 01-07-2009, 06:37 PM
Cars2007 Cars2007 is offline
 
Join Date: Jun 2007
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by forumguy View Post
Yes, I also have the same problem.

The problem is vbulletins system checks the paid amount against the amount you have set in your paid subscription to make sure they match (sort of a security check).

The coupon changes the value of the amount making them not match.

Has anyone found away around this yet?
We found a fix for this. Unfortunately, it is a script hack. But maybe it will do fine until the developer creates a more permanent fix.

We are using PayPal and made the following edits in includes/paymentapi/class_paypal.php:

Find:
PHP Code:
$this->paymentinfo $this->registry->db->query_first("
SELECT paymentinfo.*, user.username 

Add 'user.userid' to the select so that it now looks like this:
PHP Code:
$this->paymentinfo $this->registry->db->query_first("
SELECT paymentinfo.*, user.username, user.userid 

Find:
PHP Code:
if ($mc_gross == doubleval($cost["{$this->paymentinfo[subscriptionsubid]}"]['cost'][strtolower($this->registry->GPC['mc_currency'])])) 

Add this code right before it:
PHP Code:
$temp $this->registry->db->query_first("
SELECT couponid FROM " 
TABLE_PREFIX "user 
    WHERE userid = '" 
$this->paymentinfo['userid'] . "'
"
);
if(
$temp['couponid']!=''){
    
$mc_gross doubleval($cost["{$this->paymentinfo[subscriptionsubid]}"]['cost'][strtolower($this->registry->GPC['mc_currency'])]);

Reply With Quote
  #186  
Old 01-11-2009, 07:33 PM
MadK's Avatar
MadK MadK is offline
 
Join Date: Feb 2008
Location: Canada
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ringleader, any news?
Reply With Quote
  #187  
Old 01-19-2009, 05:25 PM
LCN2007 LCN2007 is offline
 
Join Date: Jul 2007
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tspore View Post
A very nice hack, With 3.7, I found a issue though.
I made the security fix above, so the token works, but when I apply a coupon, the values of the subscription are not updated, can anyone give me some help for this to be fixed?

I have attached a photo of the test board.
I am having this same issue, can anyone help?

Also i have seen a few people say they have the pro version where is this located.

Im running 3.7.2
Reply With Quote
  #188  
Old 01-22-2009, 06:31 PM
LCN2007 LCN2007 is offline
 
Join Date: Jul 2007
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #189  
Old 01-23-2009, 02:21 AM
bwcbob bwcbob is offline
 
Join Date: Mar 2006
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you make it so the coupon can only be used 1 time for only 1 certain paid subscription that will be unbuyable?
Reply With Quote
  #190  
Old 01-26-2009, 10:51 PM
LCN2007 LCN2007 is offline
 
Join Date: Jul 2007
Posts: 323
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ringleader you still supporting this one?
Reply With Quote
  #191  
Old 01-28-2009, 08:58 PM
valgar valgar is offline
 
Join Date: Dec 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abound View Post
Ringleader,

I realize that this mod is currently limited to subtracting a discount from a subscription price, but adding just one piece of functionality outside that scope would make this mod perfect for me:

In payments.php, if you could add a check that when the cost is empty AND a coupon is used, then instead of issuing an error that the wrong currency was chosen, it simply skips payment, and goes to the next step, where the user is added to whatever group goes with the subscription.

Also, your latest posted version of vbcoupon was last April. You were hoping to get to several user requests at around the beginning of September. How's that coming? I want to install the mod, but will hold off if you're preparing for another release soon.

I would love to have this functionality also, as it would work perfectly with some free subscriptions I would look to put out, yet keep some paid subscriptions active also.
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:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07397 seconds
  • Memory Usage 2,330KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete