Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Adding in Adopt Shop (http://www.mysidiaadoptables.com/forum/showthread.php?t=3916)

SilverDragonTears 12-12-2012 04:17 PM

Adding in Adopt Shop
 
Help HoF :D

Hall of Famer 12-12-2012 05:06 PM

Well first of all have you reverted all the way back to your old Mys v1.3.1 code? If so, import the files class_adoptshop.php from Mys v1.3.2, and make a few edits. I will show you how to do that. In your shop.php, you will need to add some new code too to enable adoptables shop.

SilverDragonTears 12-12-2012 05:23 PM

Yes I'm ready to make the edits to class_adoptshop. Do I use the new shop.php or the old one?

Hall of Famer 12-12-2012 05:51 PM

You can use the old one, just need to add about one or two more elseif statement, since the adoptshop will show up on the same page as itemshop. I rename it as market place in Mys v1.3.2, since its not basically only itemshop now.

SilverDragonTears 12-12-2012 05:59 PM

Ok ready then.

Hall of Famer 12-12-2012 06:04 PM

Alright, good luck on that. Like I pointed out in the Official release thread, you need to replace certain variables in Mys v1.3.2 by their equivalent forms in Mys v1.3.1. It shouldnt be hard to accomplish, just a bit tricky if you ask me. Lemme know if you encounter any issues or still dont know what you are supposed to do.

SilverDragonTears 12-12-2012 06:07 PM

I still don't know, lol. I was thinking you were going to tell me what to replace with what. Hahahaha

Hall of Famer 12-12-2012 06:11 PM

I thought I showed you how to replace variables to be Mys v1.3.1 compatible here:
http://www.mysidiaadoptables.com/for...2&postcount=65

Please give a try and see how far you can go. If you are still struggling to get this right, just post the adoptshop class file and I will show it to you.

SilverDragonTears 12-12-2012 06:14 PM

What is this??
Code:

$mysidia = Registry::find("mysidia");

Hall of Famer 12-12-2012 06:15 PM

Well this is a mysidia object stored in Registry, which means it can be retrieved and used anywhere so long as you have access to Registry. You dont need that line, just get rid of it and you will be fine.

SilverDragonTears 12-12-2012 06:30 PM

Alright, what are the shop.php edits so I can test it when I'm done?

Hall of Famer 12-12-2012 06:42 PM

Umm it seems to me that you need to overhaul the entire shop.php page. Can you notice the differences between the two versions of shop.php from Mys v1.3.1 and v1.3.2? In Mys v1.3.2, the script checks not only if a shopname is given, but also the shoptype. You need to find a way to set up if...else statement for the shoptype, otherwise you only get itemshop.

SilverDragonTears 12-12-2012 06:48 PM

Good grief. I can't do all this stuff :(

Hall of Famer 12-12-2012 07:44 PM

I am sure you are good enough to figure these out. Are you getting some specific error messages? o_o

SilverDragonTears 12-12-2012 08:19 PM

No I just don't know how to edit it.

Hall of Famer 12-12-2012 09:05 PM

Well you just need to replace some variables native to Mys v1.3.2 by their counterparts in Mys v1.3.1. But of course, with adoptshop you need to add some new if..else statement. Can be tricky, but you shouldnt have trouble with that. The logic should be something like this:

PHP Code:

if(user is not logged into the site){
    
// show error message, it's members only.
}
elseif(
user has not requested anything){
    
// show all available shops
}
elseif(
user has requested an itemshop){
    if(
user has requested an item to purchase){
       
// validate and complete transaction
    
}
    else{
       
// shows a list of items in itemshop
    
}
}
elseif(
user has requested an adoptshop){
    if(
user has requested an adoptable to buy){]
        
// validate and complete transaction
    
}
    else{
        
// shows a list of adoptables available
    
}
}
else{
    
// access denied for invalid actions



SilverDragonTears 12-12-2012 09:14 PM

I think it's just over my head at this point. Maybe I can find someone to help me at some point.

Hall of Famer 12-12-2012 10:51 PM

I will help you with that if I have time, right now I am busy working on the GUI project for Mys v1.3.3, which will take some time.


All times are GMT -5. The time now is 11:24 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.