Quote:
Originally Posted by Abronsyth
I'm about to go to bed so I am keeping this short- I'm having an issue when trying to edit my shop where it is not recognizing that my uid is the shop_manager id, so it's telling me I don't own the shop.
|
I think it's because I forgot to add these variables to the "else" statement in public function edit() of shopcpview.php:
PHP Code:
$manager_id = $shop->manager_id;
$uid = $mysidia->user->uid;
I re-uploaded the script in case that wasn't what was missing, but I think that's what I did.
EDIT: There's also a bug where premium currency would still subtract and proceed with giving you the pet, even if you don't have enough. Add this alongside the existing "money check" to fix it:
PHP Code:
$adopt_premium_price = $_REQUEST["adopt_premium_price"];
$premium_money_check = $mysidia->db->select("users", array("premiumcurrency"), "uid = '{$mysidia->user->uid}'")->fetchColumn();
elseif($premium_money_check < $adopt_premium_price){
$document->add(new Comment("<p>Whoops! You don't have enough premium currency to buy this pet!</p> <a href='/usershop/browse/{$shop_id}'>Continue shopping?</a>"));
return;
}