Now, if you followed Abronsyth's adopt shop with conditions, you should have a unique 'shop'.php and 'shop'view.php.
Open the 'shop'.php (whatever you decided to name it)
Find this:
PHP Code:
$cost = $mysidia->db->select("adoptables", array("cost"), "type='{$adopt->getType()}'")->fetchColumn();
$moneyleft = $mysidia->user->money - $cost;
if($moneyleft >= 0){
$mysidia->user->changecash(-$cost);
And replace with:
PHP Code:
$premiumcost = $mysidia->db->select("adoptables", array("premiumcost"), "type='{$adopt->getType()}'")->fetchColumn();
$gemsleft = $mysidia->user->premiumcurrency - $premiumcost;
if($premiumcurrencyleft >= 0){
$mysidia->user->changegems(-$premiumcost);
Now for the last step, open up the 'shop'view.php
Find:
PHP Code:
$cost = new Comment("{$adopts[$i]->getCost()} Mythirian Gold");
$costCell = new TCell;
$costCell->add($cost);
$costCell->setAlign(new Align("right"));
$row->add($idCell);
$row->add($imageCell);
$row->add($typeCell);
$row->add($costCell);
$adoptTable->add($row);
}
And replace with:
PHP Code:
$premiumcost = new Comment("{$adopts[$i]->getPremiumCost()} Mythirian Gems");
$premiumcostCell = new TCell;
$premiumcostCell->add($premiumcost);
$premiumcostCell->setAlign(new Align("right"));
$row->add($idCell);
$row->add($imageCell);
$row->add($typeCell);
$row->add($premiumcostCell);
$adoptTable->add($row);
}
And there you have it! A second currency and adopts to buy with it. I'll try to implement an item one too eventually.