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 04-07-2008 12:22 PM

Quote:

Originally Posted by Rickeo (Post 1484641)
Not working for me I did everything the install instructions said but when I import the product I can't find vbcoupons anywhere in the admincp and when I manually go to the file in admincp it just shows a table with no options or anything to add coupons please fix this my whole forum opening is kind of relying on this mod lol

Refresh your admincp and it should show the menu on the left.

Quote:

Originally Posted by DssCrazy (Post 1479542)
problems found. when you gen a key if use is set to 1 it will not work. idk why that is.

I think it's just because of a conditional I have checking it's > than 1 that should be checking if it's greater than or equal to 1 :o

Quote:

also can you add a future to 1 click del all coupon codes this will come in handy.
Sure. I actually only thought of that when I had finished the last update!

Quote:

Originally Posted by bada_bing (Post 1485169)
Great Mod.. I have this installed on one of my sites bus hesitant to install on my other site unless the bug I and someone else mentioned, any updates?

I have no idea what is going on there bada_bing. The way this works, your error should not even be able to occur.

I will be re-writing this during the week to clean it up a lot and remove any possible errors.
Hopefully any of you who have errors with the current version will have them resolved in the next.

ChurchMedia 04-09-2008 02:54 PM

A couple of things suggestions:

EDIT: 1) Found the problem -- conflict with a mod I made.

2) It would be ideal to be able to assign more than one subscription ID to a coupon. You could code this pretty easily using "explode" for commas.

3) When you assign a coupon code, the code is changed to lower case ($coupon_name = strtolower($coupon_name);). That isn't good for me because I'd like to use all-caps in my codes. I can just comment out the line, but you might want to make it optional or something.

Thanks again for this mod! It's something I've been waiting for forever. :)

ringleader 04-10-2008 07:09 AM

Quote:

Originally Posted by ChurchMedia (Post 1486758)
2) It would be ideal to be able to assign more than one subscription ID to a coupon. You could code this pretty easily using "explode" for commas.

It was simply because I would have no use for that that I didn't think of it before :)
I'll add it in this weekend to the new, hopefully much cleaner, version.

Quote:

Originally Posted by ChurchMedia (Post 1486758)
3) When you assign a coupon code, the code is changed to lower case ($coupon_name = strtolower($coupon_name);). That isn't good for me because I'd like to use all-caps in my codes. I can just comment out the line, but you might want to make it optional or something.

Pure laziness made me do that!
The check when the person inputs a coupon in their payments.php (in any case, upper or lower) will convert it to lower and check it against the lowercase version in the DB. It's just easier for all. The reasoning was that people don't notice case-sensitivity when inputting stuff like this.
So you can use upper or lowercase for your coupons - it's independent.

gonkowonko 04-10-2008 10:05 AM

is there anyway to have a percent like 16.6 off rather than a whole number, reason being im trying to deduct £2 but i cant get to exactly as i need to enter 16.6

or change it so that you define how much they can have off the price ie £2

**scrap that i have edited the php files to allow me to deducted actual amounts rather than percentages

Thanks this is a GREAT HACK!

ringleader 04-10-2008 11:19 AM

Quote:

Originally Posted by gonkowonko (Post 1487338)
is there anyway to have a percent like 16.6 off rather than a whole number, reason being im trying to deduct ?2 but i cant get to exactly as i need to enter 16.6

I was (rather stupidly) working with integers only when making this :o

I'll see what I can do about this in future.
Probably could incorporate it somehow.
Glad you like the hack!

Martin-TMGRS 04-10-2008 11:48 AM

I've added all the file edits and uploaded all the files. I can see where you add the coupon code in the usercp but I can't see anything in my admincp:confused: any ideas please.

ringleader 04-10-2008 12:06 PM

Quote:

Originally Posted by Martin-TMGRS (Post 1487397)
I've added all the file edits and uploaded all the files. I can see where you add the coupon code in the usercp but I can't see anything in my admincp:confused: any ideas please.

