Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#-Magento:按类别ID筛选产品_C#_Magento_Filter - Fatal编程技术网

C#-Magento:按类别ID筛选产品

C#-Magento:按类别ID筛选产品,c#,magento,filter,C#,Magento,Filter,我正在使用.net中的MagentoAPIv2,我试图从给定的类别ID中获取产品列表。我已经设置了一个复杂的过滤器。然而,我不知道我的社交能力应该有什么价值。(category_ID是一个字符串数组) 有人知道这个值应该是多少吗?下面是我的过滤器的代码片段 filters f = new filters(); f.complex_filter = new complexFilter[] { new complexFilter

我正在使用.net中的MagentoAPIv2,我试图从给定的类别ID中获取产品列表。我已经设置了一个复杂的过滤器。然而,我不知道我的社交能力应该有什么价值。(category_ID是一个字符串数组)

有人知道这个值应该是多少吗?下面是我的过滤器的代码片段

        filters f = new filters();
        f.complex_filter = new complexFilter[]
        {
            new complexFilter()
            {
                key = "category_ids",
                value = new associativeEntity
                {
                    key = "in",
                    value = " "
                }
            }
        };

        catalogProductEntity[] result;

        result = this.client.catalogProductList(this.sessionId, f, "default");

了解如何在不使用复杂过滤器的情况下执行此操作。(并且仍然在服务器端进行过滤)

有一个方法称为:CatalogCategoryAsignedProducts(字符串会话id,int类别id)

此方法返回给定类别id的产品数组。
返回的数组的类型为:catalogAssignedProduct

但是我的答案仍然无法获取产品名称。这需要我向服务器发出额外的请求,这不是我想要的。所以问题仍然存在,复杂过滤器中的值应该是什么?您是否找到了传递类别列表的方法?我尝试使用逗号分隔的ID字符串(“1,2,3”),但这似乎不起作用。。