vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - vbCoupons - offer money-off coupons for paid subscriptions (https://vborg.vbsupport.ru/showthread.php?t=173778)

ringleader 03-21-2008 10:00 PM

vbCoupons - offer money-off coupons for paid subscriptions
 
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 https://vborg.vbsupport.ru/external/2008/03/6.gif

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

ringleader 03-22-2008 02:18 AM

***** First post reserved, in case of need ****

neonneon 03-22-2008 02:27 AM

Where is the Subscription template?
I dont see it in my templates list...

ringleader 03-22-2008 02:29 AM

Apologies, it's in the Paid Subscription Templates >> subscription

neonneon 03-22-2008 02:31 AM

Thank you very much
:)

bwilky 03-22-2008 02:33 AM

Sweet. Thank you sooo much :)

neonneon 03-22-2008 02:50 AM

I feel like a retard, but how do you add new coupons?

ringleader 03-22-2008 03:02 AM

Quote:

Originally Posted by neonneon (Post 1471275)
I feel like a retard, but how do you add new coupons?

edit: uh oh. Maybe not in your one.

Si?cra (expletive).
The damn updated xml wasn't packaged with it.

Upload the one attached to this post to your ./includes/xml/ directory and it will show for you when you refresh your admincp.

Sorry about that - obviously I'm the thick one around here :)

I have updated the original zip with this xml file.

Lionel 03-22-2008 03:36 AM

Suggestions: Can you auto generate (md5) the coupons names with a prefix that we set, e.g. Easter-1x54uy6yzt

Can you add an option to generate multiple coupons at once?

ringleader 03-22-2008 03:44 AM

Quote:

Originally Posted by Lionel (Post 1471304)
Suggestions: Can you auto generate (md5) the coupons names with a prefix that we set, e.g. Easter-1x54uy6yzt

Can you add an option to generate multiple coupons at once?

Like bulk-add some coupons that you can then use to distribute and track in various places?
That's entirely possible with some simple options.

Explain the use of this more so I don't get it wrong, please :)

Lionel 03-22-2008 03:52 AM

You've got it right: bulk adding them so you could mass mail them. Tracking will be nice

codershark 03-22-2008 07:31 AM

I cant see the settings in ACP on vbulletin 3.7 RC1

ringleader 03-22-2008 07:32 AM

Actually, I went off and had a think about what you said Lionel, and I don't think your suggestion is needed for this hack (not in the way I'm thinking about it anyway).

For example: if you create a single coupon, it's valid to be used by anyone who has the code.
So if you create the coupon 'Easter' and email it to certain people for a 50% off offer, they can all use that code. The hack only takes the value of a particular coupon off a persons potential payments; it doesn't discriminate about who owns the code.

Unless you mean to add person-specific coupons to people, in which case they could post theirs all over the internet (the same way as if there was only one code in existence) and everyone who had it could still use it.
It would defeat the purpose of anything if a single code were assigned to a single person, creating a great many queries for your board with little comparative return.

Unless, of course, you mean something entirely different in the first place ;)

ringleader 03-22-2008 07:59 AM

Quote:

Originally Posted by codershark (Post 1471405)
I cant see the settings in ACP on vbulletin 3.7 RC1

Do you have admin permissions 'Can Admin Users'?
I would presume anyone installing or using this would.
Go to Usergroups -> Administrator Permissions and check yours, just to be sure.

Force a refresh of your admincp, i.e. the whole page, so that the panels on the left are regenerated.

The ./includes/xml/cpnav_vbcoupons.xml is what makes the link in the admincp, so if you have that file, you should have the menu too.

I even downloaded v3.7RC1 to check, and there's nothing in this mod that shouldn't work on it, and it should even work on 3.5.4 as well.

ringleader 03-22-2008 09:43 AM

Minor Update for those who have installed this mod at this time:
Go to Plugin Manager -> Find Fetch Coupon Template -> Edit.
Change hook location from paidsub_list_available to paidsub_complete or the coupons bit will show multiple times on the payments.php page.

Everyone else: never mind this if you're just downloading the mod after this post :)

stamos2003 03-22-2008 11:38 AM

look promissing, i will give it a try :)

edit: the coupon enter field is not showing up in the subscriptions?! (vb 3.6.8)

ringleader 03-22-2008 12:50 PM

Quote:

Originally Posted by stamos2003 (Post 1471510)
look promissing, i will give it a try :)

edit: the coupon enter field is not showing up in the subscriptions?! (vb 3.6.8)

This should do the trick:
uninstall the old product, and install this one attached to this post.

stamos2003 03-22-2008 02:04 PM

still nothing....
weird?!

I even added the template manually but nothing.....

regitbull 03-22-2008 02:15 PM

nice to see this released.
I just paid for this mod + some other functions.

Anyway nice release :)

ringleader 03-22-2008 02:49 PM

Quote:

