<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -97,28 +97,45 @@ module AmazonAssociate
     # Item.ASIN.Quantity defaults to 1, unless otherwise specified in _opts_
   
     # Creates remote shopping cart containing _asin_
-    def self.cart_create(asin, opts = {})
+    def self.cart_create(items, opts = {})
       opts = self.options.merge(opts) if self.options
       opts[:operation] = &quot;CartCreate&quot;
-      opts[&quot;Item.#{asin}.Quantity&quot;] = opts[:quantity] || 1
-      opts[&quot;Item.#{asin}.ASIN&quot;] = asin
+      
+      if items.is_a?(String)
+        opts[&quot;Item.#{asin}.Quantity&quot;] = opts[:quantity] || 1
+        opts[&quot;Item.#{asin}.ASIN&quot;] = asin
+      else
+        items.each do |item|
+          item[:offer_listing_id].blank? ? opts[&quot;Item.#{item[:asin]}.ASIN&quot;] = item[:asin] : opts[&quot;Item.#{item[:asin]}.OfferListingId&quot;] = item[:offer_listing_id]
+          opts[&quot;Item.#{item[:asin]}.Quantity&quot;] = item[:quantity] || 1
+        end
+      end
   
       self.send_request(opts)
     end
   
-    # Adds item to remote shopping cart
-    def self.cart_add(asin, cart_id, hmac, opts = {})
+    # Adds items to remote shopping cart
+    def self.cart_add(items, cart_id, hmac, opts = {})
       opts = self.options.merge(opts) if self.options
       opts[:operation] = &quot;CartAdd&quot;
-      opts[&quot;Item.#{asin}.Quantity&quot;] = opts[:quantity] || 1
-      opts[&quot;Item.#{asin}.ASIN&quot;] = asin
+      
+      if items.is_a?(String)
+        opts[&quot;Item.#{asin}.Quantity&quot;] = opts[:quantity] || 1
+        opts[&quot;Item.#{asin}.ASIN&quot;] = asin
+      else
+        items.each do |item|
+          item[:offer_listing_id].blank? ? opts[&quot;Item.#{item[:asin]}.ASIN&quot;] = item[:asin] : opts[&quot;Item.#{item[:asin]}.OfferListingId&quot;] = item[:offer_listing_id]
+          opts[&quot;Item.#{item[:asin]}.Quantity&quot;] = item[:quantity] || 1
+        end
+      end
+      
       opts[:cart_id] = cart_id
       opts[:hMAC] = hmac
   
       self.send_request(opts)
     end
   
-    # Adds item to remote shopping cart
+    # Retrieve a remote shopping cart
     def self.cart_get(cart_id, hmac, opts = {})
       opts = self.options.merge(opts) if self.options
       opts[:operation] = &quot;CartGet&quot;</diff>
      <filename>lib/amazon_associate/request.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4bd3cd65d49d08a0607e4904f910669b51024d1c</id>
    </parent>
  </parents>
  <author>
    <name>Joey Schoblaska</name>
    <email>joey@zenwebapps.com</email>
  </author>
  <url>http://github.com/technicalpickles/amazon_associate/commit/ae0d93af7ed0ddda43c6c0f78db0b121dfc3ccf3</url>
  <id>ae0d93af7ed0ddda43c6c0f78db0b121dfc3ccf3</id>
  <committed-date>2009-01-09T14:54:36-08:00</committed-date>
  <authored-date>2008-12-20T09:09:00-08:00</authored-date>
  <message>added ability to pass multiple items to cart_create and cart_add operations, with option to use offer_listing_id instead of asin

Signed-off-by: Dan Pickett &lt;dpickett@enlightsolutions.com&gt;</message>
  <tree>203e01d0ba8ce11d009226ff75fe1a511bd08815</tree>
  <committer>
    <name>Dan Pickett</name>
    <email>dpickett@enlightsolutions.com</email>
  </committer>
</commit>
