Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-25-2014, 10:09 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,538
Abronsyth is on a distinguished road
Default Alter Shop Table?

Just trying to make things less cluttered in general. I did something similar for my adoption page, but this is confusing me quite a bit.

I am trying to remove the columns "Category" "type" and "name" from the shop page. I am using Mys 1.3.3 and this is the shop file:
PHP Code:
<?php

class ShopController extends AppController{

    const 
PARAM "shop";
    private 
$view;
    private 
$subController;

    public function 
__construct(){
        
parent::__construct("member");    
        
$mysidia Registry::get("mysidia");        
        
$mysidia->user->getstatus();
        if(
$mysidia->user->status->canshop == "no"){
            throw new 
NoPermissionException($mysidia->lang->denied);
        }
        if(
$mysidia->input->action() != "index" and !$mysidia->input->get("shop")){
            throw new 
InvalidIDException($mysidia->lang->global_id);
        }
    }
    
    public function 
index(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        
$document->setTitle($mysidia->lang->access);
        
        
$typeForm = new Form("shoptypes""shop""post");
        
$typeSelection = new DropdownList("shoptype");
        
$typeSelection->add(new Option("Itemshop""itemshop"));
        
$typeSelection->add(new Option("Adoptshop""adoptshop"));
        
$typeForm->add($typeSelection);
        
$typeForm->add(new Button("Go""submit""submit"));
        
$document->add($typeForm);
 
        
$shoplist = new Shoplist($mysidia->input->post("shoptype"));
        
$shoplist->display();
    }
    
    public function 
browse(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();                    
        
$document->setTitle($mysidia->lang->welcome);
        
        
$shoptype $mysidia->db->select("shops", array("shoptype"), "shopname = '{$mysidia->input->get("shop")}'")->fetchColumn();
        
$shoplist = new Shoplist($shoptype);
        
$shop $shoplist->createshop($mysidia->input->get("shop"));
        
$shop->display();
    }
    
    public function 
purchase(){
        
$mysidia Registry::get("mysidia");
        
$document $mysidia->frame->getDocument();
        if(!
$mysidia->input->post("buy")) throw new InvalidIDException($mysidia->lang->global_id);
        
        if(
$mysidia->input->post("shoptype") == "itemshop"){
            
$shop = new Itemshop($mysidia->input->get("shop"));
            
$item $shop->getitem($mysidia->input->post("itemname"));
            
$item->assign($mysidia->user->username);
            
$oldquantity $item->getoldquantity();
            
$newquantity $oldquantity $mysidia->input->post("quantity");
            
            if(!
is_numeric($mysidia->input->post("quantity"))){
                throw new 
InvalidActionException($mysidia->lang->invalid_quantity);
            }
            elseif(
$newquantity $item->cap){
                throw new 
InvalidActionException($mysidia->lang->full_quantity); 
            }
            else{
                
$shop->purchase($item);
                
$document->setTitle($mysidia->lang->global_transaction_complete);
                
$document->addLangvar("{$mysidia->lang->purchase_item}{$item->getcost($shop->salestax)} {$mysidia->settings->cost}");
            }
        }
        elseif(
$mysidia->input->post("shoptype") == "adoptshop"){
            
$shop = new Adoptshop($mysidia->input->get("shop"));
            
$adopt $shop->getadopt($mysidia->input->post("adopttype"));
            
$adopt->assign($mysidia->user->username);
            
            
$shop->purchase($adopt);
               
$document->setTitle($mysidia->lang->global_transaction_complete);
            
$document->addLangvar("{$mysidia->lang->purchase_adopt}{$adopt->getcost($shop->salestax)} {$mysidia->settings->cost}");      
        }
        else throw new 
InvalidActionException($mysidia->lang->global_action);
    }
}
?>
I just can't seem to find the place I would edit to remove these three columns?

Thanks for any help,
Abron
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone Know How to Fix a Table Hwona Questions and Supports 0 07-28-2014 10:31 AM
Editing adopt table SilverDragonTears Questions and Supports 1 05-26-2013 08:19 PM
Admin Cp (Table) Alaric Questions and Supports 14 04-24-2012 06:23 AM
A 2-column table? Quillink Suggestions and Feature Requests 8 09-23-2010 02:26 PM
Table Prefix fadillzzz Questions and Supports 5 01-21-2010 11:17 AM


All times are GMT -5. The time now is 02:00 PM.

Currently Active Users: 9820 (0 members and 9820 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636