|
#1
|
||||
|
||||
[1.3.4] Currency Promocodes
Hello! This is my first ever tutorial on here lol. Anyway, I wanted the ability to make a promocode to give a user some money (and even premium currency) so I managed to do that. It also has adminCP functions so you can just add promos like you normally would!
First of all, open admincp/view/promoview.php. Find this, in public function add(): PHP Code:
PHP Code:
Now, scroll down further until you find the public function edit() section. Find the same 3 lines and add the new currency line. Save the file. Find and open classes/class_promocode. Find public function execute(){ and replace it with this: PHP Code:
Premium currency tutorial on next comment!
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.
|
#2
|
||||
|
||||
Adding Premium Currency
First of all, follow this tutorial to add premium currency to your site Then in admincp/view/promoview.php, add this line... PHP Code:
Then in classes/class_promocode.php, add this... PHP Code:
Make sure you look through the code and see if it matches up with your own database! If you named the premium currency field (for example) anything other than 'premiumcurrency' while adding it to your site, you might have to tweak it. I'm willing to help if you need it, just comment below. Also, this doesn't go over tweaking the descriptions that show up to say you can add currency now. That should be easy enough to do by just finding those lines in promoview.php yourself and making it say whatever you want it to! I hope this helps someone! It's very simple but I was quite proud of myself for managing it with no help lol.
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.
|
|
|
What's New? |
What's Hot? |
What's Popular? |