Author Topic: [SOLVED] "Voucher Code" Item  (Read 21763 times)

Offline Matthew Gall

[SOLVED] "Voucher Code" Item
« on: July 15, 2007, 04:25:02 am »
On My Forum I Run Competitions And Games etc And Offer Shop Credits And Awards As Prizes... The Manual Giving Out Of Awards I Can Handle But I Would Love To Have A System Of Say
  • Creating A "Voucher" Code
  • Assigning That Voucher A Specified Number Of Credits
  • User Can Redeem The Voucher
  • Voucher Amount Will Be Added To Bank Total (Or Hand)

I Am Guessing That I Would Need A MySQL Table In Which To Store The "Voucher" Code And It's Respective Shop Credit Amount.

Would It be Possible For Someone To Make This Modification For Me? Or Assist Me In Making This Modification? (You Will Be Credited!)

Thank's In Advance

Offline feeble

Re: "Voucher Code" Item
« Reply #1 on: July 15, 2007, 10:57:09 am »
Shouldnt be to difficult.

If you have tinyportal installed, we could make a quick go at it and see how it works out.
If not, no matter

In saying this thou, currently I dont have enough time to write it for you,
but I'm more then happy to help you write it.

Couple of questions:
How would your users obtain said voucher?

And how about, when they input a valid voucher how about just give them an item. Then the item could be anything.
Also would make the mysql table small(id, voucher, itemid)

Offline Matthew Gall

Re: "Voucher Code" Item
« Reply #2 on: July 15, 2007, 06:18:18 pm »
Shouldnt be to difficult.

If you have tinyportal installed, we could make a quick go at it and see how it works out.
If not, no matter

In saying this thou, currently I dont have enough time to write it for you,
but I'm more then happy to help you write it.

Couple of questions:
How would your users obtain said voucher?

And how about, when they input a valid voucher how about just give them an item. Then the item could be anything.
Also would make the mysql table small(id, voucher, itemid)

Thaks For Your Reply Feeble,
Unfortunately I Do Not Have TinyPortal Installed On My SMF Forum As I Have A Joomla Installation Acting As The Main Portal Frontend... But If It Can Be Written So That Users With TinyPortal Installed Can, Say Have A Block Code So That They Can Just Type In The Code And The Voucher Will Be Redeemed I Will Be More Than Happy To. Now To Answer Your Questions:
1) The User Would Not Buy The Voucher,,,,,,, In The SMF Backend There Could Be A Page That Allows The Admin (Or Anyone With Permissions) To Create A "Voucher" And Specify The Amount Of Credits That That Voucher (Very Much Like A Cheque) Is Worth / The Item That WIll Be Given To The User When The Voucher Is Redeemed.
So For Example,
i) The Forum Admin Could Create A "Voucher" Worth 1000 Credits (Or Whatever The Forum Currency Is)
ii) The User Who Needed The Voucher (Or Has Earned It In An Event Or Competition) Could Receive A Personal Message (Does Not Have To Be Automated) With The Voucher Code (Like A Random String Of Numbers Or Letters, e.g f65hglkdf)
iii) Once The User Has Received The Personal Message Or Whateva.... They Could Enter The Shop And Click On A Link (For Example, Voucher Redemption)
iiii) The User Then Enters The Voucher Code And Whatever The Admin Has Specified That Voucher Being Worth (i,e Credit Value Or Item Value) Would Be Added To The User's Items Or Bank (Must Be Specifiable)

2) I Like The Idea Of The Voucher Redeeming An Item But For My Usage I Would Like It To Be Either A Credit Value Or An Item Value As This Would Allow It To Be Very Diverse Even Though It Will Make The MySQL Table Bigger. This Would Most Possible Be (id, voucher_code, credit_value, bank_hand, itemid)

Offline feeble

Re: "Voucher Code" Item
« Reply #3 on: July 17, 2007, 09:26:24 pm »
http://www.leaderless.net/tp-downloads/redeemShop.zip

give this a go should be what you are after

Requires SMF Version 1.1.2 or 1.1.3

to use
goto SMF Action: ?action=redeemShop

Offline Matthew Gall

Re: "Voucher Code" Item
« Reply #4 on: July 19, 2007, 02:22:47 am »
Feeble! You Really Are The Man! Is This A Custom Build?

You Rawk!
+ Rep

