Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SOAP API - Product not exists
 
coops1979
Jr. Member
 
Total Posts:  5
Joined:  2010-06-03
 

I’m a .NET programmer and I’m trying to upload products and their images to magento via the API

I’ve tried this but all I get is “Product not exists” in the shop service call, am I supposed to use the SKU or the product ID in the product parameter of the catalogProductAttributeMediaCreate call?

Thanks for any help

Dim imageStream = New MemoryStream()
                    
prodImage System.Drawing.Image.FromStream(webRequest.GetResponse.GetResponseStream)
                    
prodImage.Save(imageStreamImaging.ImageFormat.Jpeg)

                    
Dim encbuff imageStream.ToArray()
                    
Dim strenc Convert.ToBase64String(encbuff)

                    
Dim imageEntity = New catalogProductImageFileEntity()
                    
imageEntity.content strenc
                    imageEntity
.mime "image/jpeg"
                    
imageStream.Close()

                    
Dim entityP = New catalogProductAttributeMediaCreateEntity()
                    
entityP.file imageEntity
                    entityP
.types = New String() {"image""small_image""thumbnail"}
                    entityP
.position "0"
                    
entityP.exclude "0"

                    
shopService.catalogProductAttributeMediaCreate(sessionidskuentityP"default"String.Empty)
 
Magento Community Magento Community
Magento Community
Magento Community
 
jdgrant
Jr. Member
 
Total Posts:  2
Joined:  2010-06-10
 

Holly cow, I am having the same struggles right now.  Please let me know if find anything.

 
Magento Community Magento Community
Magento Community
Magento Community
 
coops1979
Jr. Member
 
Total Posts:  5
Joined:  2010-06-03
 

Glad to know I’m not alone! I’ve tried the product SKU, the product name and the product id and I get the same error message.

I might need to upload the images in bulk and set the image URL as I create the products, does anyone know if this will work?

 
Magento Community Magento Community
Magento Community
Magento Community
 
coops1979
Jr. Member
 
Total Posts:  5
Joined:  2010-06-03
 

Are there any known bugs in the API, I don’t seem to be able to retrieve any product data, all I get is “Product not exists”

 
Magento Community Magento Community
Magento Community
Magento Community
 
hpiki
Jr. Member
 
Total Posts:  2
Joined:  2008-07-24
 

I have exactly the same problem. I have been trying to create mass product importer with C# and mostly everything else is going fine, except images. I have tried to use both product ID and SKU. There is no luck with any value. Other problem, product options I just managed by doing direct sql- workaround, which isn\’t finest piece of code I have made, but at least it works for now.

I would appreciate if someone have a solution, or at least some kind of clue what to do… or just an \’info\’ to wait next version, where it is fixed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
coops1979
Jr. Member
 
Total Posts:  5
Joined:  2010-06-03
 

After no reply’s on here I’m assuming its a bug with the product, as a work around I’ve uploaded all of my product images to the web site and then imported the products again using a CSV file.

Thank fully this has worked with all of my products

 
Magento Community Magento Community
Magento Community
Magento Community
 
hpiki
Jr. Member
 
Total Posts:  2
Joined:  2008-07-24
 

I used alternative option. Instead of using v2 API, I used old one with PHP for inserting images in. That worked perfectly, if we don’t count that I wasn’t able to do this with one language and with one client machine instead of two with lots of extra work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
henry\'s
Jr. Member
 
Total Posts:  1
Joined:  2010-10-05
 

I was having the same issue, but i worked out what was wrong.

In your last line of code:

shopService.catalogProductAttributeMediaCreate(sessionidskuentityP\"default\"String.Empty)

You need to change it to:

shopService.catalogProductAttributeMediaCreate(sessionidskuentityP\"default\"nothing)

string.empty <> nothing and so by logical deduction it it trying to find the last product you tell it which is string.empty.

This is where the error 101 \"Product not exists\” comes from.

 
Magento Community Magento Community
Magento Community
Magento Community
 
StoreYa
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2011-08-22
 

You are not alone, this is indeed a bug, and this is our solution.

Since the ame API function ("product.info" in this case) receive as a parameter both SKU and ID, there is a problem if your are looking for SKU’s which is numeric values.

To avoid this problem, we always adding space to the end of SKU before sending it to the API. For example, if your SKU is “123456” you should send “123456 “ to the API.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ianneub
Jr. Member
 
Total Posts:  1
Joined:  2011-07-21
 
StoreYa - 29 January 2012 11:26 PM

You are not alone, this is indeed a bug, and this is our solution.

Since the ame API function ("product.info" in this case) receive as a parameter both SKU and ID, there is a problem if your are looking for SKU’s which is numeric values.

To avoid this problem, we always adding space to the end of SKU before sending it to the API. For example, if your SKU is “123456” you should send “123456 “ to the API.

This fixed it for me too! Thank you!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top