View Single Post
  #4  
Old 10-17-2016, 06:46 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 576,522
Hall of Famer is on a distinguished road
Default

Well when you create an item for user inventory, the script will executes an INSERT SQL query, which you can find from file /admincp/inventory.php. Or alternatively, it runs an UPDATE query if the user already has this item. The code should be on these lines:

Code:
            if(is_object($inventory)){
                $newquantity = $inventory->quantity + $mysidia->input->post("quantity");  
                $mysidia->db->update("inventory", array("quantity" => $newquantity), "itemname='{$mysidia->input->post("itemname")}' and owner='{$mysidia->input->post("owner")}'");     
            }
            else{
                $item = $mysidia->db->select("items", array("id","category"), "itemname = '{$mysidia->input->post("itemname")}'")->fetchObject();    
                $mysidia->db->insert("inventory", array("iid" => NULL, "category" => $item->category, "itemname" => $mysidia->input->post("itemname"),
                                                        "owner" => $mysidia->input->post("owner"), "quantity" => $mysidia->input->post("quantity"), "status" => 'Available'));    
            }

So what you need to do is to write another SQL query that adds a private message to the recipient of the item, right below these lines.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote