文章标签 ‘ecshop’
2010二月6

ecshp soap接口示例

为其他网站推广调取本公司手机数据,提供的简单soap接口,如下: 服务端:server.php (注释部分请忽略) <?php define('IN_ECS', true); require_once '../../includes/init.php'; class getGoods{ // public $Authentication; //身份认证 public function init($key){ // if ($key==8750){ // $this->Authentication = 1; // }else { // $this->Authentication = 0; // } } public function getGoodsByC...[查看全部]

2010一月15

ecshop添加新的权限

        公司和51bi.com做cps的合作,接口测试后在自己网站上还要做一个cps的对账系统,现在把权限添加过程记录下来。 第一步:在admin_action表中添加两条数据:一个顶级权限分类(parent_id为0),和一个其下的子分类。 INSERT INTO efs_admin_action (`action_id`, `parent_id`, `action_code`) VALUES (105, 0, ’51bi’); INSERT INTO efs_admin_action (`action_id`, `parent_id`, `action_code`) VALUES (...[查看全部]

2009四月11

ecshop递归获取一个分类的根分类

function get_root_id($id){ $sql = ‘SELECT parent_id FROM’.$GLOBALS['ecs']->table(‘category’).”WHERE cat_id=’$id’”; $parent_id = $GLOBALS['db']->getOne($sql); if ($parent_id==0){ ?? $id = intval($id); ?? return $id; } else { ?? return get_root_id($parent_id); } } 传入要判断的分类的id,如果它本身是顶级[根]分类,则返回本身,反之递归直到得到所属...[查看全部]