Refresh the admincp - the menus are only built once the first time you enter the admincp ;)

Martin-TMGRS 04-10-2008 12:17 PM

Quote:

Originally Posted by ringleader (Post 1487408)
Refresh the admincp - the menus are only built once the first time you enter the admincp ;)

I have done that many time. I've even logged out hoping that would have done the trick. but still nothing!!!!

ringleader 04-10-2008 12:20 PM

Quote:

Originally Posted by Martin-TMGRS (Post 1487414)
I have done that many time. I've even logged out hoping that would have done the trick. but still nothing!!!!

Do you have the file /includes/xml/cpnav_vbcoupons.xml?
Because if you have that, then there is absolutely no reason why it would not show.

Martin-TMGRS 04-10-2008 12:23 PM

Quote:

Originally Posted by ringleader (Post 1487420)
Do you have the file /includes/xml/cpnav_vbcoupons.xml?
Because if you have that, then there is absolutely no reason why it would not show.

Yep that file is there :confused:

ringleader 04-10-2008 12:41 PM

Quote:

Originally Posted by Martin-TMGRS (Post 1487424)
Yep that file is there :confused:

Try the xml attached to this post.
Upload it to /includes/xml/cpnav_vbcoupons.xml
Refresh the admincp.
Does it show now?

Martin-TMGRS 04-10-2008 12:54 PM

Quote:

Originally Posted by ringleader (Post 1487433)
Try the xml attached to this post.
Upload it to /includes/xml/cpnav_vbcoupons.xml
Refresh the admincp.
Does it show now?

Yes thats done the trick....Thanks :)

ringleader 04-10-2008 01:05 PM

Quote:

Originally Posted by Martin-TMGRS (Post 1487441)
Yes thats done the trick....Thanks :)

Phew!
Thanks for asking - it's better for me to have you solve the problem than not use the mod at all!

Enjoy :D

ringleader 04-14-2008 08:23 PM

Version 1.4 is out now.

This changes the percentages preveiously used as discounts to monetary values, e.g. $3.50 instead of 20% as previously used.

You can also now mass-generate coupon codes and post them to a thread in a forum of your choice.

Coupons can now be restricted to one or more subscriptionids.

It is recommended that you upgrade to this version.

DssCrazy 04-14-2008 09:26 PM

NICE FREAKIN WORK!!!! This is a Wicked update i tested and does work on 3.6.8

I found 1 problem with this tho when clicking over write for the XML you get a database error.

Thanks for adding the idea to post coupon codes

ringleader 04-14-2008 09:30 PM

Quote:

Originally Posted by DssCrazy (Post 1490734)
I found 1 problem with this tho when clicking over write for the XML you get a database error.

Dammit, I even tried overwrote my own and tested that like 10 times and it seemed fine.
Bloody SQL :mad:
I'll try to fix it in the morning - i've to be up for my day job in about 6 hours!

Thanks though, man :D
Glad you like it.

PyroNET 04-15-2008 12:08 AM

Installed :) Thank you very much for this.

ringleader 04-15-2008 06:33 AM

Quote:

Originally Posted by PyroNET (Post 1490830)
Installed :) Thank you very much for this.

Glad you like it :)



If UPGRADING this product, choose 'No' for 'Allow Overwrite' when importing the new product in the adminCP. You will get an error if you choose to overwrite.

bada_bing 04-15-2008 05:49 PM

Just tried to upgrade to version 1.4 with no override and reveived this error

HTML Code:

Database error in vBulletin 3.6.9:

Invalid SQL:

ALTER TABLE `vb_user` ADD (couponid int(10) UNSIGNED NOT NULL DEFAULT '0');

MySQL Error  : Duplicate column name 'couponid'
Error Number : 1060
Date        : Tuesday, April 15th 2008 @ 01:47:39 PM
Script      : http://www.mysite.com/forums/admincp/plugin.php?do=productimport
Referrer    : http://www.mysite.com/forums/admincp/plugin.php?do=productadd
IP Address  : x.x.x.x
Username    : myusername
Classname    : vb_database


