Magento:从属性集中检索组列表

时间:2015-03-09 21:43:44

标签: magento

我需要检索某个属性Set的所有组的列表,由ID或名称给出,例如通过API。

为此,我在这里检查了API(http://www.magentocommerce.com/api/soap/catalog/catalogProductAttributeSet/productAttributeSet.html),但似乎没有办法列出组,只能创建,更新和删除。

如何获取某个群组的ID?

感谢。

1 个答案:

答案 0 :(得分:-1)

MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.catalogProductAttributeGroupRepositoryV1PortTypeClient mage_client= AttributeGroup;

        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.CatalogProductAttributeGroupRepositoryV1GetListRequest nn = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.CatalogProductAttributeGroupRepositoryV1GetListRequest();

        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkFilter filter = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkFilter();
        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkFilter[] filters = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkFilter[1];
        filter.field = "attribute_set_id";
        filter.value = "31";
        filter.conditionType = "eq";
        filters[0] = filter;
        //MNC_Product_Sync.MagentoService.FrameworkFilter filter1 = new MNC_Product_Sync.MagentoService.FrameworkFilter();                
        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchFilterGroup fg = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchFilterGroup();
        fg.filters = filters;
        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchFilterGroup[] fgg = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchFilterGroup[1];
        fgg[0] = fg;
        MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchCriteriaInterface search = new MNC_Product_Sync.catalogProductAttributeGroupRepositoryV1Service.FrameworkSearchCriteriaInterface();
        search.filterGroups = fgg;
        search.pageSize = 100;      
        nn.searchCriteria = search;

        try
        {
            var response = mage_client.catalogProductAttributeGroupRepositoryV1GetList(nn);
}