However... 1 Small Thing? Is It Possible 2 Select If It Can be Used Once Or Mutliple Times? And Also..... How Can I Add A Link In The Shop Menu To The Voucher Redemption Area?
« Last Edit: July 19, 2007, 02:27:57 am by Matthew_Gall2005 »

Offline feeble

Re: "Voucher Code" Item
« Reply #5 on: July 19, 2007, 03:36:36 am »
This A Custom Build?
What do you mean by this? All code is my own.

Can be Used Once Or Mutliple Times?
It is possibly, but Im not entirely sure why you would want this? as what would stop the user inputting the voucher code multiple times to receive every count?

Add A Link In The Shop Menu To The Voucher Redemption Area?
You could...but why?
Dont you have a shop link on the top of your website? already?
If you still require it thou, i can add it in or you can, just open up themes/default/RedeemShop.template.php
should be simple enough

Offline Matthew Gall

Re: "Voucher Code" Item
« Reply #6 on: July 19, 2007, 03:45:28 am »
Sorry About That Feeble..... I Was Quite Excited And Confused......  8) (I Get Like That Sometimes...)

Add A Link In The Shop Menu To The Voucher Redemption Area?
You could...but why?
Dont you have a shop link on the top of your website? already?
If you still require it thou, i can add it in or you can, just open up themes/default/RedeemShop.template.php
should be simple enough
When I Said This, I Meant In The SMF Shop LinkTree. However I Have Worked Out How To Do That And I Have Added It To My Shop...

This A Custom Build?
What do you mean by this? All code is my own.

Just Ignore The Stuff About A Custom Build......

Can be Used Once Or Mutliple Times?
It is possibly, but Im not entirely sure why you would want this? as what would stop the user inputting the voucher code multiple times to receive every count?

I Am Sorry.... I Worded This Completely Wrong..... - I Will try Again.... , If I Was To Issue A Voucher To A User (Say As A Competition Prize) - I Don't Want It Used Repeatedly. So I Meant That If I Wanted It To Be Automatically Deleted After 1 USE (To Avoid Abuse) Or To Allow It To Be A Continual Voucher (i.e Not Expire)

However,
I Thank You For Your Work On This Modification And It Is Excellent!

« Last Edit: July 19, 2007, 03:47:13 am by Matthew_Gall2005 »

Offline feeble

Re: "Voucher Code" Item
« Reply #7 on: July 19, 2007, 05:11:37 am »
Well how it works atm, is that once the voucher is used, its marked as "Redeemed" and cant be used again.

If you are asking for say? a voucher that can be used multiple times but only once per member?

Offline Matthew Gall

Re: "Voucher Code" Item
« Reply #8 on: July 19, 2007, 05:34:48 am »
If you are asking for say? a voucher that can be used multiple times but only once per member?

Yes, That Is Exactly What I Want.....

Well how it works atm, is that once the voucher is used, its marked as "Redeemed" and cant be used again.

That However Does Not Seem To Work Correctly - I Have Tried It On An Admin Member And A Normal Member Of The Forum. But That Does Not Seem To Work


Offline feeble

Re: "Voucher Code" Item
« Reply #9 on: July 19, 2007, 06:26:32 am »
Ok ive fixed that bug, and also added "Multiple"

"Multiple" is a voucher that can be redeemed multiple times but only once per member

Just uninstall the mod, delete then download this new version
http://www.leaderless.net/tp-downloads/redeemShop.zip


Offline Matthew Gall

Re: "Voucher Code" Item
« Reply #10 on: July 19, 2007, 11:53:22 pm »
Thanks Very Much feeble
Works Excellently!

Topic Locked

Offline Matthew Gall

Re: [SOLVED] "Voucher Code" Item
« Reply #11 on: July 23, 2007, 12:21:18 am »
Topic Unlocked
Topic Unlocked To Allow Troubleshooting Requests From Other Users

Offline Joker Grafix

Re: [SOLVED] "Voucher Code" Item
« Reply #12 on: July 28, 2007, 05:56:48 pm »
I downloaded, and installed this mod but I don't see any admin controlls anywhere in my admin panel for it.

Any suggestions?

Offline feeble

Re: [SOLVED] "Voucher Code" Item
« Reply #13 on: July 28, 2007, 07:50:41 pm »
to use
goto SMF Action: ?action=redeemShop

Offline Joker Grafix

Re: [SOLVED] "Voucher Code" Item
« Reply #14 on: July 28, 2007, 08:12:28 pm »
I assume that is in my /forum files?