Click here to Skip to main content
16,021,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need to add a new category. I am calling the Magento Web services and using the below code:
VB
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 


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

Please suggest me. Its very urgent for me
Thanks
Vikas
Posted
Updated 26-Oct-10 2:14am
v2

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.
 
Share this answer
 
'you nee to use is_activeSpecified = true and include menu
'change your code like the following and will work perfectly

VB
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 
 
Share this answer
 
v2
Comments
Member 12461541 15-Apr-16 8:57am    
Perfect!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900