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

Problem using SOAP ‘product.list’ function
 
hmpierson
Sr. Member
 
Total Posts:  101
Joined:  2008-11-15
 

I’ve been having a fair amount of luck using SOAP for uploading products, images, etc.

I used the following code:

$proxy = new SoapClient('http://www.opwork.com/store-2/index.php/api/soap/index/wsdl/1');
$sessionId $proxy->login('apisuer''apikey');

$storenum $proxy->call($sessionId'product.currentStore','storeview2');
echo 
"Current store = $storenum <br />";

$filters = array('sku' => array('like'=>'BF%'));

$products $proxy->call($sessionId'product.list',array($filters),$storenum);
var_dump($products);

The current store is correctly being changed from the default (which has all 44 products).

I also replaced $storenum with ‘storeview2’ in the next to the last line. Regardless, 44 products were returned, where there should only have been one:

Does this fail to filter on the storeID, or am I missing something?

Image Attachments
soap.PNG
 
Magento Community Magento Community
Magento Community
Magento Community
 
hmpierson
Sr. Member
 
Total Posts:  101
Joined:  2008-11-15
 

FWIW,

$proxy->call($sessionId, ‘product.getSpecialPrice’, ‘BFR01395’,’storeview2’);

doesn’t work (retrieves “SpecialPrice” from the default store)

$proxy->call($sessionId, ‘product.setSpecialPrice’, ‘BFR01395’,6.0,NULL,NULL,’storeview2’);

doesn’t work (does nothing to specialprice in either store).

But:

$proxy->call($sessionId, ‘product.update’, array(’BFR01395’, array(’special_price’ => 6.0), ‘storeview2’));

does change the special price to $6.00 in storeview2, and leaves the special price unchanged in the default store.

Any ideas for retrieving “SpecialPrice” from stores other than the default?

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