Skip to content

Instantly share code, notes, and snippets.

@t10u
Created February 8, 2011 15:26
Show Gist options
  • Save t10u/816578 to your computer and use it in GitHub Desktop.
Save t10u/816578 to your computer and use it in GitHub Desktop.
<?php
require 'app/Mage.php';
Mage::app('admin')->setUseSessionInUrl(false);
try {
$client = new Zend_Soap_Client('http://local.magento/api/soap/?wsdl');
// login
$sessionId = $client->login('user', 'pass');
// get product info
$product = $client->call($sessionId, 'product.info', 'PRODUCT_SKU_OR_ID');
var_dump($product);
} catch (Exception $e) {
// log the error
Mage::log($e->getMessage(), Zend_Log::ERR);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment