====== Creating a Fully Custom Cart using JSON and the BuildFoxyCart() Function ====== Foxy Cart implements the JSONP protocol which is a way to allow remote sites to provide your site with JSON data (data in javascript format). If you want to create a custom cart you can access JSONP and manipulate it in any way. So, in this tutorial we are going to create a very fancy cart using the FoxyCart JSONP API. This is the screenshot of the completed cart: {{:docs:jsonp:cart_shot.png|}} In order to have this cart, you need to download the cart icon {{:docs:jsonp:cart.jpg|}}, place it in your base http server directory in a folder called images and name the file as cart.jpg. Next, you need to add these lines in the head section of your html page, just after your foxy cart includes. Also, remember to replace "example.foxycart.com" with your own store subdomain provided by foxy cart . The above code shows the cart when you move the mouse over an specific link. So, you can put the following link anywhere in your html to show the cart: Your Cart Now we need to place the cart definitions and styles. Copy these style definitions somewhere inside the body tag of your your html file. If you understand CSS here is where you can customize the cart. And now, let's create the cart itself. Remember that this code is going to place the cart in the same horizontal position you put the above html but the vertical position of the cart is going to be the top of the page. Again, remember to replace "example.foxycart.com" with your own store subdomain provided by foxy cart.
your cart

Your Cart

item qty price
Edit Cart Check Out
And, that's it now you should have a fancy cart in your website thanks to the Foxy Cart JSONP API. If you need more information about the JSON data provided by Foxy Cart take a look at [[..:json]]