Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-01-2017, 06:39 AM
Fox Fox is offline
Member
 
Join Date: Oct 2016
Location: Australia
Posts: 34
Gender: Female
Credits: 8,790
Fox is on a distinguished road
Default

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"010)); 
And add beneath it:
PHP Code:
$shopSettings->add(new Comment("Premium Price: "FALSE));
        
$shopSettings->add(new TextField("premiumcost"010)); 
Next post for the final step!
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:58 AM.

Currently Active Users: 3710 (0 members and 3710 guests)
Threads: 4,081, Posts: 32,043, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636