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

Magento API condition
 
MuschPusch
Member
 
Total Posts:  44
Joined:  2008-04-24
 

Hi,

The api function catalog_product.info requests a SKU or productId that’s kind of crappy when you use numbers as SKU’s. It would be nice if you could define at the function call if you use one or the other…

thanks
volkan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chris Farley
Member
 
Total Posts:  43
Joined:  2008-03-09
 

Yes! The core API is kind of problematic in this regard. For example, I am running a script that tests for the existence of a specific product. The SKU of the product is ‘104’. There is no product in magento with a SKU of ‘104’, but there *is* a product with an ID of 104. So the API returns that product.

Yes, the workaround is to double-check the product info to see if the ‘sku’ is indeed ‘104’. But I second the notion that the current behavior is a little bit weird. I think most programmers that are looking for a ‘sku’ of ‘104’ would prefer not to get any result for a product with an id of ‘104’.

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