Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby wrapper around the Magento Cart Api
Ruby
Branch: master

README.rdoc

Magento ===================

This is a simple gem which wraps Magento XMLRPC calls with Ruby classes. This allows for you to integrate your Magento Shopping Cart into your Rails Application. This is not fully tested and some functionality is a WIP.

The full Magento Core Api is available at www.magentocommerce.com/support/magento_core_api

The current supported resources are:

Category
Country
Customer
CustomerAddress
CustomerGroups
Inventory
Invoice
Order
Product
ProductImages
ProductTypes
Region
Shipment

Usage =====================

Edit config/config.yml and add your magento api username and api key to the file.

Get a single customer with an ID of 1

customer = Magento::Customer.find("1")

# all attributes are available now as array indexes

customer['firstname'] => "Tim"
customer['lastname'] => "Matheson"

# and so on

Issues ====================

A patch needs to be applied to XMLRPC for this to work. Without the patch you will most likely get this error. “wrong/unknown XML-RPC type 'nil'”

Locate the xmlrpc gem on your system.

Edit the config.rb file, find it in your system, locate the gem directory.

Around line 23

change to this

ENABLE_NIL_PARSER    = false

to this

ENABLE_NIL_PARSER    = true

This will prevent the parser from raising exceptions when nil nodes are returned.

Something went wrong with that request. Please try again.