Originally Posted by stamos2003 (Post 1471605)
still nothing....
weird?!

I even added the template manually but nothing.....

DId you follow the instruction to add the word $couponbit after </form> in your Paid Subscription Templates -> subscription, perhaps :confused:

And check the plugin called Fetch Coupon Template is active?
That's the only 2 other reasons it wouldn't be working for you.

Quote:

Originally Posted by regitbull (Post 1471607)
nice to see this released.
I just paid for this mod + some other functions.

Anyway nice release :)

Thanks. I'm a big believer in the free exchange and discussion of other peoples ideas ;)
That, and I couldn't be bothered setting up a way to charge people for such things... :D

bada_bing 03-22-2008 05:12 PM

This sounds pretty cool.... I will concider this soon

KeyStalker 03-22-2008 07:26 PM

I installed this, and just like the other guys the coupon thing isn't showing up. But everything in admincp looks fine.

DssCrazy 03-22-2008 07:45 PM

Same for me installed everything all looks good in admincp but does not show up on board

DssCrazy 03-22-2008 08:09 PM

I will be the first to donate if you can get this mod working.

member007 03-22-2008 08:14 PM

I notice that there're 2 duplicate vbcouponsv1.0 files...which one to use?

ChurchMedia 03-22-2008 10:39 PM

Nice! I've been waiting for this forever! I'll send you a donation for it soon.

Thanks! :)

DssCrazy 03-22-2008 10:59 PM

ChurchMedia, did you get it to work? if so please xplain what you did

thanks bro

ChurchMedia 03-22-2008 11:04 PM

I haven't tried it yet. Easter is a busy weekend for us, so I'll give it a go next week and let you know!

DssCrazy 03-22-2008 11:08 PM

ok cool

thanks

Skyline_GT 03-23-2008 10:23 AM

Very nice mod. Will install this

stamos2003 03-23-2008 10:44 AM

Quote:

Originally Posted by ringleader (Post 1471634)
DId you follow the instruction to add the word $couponbit after </form> in your Paid Subscription Templates -> subscription, perhaps :confused:

And check the plugin called Fetch Coupon Template is active?
That's the only 2 other reasons it wouldn't be working for you.

yes, plugins are active and the templates are there, still not showing up.
As I see I am not the only one.
Which Version do you have?

ringleader 03-23-2008 02:41 PM

Sorry for the last time. I made a typo in the call to the couponbit template when I packaged the last one.

A new one is uploaded that calls everything correctly now.

Just overwrite everything (files and product) with the files in this new zip.

stamos2003 03-23-2008 04:07 PM

it's still not working?! :D
I replaced everything and redid everything....

ringleader 03-23-2008 04:28 PM

Quote:

Originally Posted by stamos2003 (Post 1472564)
it's still not working?! :D
I replaced everything and redid everything....

Do you have a template called vbcoupons Templates >> vbCoupons_couponbit
when you install the product?

And a Plugin under hook called paidsub_complete with the content:
Code:

$user_coupon_name = get_coupon();

eval('$couponbit .= "' . fetch_template('vbCoupons_couponbit') . '";');

And $couponbit at the bottom of your Paid Subscription Templates >> subscription template

And have a subscription set in your Paid Subscriptions - Subscription Manager.

Because if you have those four things there's absolutely no reason the template would not show on your payments.php page.

Since you didn't mention getting a white screen on your payments.php after doing the file edit, the rest of the code besides the couponbit is fine.

ringleader 03-23-2008 04:30 PM

Wait a second, sven/stamos2003, I just checked your profile and it says you have version 3.5.3

If that's right, this might not work on your board since the hooks it uses wouldn't have been invented until at least 3.5.4 :mad:

stamos2003 03-23-2008 04:46 PM

no worries, I just did not update my profile, I have 3.6.8
I have the template vbCoupons_couponbit
and I have following plug ins:
Add, Delete, Deduct Coupon For User Hookpoint: paidsub_start
Cache Coupon Template Hookpoint: cache_templates
Create Template Group Hookpoint: template_groups
Fetch Coupon Template Hookpoint: paidsub_complete

ringleader 03-23-2008 04:54 PM

Okay then, there's just two more things to check:

1. Does the hook under paidsub_complete say what's quoted above?
2. Do you have any subscriptions for people to pay for? The coupon template won't be called, otherwise.

EDIT: Oh, and most importantly, did you edit the template Paid Subscriptions Templates >> subscription and place the word $couponbit AFTER </form>

DssCrazy 03-23-2008 05:08 PM

i have uploaded everything and i still can't see it also.

ringleader 03-23-2008 05:11 PM

I know it's a lot to ask, but could one of you give me access to your admincp to see the difference between your set up and mine for this mod?

DssCrazy 03-23-2008 05:12 PM

i have checked everything and i can't see what went wrong.


All times are GMT. The time now is 05:13 AM.

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.01482 seconds
  • Memory Usage 1,826KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete