apache+mysql+php
1、首先打开app\code\core\Mage\Catalog\etc\wsdl.xml 然后新增下面的代码,记得对应的标签 message
2、打开app\code\core\Mage\Catalog\etc\api.xml 文件新增加一个info()方法对应地方添加找到groupAdd标签,在这个标签结束下面添加
3、打开app\code\core\Mage\Catalog\Model\Product\Attribute\Set\Api.php增加info()方法 public function info($attributeSetId){ $groups = Mage::getModel('eav/entity_attribute_group') ->getResourceCollection() ->setAttributeSetFilter($attributeSetId) ->setSortOrder() ->load(); $groupCodes = array(); foreach ($groups as $group) { $attributegroupCode = array(); $attributegroupCode['attribute_group_id']=$group->getAttributeGroupId(); $attributegroupCode['attribute_group_name']=$group->getAttributeGroupName(); $groupCodes[]=$attributegroupCode; } return $groupCodes; }
4、api接口调用login('apiuser', 'apikey'); // TODO : change login and pwd if necessary //$result = $proxy->catalogProductAttributeSetGroupAdd($sessionId, '9', 'new_group'); $result = $proxy->catalogProductAttributeSetInfo($sessionId,'4'); var_dump($result); //////v1 soap api /* $client = new SoapClient('http://www.utoly.com//index.php/api/soap/?wsdl'); $session = $client->login('apiuser', 'apikey'); $result = $client->call($session, 'product_attribute_set.info', '4'); var_dump($result);*/ ?>