<?php
class Product_ProductCategoryController extends Ec_Controller_Action{

    public function preDispatch(){
        $this->tplDirectory = "product/views/package/";
        $this->serviceClass = new Service_ProductCategory();
        $userAuth = new Zend_Session_Namespace('userAuthorization');
        $this->warehouse_id = $userAuth->warehouseId;
    }

    /*获取包材
     * @author Gilbert
     * @date 2015-08-27
     */
    public function getCategoriesAction(){
        $categories = Service_ProductCategory::getByCondition(array(),array('E0'=>'pc_id','E1'=>'pc_name'));
        $return = array('state'=>1,'data'=>array());
        $return['data'] = $categories;
        die(json_encode($return));
    }

}