DssCrazy 04-15-2008 08:01 PM

Quote:

Originally Posted by bada_bing (Post 1491423)
Just tried to upgrade to version 1.4 with no override and reveived this error

HTML Code:

Database error in vBulletin 3.6.9:

Invalid SQL:

ALTER TABLE `vb_user` ADD (couponid int(10) UNSIGNED NOT NULL DEFAULT '0');

MySQL Error  : Duplicate column name 'couponid'
Error Number : 1060
Date        : Tuesday, April 15th 2008 @ 01:47:39 PM
Script      : http://www.mysite.com/forums/admincp/plugin.php?do=productimport
Referrer    : http://www.mysite.com/forums/admincp/plugin.php?do=productadd
IP Address  : x.x.x.x
Username    : myusername
Classname    : vb_database


Yes, please uninstall the old version on your vb board and reup the new.

Dannyloski 04-15-2008 08:52 PM

Wow, I'm installing this Mod because I think its just great. I dont need it now, but maybe later on I might decide to start offering discounts via Coupon Codes for Advertisers (As that's what I use the Subscriptions for), so this will come in handy.

DssCrazy 04-16-2008 05:30 AM

Problem found.

when making coupon codes uses must be set to 2 min to use. if set to 1 it will not work

ringleader 04-16-2008 07:04 AM

Quote:

Originally Posted by DssCrazy (Post 1491867)
when making coupon codes uses must be set to 2 min to use. if set to 1 it will not work

I remember you mentioning that before, but I couldn't find where in the code the problem was being caused. I will look again soon - I'm sure it'll get found.

bada_bing 04-16-2008 12:09 PM

Quote:

Originally Posted by DssCrazy (Post 1491535)
Yes, please uninstall the old version on your vb board and reup the new.

I have just uninstalled the 1.3 version and uploaded the new files and installed the 1.4 plugin and it installed ok but when I generate a coupon and tell it to apply it to my subscription example (1) and I apply the coupon this amount is not deducted? I have tried over and over , getting ready to remove this hack until the bugs are worked out, my opinion 1.3 ran smoother

bada_bing 04-16-2008 12:41 PM

I want to apoligize as I found my issue, when I upgraded to 1.4 I did not redo the file edits in payment.php as I thought it would retain this from the previous version once I did the edits it now works.. Thank You...

ringleader 04-16-2008 12:44 PM

Quote:

Originally Posted by bada_bing (Post 1492097)
I want to apoligize as I found my issue, when I upgraded to 1.4 I did not redo the file edits in payment.php as I thought it would retain this from the previous version once I did the edits it now works.. Thank You...

Ah excellent stuff!
I was so worried wondering where such a unique problem could have come from - I really hadn't a clue how to solve your issue.

