Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Version 3.0 aims to be a lightweight REST interface.  The feedback from version 2.0 was that it was too heavy of a framework.     The documentation for version 3.0 lives here.  Make sure to check out our GitHub page for checkout 3.0 located at httpat https://www.githubultracart.com/ultracartapi/

Info
titleTroubleshooting & Support

Troubleshooting and Support is provided to developers via our developer community forums on Github.com Join the conversion there.

...


Version 2.0

Version 2.0 is a complete overhaul of the structure of the checkout. The remote calls are the same. But version 2.0 no longer pollutes the global namespace. Version 2 is constructed using a module design pattern. This makes the ultraCart objet the only global object, and a singleton as well. Everything is accessed via the ultraCart variable. Also, the ultraCart object fires events which allow for easy page updates.

...

Here is a stripped down example showing the bare essentials of talking to UltraCart:

Code Block
language
languagejavascript
themeDJangojavascript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <script type='text/javascript' src='https://secure.ultracart.com/checkoutapi/jquery-1.4.2.min.js'></script>
  <script type='text/javascript' src='https://secure.ultracart.com/checkoutapi/jquery.json-2.2.min.js'></script>
  <script type='text/javascript' src='https://secure.ultracart.com/checkoutapi/checkoutapi-2.0.12.js'></script>

  <script type='text/javascript'>
    var merchantCartConfig =
    {
      merchantId: "DEMO",
      isCheckoutPage: true,
      remoteApiUrl:  location.protocol + "//" + location.hostname + "/proxy.php",
      debugMode: true,
      verboseAjax: true,
      listeners:{
        "cartready":[updatePage]
      }
    };

    function updatePage() {
      var cart = ultraCart.getCart();
      jQuery('#sessionId').html(cart.cartId);
      jQuery('#itemCount').html(cart.items.length);
    }

    jQuery(document).ready(function() {
      ultraCart.init(merchantCartConfig);
    });

  </script>
</head>
<body>
Hello. Your shopping cart session id is: <span id='sessionId'></span>.<br/>
You have <span id='itemCount'></span> item(s) in your cart.<br/>
<br/>
Since debugMode and verboseMode is set, you should open your browsers console (firebug, etc) and check out the
debugging.

</body>
</html>

...


Prerequisite skills for using the API
Support
Setting up the API on your page

...