Magento API属性is_active是必需的 [英] Magento API attribute is_active is required

查看:52
本文介绍了Magento API属性is_active是必需的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要添加一个新类别。我正在调用Magento Web服务并使用以下代码:

Hi,
I need to add a new category. I am calling the Magento Web services and using the below code:

Dim intCategory As Integer 
Dim mService As New MagentoService.MagentoService 
Dim sessionID = mService.login(\"Keyideas\", \"testing\") 
Dim cat As New MagentoService.catalogCategoryEntityCreate 
cat.name = General.Name 
cat.description = General.Description 
cat.meta_keywords = General.MetaKeywords 
cat.is_active = 1 
cat.meta_description = General.MetaDescription 
intCategory = mService.catalogCategoryCreate(sessionID, 3, cat, \"\") 
Return intCategory 





但是在运行时我收到错误,因为属性is_active是必需的



请建议我对我来说非常迫切

谢谢

Vikas



But at runtime I am getting the error as Attribute "is_active" is required

Please suggest me. Its very urgent for me
Thanks
Vikas

推荐答案

没人关心如何紧急情况。



如果您需要支持,请联系提供您所连接服务的人员。使用此服务的任何人都不太可能在这里看到你的问题。
Noone cares how urgent it is.

If you want support for it, contact the people who supply the service you're connecting to. It is VERY unlikely anyone who has used this service is going to see your question around here.


'你需要使用is_activeSpecified = true并包含菜单

'改变你的代码,如下所示,将完美地工作


'you nee to use is_activeSpecified = true and include menu
'change your code like the following and will work perfectly

Dim intCategory As Integer 
Dim mService As New MagentoService.MagentoService 
Dim sessionID = mService.login(\"Keyideas\", \"testing\") 
Dim cat As New MagentoService.catalogCategoryEntityCreate 
cat.name = General.Name 
cat.description = General.Description 
cat.meta_keywords = General.MetaKeywords 
cat.is_active = 1 
cat.meta_description = General.MetaDescription
cat.is_activeSpecified = True
cat.include_in_menu = 1
cat.include_in_menuSpecified = True
intCategory = mService.catalogCategoryCreate(sessionID, 3, cat, \"\") 
Return intCategory 


这篇关于Magento API属性is_active是必需的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