2

We are trying to retreive product details for a specific SKU and for a specific store by using the Magento SOAP API with the product.list method.

We can retrieve product details but they are defaulting to the default store and not the store ID that we are trying to filter by.

Here is the code:

$filters = array (
  'sku' => array('eq' => 'ABC')
);

// Then we have tried both of the following which only show product information for the default store and not store ID 38

$products = $soap->call($session_id, 'product.list', $filters, '38');

$products = $soap->call($session_id, 'product.list', array($filters, '38');

Edit! - I've fixed it

$args = array(
    'productId' => '7745-XXL',
    'storeView' => 'pr_de_main_store'
);

$product = $soap->call( $session_id, 'catalog_product.info', $args);

Thanks!

Anthony

2

Here is my solution and it works:

$filters = array (
  'sku' => array('eq' => 'ABC')
);
$soap->call($session_id, 'product.list', array($filters, 'store_code'));
0

Try to use the store code, instead of the ID.

E.g. $products = $soap->call($session_id, 'product.list', $filters, 'my_store_de');

  • Hi, I've tried with the store code and it still returns the default store product details. :( $filters = array ( 'sku' => array('=' => '7745-XXL') ); $product = $soap->call( $session_id, 'product.list', array($filters), 'pr_de_main_store'); echo "<pre>"; print_r($product); // Gives me default store product details echo "</pre>"; – Anthony Jun 25 '14 at 10:17
-1
$args = array(
    'productId' => '7745-XXL',
    'storeView' => 'pr_de_main_store'
);

$product = $soap->call( $session_id, 'catalog_product.info', $args);
  • Not working, whereas the code from "Smile" works. – Alex Apr 28 '17 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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