![]() |
Adoptables Shop - Working Again!
2 Attachment(s)
Ok I am 100% done with this version. I will make a new version with more features. But this one works and is running.
First you will need to install Sea's cash system. http://www.rusnakweb.com/forum/showthread.php?tid=1333 Next follow my steps (I will try to do this so it makes since) Around line 169 in your admin.php add this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
`shop` tinyint(1) NOT NULL default 'NULL', and `price` int(10) NOT NULL default 'NULL' shop.php is attached it is adopt.php but shows items that cost money instead of being free and adopt.php now should show items that do not cost money. Credit goes to Sea and Arianna for the code to get this working Sorry for not fixing broken links and such! |
RE: Item Shop - 50% Done
So will this be compatible with Sea's mod? If so, I'll stop working on mine. :)
|
RE: Item Shop - 50% Done
Quote:
|
RE: Item Shop - 50% Done
Ooh, awesome! :D For the items, can it use my deco mod? Because that needs a shop and is already finished, so they could maybe work together, along with the cash. :)
|
RE: Item Shop - 50% Done
Quote:
|
RE: Item Shop - 100% Done (For Now)
hmmm the thing doesn't turn green from edits :( so this is a bump I guess but I changed my first post so it really isnt a bump >.> :)
|
RE: Item Shop - 100% Done (For Now)
I already did something like this...? Apart from the else if, there's a code pretty much exactly like this on Sea's cash thread, on the last page, I think.
|
RE: Item Shop - 100% Done (For Now)
Quote:
|
RE: Item Shop - 100% Done (For Now)
Oh, that's weird. xD Why didn't it work? The users of my site seem to be able to be buying pets just fine. xD
|
RE: Item Shop - 100% Done (For Now)
Quote:
Also has anyone tried this yet? lol I want to know if anyone can get it to install so I can make sure I did it right lol |
RE: Item Shop - 100% Done (For Now)
I tried it but now i do see any of my regular adoptables on the adopt page and i dont see the 1 shop item i added in shop.php :s[hr]
It took me about 3 hours to set this up and get it working, but its def worth it, thanks for this mod :) Here is what i had to do to get it working. You have to change the "INSERT" code to this in nadopt.php PHP Code:
PHP Code:
|
RE: Item Shop - 100% Done (For Now)
I cant seem to figure this part out.
One the shop adopt page, it doesnt tell you exactly how many credits you have, it just always says "You have -1000 Credits " |
RE: Item Shop - 100% Done (For Now)
After spending most of today on this, i have finally figured it out.
After fixing the first few problems i found out that mod wasnt subtracting the cost of the shop item from the current balance, instead it was leaving the user with minus whatever the shop item cost, for example if i had 2000 credits and i bought an adoptable for 500 , it would say my balance was -500 :s , this was due to several things. Basically all you have to do now is edit the shop.php file and tell it to use doadopt2.php for the actual adoption (search for doadopt.php in shop.php and change it to doadopt2.php) , i have attached my doadopt2.php for you to use with everything fixed. Thanks again for this original mod, i would never have known where to start making something like this :) EDIT : oops, it seems i cant attach the file, so i uploaded it here :) http://www.speedyshare.com/files/19603746/doadopt2.rar |
RE: Item Shop - 100% Done (For Now)
Quote:
|
RE: Item Shop - 100% Done (For Now)
Sorry if I sound stupid but I've read through this topic a few times and it sounds like this mod is for adopting pets but the title says its an item shop mod. So which is it? I'm getting kinda confused or I'm missing something really obvious...
|
RE: Item Shop - 100% Done (For Now)
I really don't get it either - I wrote something totally like this on Sea's thread, and I don't know why he couldn't just expand on that. :/
|
RE: Item Shop - 100% Done (For Now)
Its a mod for adopting pets via a shop system using the cash mod by Sea.
|
RE: Item Shop - 100% Done (For Now)
However, I wrote something just like this on Sea's thread. :)
|
RE: Item Shop - 100% Done (For Now)
Quote:
|
RE: Item Shop - 100% Done (For Now)
Nope its not an item mod, its to place "items" (adoptables) into a shop page so they can be purchased with credits earned using the cash system created by Sea :)
|
RE: Item Shop - 100% Done (For Now)
I just found out that if someone was to replace the id in adopt.php?id=xx from the normal adoption page with an id of a shop adoptable, they will get it for free :(
|
RE: Item Shop - 100% Done (For Now)
Yeah they can, when I made my shop I changed adopt.php to also link to my buy.php (the page that checks your money and removes the amount owing) instead of doadopt.php and just set the prices of the normal adopts to 0. So they still all have to go through the buy.php page but you can still keep 'free' adoptables.
|
RE: Item Shop - 100% Done (For Now)
Quote:
I dont have a buy.php :s |
RE: Item Shop - 100% Done (For Now)
ETA: After now looking at this mod, I think it's set up differently from mine so what I've put below might not apply.
Ok this is how I set mine up, I have a shop.php which is the same as adopt.php (at the time I had free adoptables and shop adoptables which is why I made them separate, the free adoptables showed up on adopt.php and the ones that cost money showed up on the shop.php). adopt.php uses doadopt.php to put the pets into the owned adoptables table in the database. I made a copy of doadopt.php and called it buy.php, and edited shop.php so that instead of going to doadopt when adopting, it goes to buy.php instead. My buy.php page is coded to check that the user has enough money, if they don't they get told they don't have enough to buy the pet. If they do have enough, the price of the pet gets deducted from their total and the pet goes into their owned adoptables in the database. Since promo.php still uses adopt.php and doadopt.php, I left it there as normal, but it didn't take long to realize that people could use adopt.php to get free adoptables, so I altered adopt.php to also link to buy.php (basically removing the need for doadopt.php altogether) because now even the free adoptables will still have to go through the process of the money check (which will of course go through because they are set at 0 currency anyway). So even if someone was to use a shop pet id with adopt.php, they will still get charged for it because it's going through the same system. Of course, this can all be simplified down to just editing doadopt.php to do what buy.php does, but at the time I wanted to keep my doadopt.php unchanged. And I have simplified it a little by charging currency for all the adoptables, none are free. So they all show up on the same page now anyway. I'm not entirely sure how you have yours set up, but as long as you make sure any adoptions have to go through the money check and money deduction process, no one can get shop adoptables for free. |
RE: Item Shop - 100% Done (For Now)
I currently have my shop.php directed to use a file called doadopt2.php which i modified myself to add the money checking/deduction process, but that is on shop.php , if a member just does it using the normal adopt.php then they can still get it for free.
|
RE: Item Shop - 100% Done (For Now)
I just looked through your code - how do you have it so if the cash goes under 0, the adoption doesn't work? Some of my members are at -50 coins and stuff, and even though I'm using a different code, it would be greatly appreciated. :)[hr]
Sorry, I got that worked out now. It was a missing '=' in a statement. To think that I spent half an hour tearing my hair out over that... |
RE: Item Shop - 100% Done (For Now)
Quote:
Your doadopt2.php is the same as my buy.php - If you edit your adopt.php to use doadopt2.php, it won't matter if people try to use adopt.php to get free adoptables, they won't be able to, because it will still go through the deduction process and deduct the set cost of the adoptable they are trying to get. In adopt.php find PHP Code:
|
RE: Item Shop - 100% Done (For Now)
Why don't you just make it so all adoptables have prices, even if they are 0? That way you don't need any doadopt2's or the like.
|
RE: Item Shop - 100% Done (For Now)
Quote:
|
RE: Item Shop - 100% Done (For Now)
Quote:
This is what i ended up doing, but i have to manually change the shop value in myphpadmin to 2 so i can still keep the regular adoptable separate from the shop ones and on different pages. Thanks for the help :)[hr] pokemontrainergigi, Here is my doadopt2.php if you still need it :) http://www.mediafire.com/?5i1qiyvy0mo |
RE: Item Shop - 100% Done (For Now)
Quote:
|
RE: Item Shop - 100% Done (For Now)
I think the link is broken... Is there any way to get this still?
|
RE: Item Shop - 100% Done (For Now)
also cant seem to get the shop.php -- and not sure where the buy.php comes in, but can anyone attach those files again?
And the doadopt2 one? thanks!! I have this partially done, but can't finish w/o the shop file ! |
RE: Item Shop - 100% Done (For Now)
the attachment is not working...
|
RE: Item Shop - 100% Done (For Now)
It.. like all attachments was lost in the server transfer.
|
RE: Item Shop - 100% Done (For Now)
So can it be fixed?
|
RE: Item Shop - 100% Done (For Now)
shop.php has to be re-uploaded again--- as far as I can tell, that's the one that has to be attached again.
I have the other coding done for the currency. Might need that doadopt one too .. not sure, going to re read. |
RE: Item Shop - 100% Done (For Now)
Yes, please hear out voices.
|
RE: Item Shop - 100% Done (For Now)
Quote:
I'm sure they will re attach all we need soon :D I know everyone here has commitments to other things, and they are going to do it as soon as they have the chance. At least it wasn't a huge amount of files, I think there are only like 5 or 6 to be re attached. |
RE: Item Shop - 100% Done (For Now)
Quote:
Install Has Been Simplitfied Also |
All times are GMT -5. The time now is 01:58 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.