2

I'm having problems with using the SOAP API to get all the configured products with its simple products.

$productsList = $proxy->catalogProductInfo($sessionId, '40');

Returns a lot, but no associated products. There's about 2400 products in here, with over 300 of them configured. How to get all the configured products, with the associated products?

I've tried exploding the first part of the SKU, but as the client has named these awfully, there's no way this is going to work.

2 Answers 2

2
+50

There is no such core feature in Magento's API. But you can extend Magento's API in a quite simple way, there are tons of tutorials out there to do so. Inchoo is always a good resource http://inchoo.net/magento/extending-the-magento-api/
Another good resource is
http://www.bubblecode.net/en/2012/04/20/magento-api-associate-simple-products-to-configurable-or-grouped-product/
to get a clue how associating products works.

So in the end you need to end up writing your own items SOAP function.

If you need this only once, think about using SQL to get your needed data.

1
  • Thanks so much for your comment! Sadly, we can't access our clients site in any way apart from the API, so the API is going to have to do. :(
    – Mave
    Dec 17, 2014 at 16:25
1

There is no functionality for this provided by the Magento core API out of the box. If the SOAP functionality in the shop is not going to be extended, this requirement cannot be fulfilled.

Possible solutions:

Extend the API

The easiest would possibly be to extend the functionality of the catalogProductInfo method and add an attribute with the assigned products there.

Extend the Mage_Catalog_Model_Product_Api_V2 class and add the details to the info method. You will need to adapt <xsd:complexType name="catalogProductReturnEntity" /> of app/code/core/Mage/Catalog/etc/wsi.xml then to add your new attribute.

Get a extension

Use an extension like Netzkollektiv - Core API which improves configurable products handling.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.