开发者

Magento soap v2 error: Attribute "available_sort_by" is required

I'm trying to create category with magento soap v2 api call. I'm getting the error:

Attribute "available_sort_by" is required.

Code for calling the Api:

$category_data = array( "name" => "testcategory", "is_active" => "1", "include_in_menu" => "1","available_sort_by" => "","default_sort_by" => "");

$result = $client->catalogCategoryCreate($session,2,$category_da开发者_运维百科ta,1); echo $result;

I have tried also with "available_sort_by" => array("name", "price", ...)

Is this the right way for calling the v2 soap api.

Thanks for any advice.


The WSDL does define what data you need for your call and exposes it for you to look at if you put 'trace' on your API SOAP calls.

After your call, with trace on, you can get your last XML, but it will be tidied up by the SOAP to be shoehorned into what the WSDL thinks you need for that call. The data will be different to what you submitted and show fields you never knew were in existence - it kind of reveals the documentation that you wish you had to start with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