Adding the number of items in a cart, contents of a cart and other things about the cart to a remote website is an incredible way to tie your cart to your website for an immersive experience for the customer. Our embedded commerce tools allow this easily and can be customized greatly.
The easiest way to do this is to use our embed tools which generates the code to slap on your remote site. See below:
How it works
The code the embed tools create simply uses the AmeriCommerce online stores client API and the AC.cart object to get the current count of items as well as the subtotal in your cart.
As with any work with the Client API you will need to include the Client API script reference (if you don't already have it on the page)
Then place an html snippet similar to the following where you want the Cart display to show on your site.
<span class="CartItemsCount"></span> item(s) - <span class="CartSubTotal">$</span>
Then place the following script after the html.
//declared outside of the AC.cart scope
//set the response to oCart
oCart = response;
//set the count and subtotal to the values returned.
$(".CartItemsCount").html( oCart.cart.totalItemCount );
$(".CartSubTotal").html( "$" + oCart.cart.subtotal );