Thread: Mys 1.3.4 User Shops
View Single Post
  #4  
Old 12-30-2017, 07:43 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,630
Dinocanid is on a distinguished road
Default

Quote:
Originally Posted by Abronsyth View Post
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;
                } 
__________________

Last edited by Dinocanid; 12-30-2017 at 08:23 AM.
Reply With Quote