This spark facilitates the access to all Magento Core API resources and methods. One library, one config file and that is it!
- PHP 5.1+
- CodeIgniter Reactor 2.0
- Magento installation
- PHP-SOAP
Open config file and enter:
- Magento WSDL URI, eg: http://demo.magentocommerce.com/api/soap?wsdl
- Magento API username and password
This spark automagically calls API methods from inside CodeIgniter code. So you don't need to worry about instantiating SOAP or anything.
A few examples below.
Want to update a product?
$this->load->spark('mage-api/0.0.1');
$update = array('name'=>'New Name');
var_dump( $this->mage_api->product_update( 'product_sku', $update ) );
How about getting a list (PHP array) of all customer groups?
var_dump( $this->mage_api->customer_group_list() );
The "magic" is that customer_group_list is translated to customer_group.list API call and so on with all the methods on the API.
- First release