Did you upgrade to 3.6.9 recently as well?
I think the payments.php file is overwritten during the upgrade. Bad timing! :(

DssCrazy 04-20-2008 05:59 AM

Some ideas.

when making coupons add the option to mass edit coupons instead of needing to edit 1 at a time.

add the option so when a members trys to type in a exp coupon code it says coupon exp instead of (invaild)

add the option to add a green txt to the paid id so that the members know which id thing they are getting a discount on

Thanks

bada_bing 04-23-2008 06:42 PM

I have tried to install this on my other site which is VB 3.5.x and received database errors. Can someone tell me know I can get this working on my 3.5.x site would love to be compadible wit that version please.

ringleader 04-24-2008 06:27 AM

Quote:

Originally Posted by bada_bing (Post 1497520)
I have tried to install this on my other site which is VB 3.5.x and received database errors. Can someone tell me know I can get this working on my 3.5.x site would love to be compadible wit that version please.

It's probably database incompatibility.
I'll download vb3.5 this weekend and see if I can make it work for that :)

DssCrazy 04-24-2008 06:47 AM

Quote:

Originally Posted by DssCrazy (Post 1494946)
Some ideas.

when making coupons add the option to mass edit coupons instead of needing to edit 1 at a time.

add the option so when a members trys to type in a exp coupon code it says coupon exp instead of (invaild)

add the option to add a green txt to the paid id so that the members know which id thing they are getting a discount on

Thanks

RingLeader can you add these ideas in?

ringleader 04-24-2008 07:30 AM

Quote:

Originally Posted by DssCrazy (Post 1497920)
RingLeader can you add these ideas in?

I'm sure I can.
I actually just thought of a way to mass-edit them just there, but it would be based on a prefix you set for the coupons (otherwise there's no telling which coupons are related).

I'm actually looking to launch a local dating site of mine here in the print media in Ireland, so I expect to be extremely busy with that over this coming weekend, but I will get around to doing this in between.
Should be an update to it before the first weekend in May then.

Dannyloski 04-24-2008 03:24 PM

ringleader, Just a heads up that this is in fact affected by the new Security Token on 3.6.10 and 3.7.0 RC4 ... Its a really easy fix though (see below) ...

In the vbCoupons_couponbit template FIND:
Code:

<form action="payments.php?do=addcoupon" method="post">

BELOW that line add:
Code:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

In the same template (vbCoupons_couponbit) FIND:
Code:

<form action="payments.php?do=deletecoupon" method="post">

BELOW that line add:
Code:

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

That's it! I did that and now its working like a charm again. So for those who need this Quick Fix until the New Version is released, there it is ...

Hornstar 04-25-2008 05:12 AM

cant believe I only just saw this hack now o_O This is something I have been long awaiting for ^^

Thanks heaps!

ringleader 04-25-2008 06:59 AM

Quote:

Originally Posted by Dannyloski (Post 1498254)
<snip>

That's excellent stuff, Dannyloski.
I haven't actually even had the time to look at 3.6.10 yet so who knows when this would have been done.
I will include it in the update that's coming soon.

Dannyloski 04-25-2008 02:17 PM

ringleader, no problem just glad to help out ...

bada_bing 04-25-2008 07:06 PM

Quote:

Originally Posted by ringleader (Post 1497903)
It's probably database incompatibility.
I'll download vb3.5 this weekend and see if I can make it work for that :)

Awesome please please let me know if you can get this to work on 3.5.x

thank you

mrkhm 04-26-2008 07:00 PM

many thanks for this works fine on vb 3.6.8.

any idea on how to make the redirect for the user to be to the payments page, for instance after adding a coupon or deleting a coupon, it should perhaps redirect to payment.php as supposed to index.php in the case of not so advanced users who might just wonder what went on and have to find the payments page all over again?

bada_bing 04-27-2008 03:10 AM

Quote:

Originally Posted by ringleader (Post 1497903)
It's probably database incompatibility.
I'll download vb3.5 this weekend and see if I can make it work for that :)

Hey ringleader

Just wanted to see if you will get a chance to take a look this weekend..

Thank you

regitbull 05-02-2008 01:07 PM

nice updates on the mod.
i havend check this mod for 3 weeks and i must say that its 10 times better now with all the extra features.
But i have 1 req.
Could you give us the option to or select a discount PERCENTAGE or a MONETARY VALUE.
Because the problem with monetary values is that it use the same discount on all money values.
So when you fill in 10,00 in the discount then it gives 10,00 usd discount but also 10,00 euro discount.
So it will use the same value for all money types.

Would be cool if you could give us the option to choose between PERCENTAGE or MONETARY VALUE.

Anway great job with the updates :D

Julie 05-03-2008 08:54 PM

Hi!

Will this work for 3.7? It not, any chance it may be re-written for it? Thanks in advance :)


All times are GMT. The time now is 07:43 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.01335 seconds
  • Memory Usage 1,850KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_html_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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