0

I want to get a list of all the products in my Magento stores. the problem is configurable and grouped products. i want to transfer products to another server with external framework, i want to get configurable and grouped products with their associated simple products as a field.

3
  • you should use some collection staff - then you can filter products collection in order to get what you need. Please prepare more information - where do you want to get it? Into to external file and then send it or just send it from the code? Commented Jun 22, 2016 at 15:00
  • @lord_of_strings in controller of my module i want to create a json text and send it to another server . Commented Jun 22, 2016 at 15:46
  • than maybe before putting data into json you should filter it as I said and then send it (it's REST Api I think) Commented Jun 23, 2016 at 9:31

1 Answer 1

0
$client = new SoapClient('https://www.yourstoreURL.com/api/v2_soap/?wsdl');


$session = $client->login('xml/soap username', 'xml/soap password');

$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'type',
            'value' => array('key' => 'in', 'value' => 'configurable')
        )
    )
);
$result = $client->catalogProductList($session, $complexFilter);
echo "<pre>";
print_r($result);
1
  • Code-only answers are advised against, please provide a small explanation along with your piece of code. Commented Apr 21, 2017 at 13:30

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.