Trade status not changing

Forum
Last Post
Threads / Messages

Dinocanid

Member
Member
Joined
Aug 30, 2016
Messages
520
Points
18
Age
23
Location
Maryland, USA
Mysidian Dollar
43,334
For some reason, changing the trade status of any pet above level 1 or 0 doesn't seem to work. I haven't touched any code related to trades, but here's mine anyway:
PHP:
public function trade(){
		$mysidia = Registry::get("mysidia");		
		if($mysidia->input->get("confirm") == "confirm"){
			switch($this->adopt->getTradeStatus()){
		        case "fortrade":
			        $this->adopt->setTradeStatus("notfortrade", "update");
			        $message = $mysidia->lang->trade_disallow;
			        break;
			    case "notfortrade":
			        $this->adopt->setTradeStatus("fortrade", "update");
			        $message = $mysidia->lang->trade_allow;
	                break;
			    default:
			        throw new InvalidActionException("global_action");
		    }
		}
		else{
		    $message = "Are you sure you wish to change the trade status of this adoptable?
					    <center><b><a href='{$this->adopt->getAdoptID()}/confirm'>Yes I'd like to change its trade status</a></b><br /><br />
					    <b><a href='../../myadopts'>Nope I change my mind! Go back to the previous page.</a></b></center><br />";
		}
        $this->setField("aid", new Integer($this->adopt->getAdoptID()));
		$this->setField("image", $this->image);				
        $this->setField("message", new String($message));				
	}

PHP:
public function trade(){
		$mysidia = Registry::get("mysidia");
		$aid = $this->getField("aid")->getValue();		
		$image = $this->getField("image");	
        $message = $this->getField("message")->getValue();		
		$document = $this->document;
        $document->setTitle($this->lang->trade);
		$document->add($image);
		$document->addLangvar($message);
	}
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top