Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.13 KB

README.md

File metadata and controls

40 lines (25 loc) · 1.13 KB

CodeIgniter Magento API Spark

This spark facilitates the access to all Magento Core API resources and methods. One library, one config file and that is it!

Requirements

  1. PHP 5.1+
  2. CodeIgniter Reactor 2.0
  3. Magento installation
  4. PHP-SOAP

Usage

Open config file and enter:

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.

Change Log

0.0.1

  • First release