Now onto the class_stockadopt.php
Find:
PHP Code:
class StockAdopt{
// The StockItem class, which defines items currently in Itemshop and thus is not owned by any users
public $id = 0;
public $type;
public $class;
public $description;
public $eggimage;
public $whenisavail;
public $alternates;
public $altoutlevel;
public $altchance;
public $cost;
public $owner;
And again, add this beneath public cost:
PHP Code:
public $premiumcost
Then find:
PHP Code:
public function getcost($salestax = 0){
// Get the total cost of this stock item
$cost = $this->cost*(1+$salestax/100);
return $cost;
}
And add below:
PHP Code:
public function getpremiumcost{
// Get the total cost of this stock item
$premiumcost = $this->premiumcost;
return $premiumcost;
}
Now we'll jump into the AdminCP files. In there, find the adopt.php
Find this chunk:
PHP Code:
$mysidia->db->insert("adoptables", array("id" => NULL, "type" => $mysidia->input->post("type"), "class" => $mysidia->input->post("class"), "description" => $mysidia->input->post("description"), "eggimage" => $eggimage, "whenisavail" => $mysidia->input->post("cba"),
"alternates" => $mysidia->input->post("alternates"), "altoutlevel" => $mysidia->input->post("altoutlevel"), "altchance" => $mysidia->input->post("altchance"), "shop" => $mysidia->input->post("shop"), "cost" => $mysidia->input->post("cost"), "genderratio" => $mysidia->input->post("genderratio")));
and replace with:
PHP Code:
$mysidia->db->insert("adoptables", array("id" => NULL, "type" => $mysidia->input->post("type"), "class" => $mysidia->input->post("class"), "description" => $mysidia->input->post("description"), "eggimage" => $eggimage, "whenisavail" => $mysidia->input->post("cba"),
"alternates" => $mysidia->input->post("alternates"), "altoutlevel" => $mysidia->input->post("altoutlevel"), "altchance" => $mysidia->input->post("altchance"), "shop" => $mysidia->input->post("shop"), "cost" => $mysidia->input->post("cost"), "premiumcost" => $mysidia->input->post("premiumcost"), "genderratio" => $mysidia->input->post("genderratio")));
Then we'll jump into the view folder in the AdminCP file to adoptview.php
Find this:
PHP Code:
$shopSettings->add(new Comment("Price: ", FALSE));
$shopSettings->add(new TextField("cost", 0, 10));
And add beneath it:
PHP Code:
$shopSettings->add(new Comment("Premium Price: ", FALSE));
$shopSettings->add(new TextField("premiumcost", 0, 10));
Next post for the final step!