Getting Started with FoxyCart!

How to get your website's store set up to work with FoxyCart.

Add the FoxyCart javascript to your site

For a nice and quick FoxyCart implementation, insert the loader.js FoxyCart javascript file from “Step 1” of the sample code section of your FoxyCart admin right above the closing </body> tag of your webpage, after any other CSS or javascript tags you might have.

jQuery

FoxyCart relies on jQuery to function, and we recommend jQuery version 1.11.1 with FoxyCart version 2.0

If you don't need jQuery

If you don't have any scripts that require jQuery on your page, you can simply include loader.js on your page, and it will include the required version for you.

If you have other jQuery requirements

You may have other plugins or scripts that rely on jQuery as well. loader.js will check to see if your page already has jQuery loaded, and if that version is 1.8 or newer. If it doesn't exist, or it's too old, loader.js will include jQuery version 1.11.1 automatically, otherwise it will use your jQuery version. If you include your own version of jQuery, ensure it's 1.8 or newer, and that you include it before you include loader.js

Troubleshooting

If you've included loader.js on your page and the cart isn't sliding in on the page when you click an add to cart link, there may be a conflict on your page with jQuery.

  • Ensure that loader.js has been included on your page.
  • Ensure that if you're including jQuery, it's version 1.8 or newer, and that it's been included before loader.js on your page.
  • Also if you're including jQuery, ensure that there is only a single version of jQuery include. You can confirm that by:
    1. View your site as it is output in the browser. In other words, load the site itself, and not your templates.
    2. View the source.
    3. Do a “find” on the source for “jquery”. If you've included in yourself, you should see it included there. You may see it elsewhere also:
    4. If you see any files like validation.jquery.js, jquery.accordion.js, or anything similar, those are plugins and can remain.
    5. If you see any files like jquery.js, jquery.js?m=1273512554g&amp;ver=1.3.2, jquery-1.4.2.min.js, or anything similar, find out where those <script /> tags are being inserted, and remove them. Reload your page and view the source to ensure they're all gone.
    6. If you cannot remove calls to jquery.js, make sure you move your <!– BEGIN FOXYCART CODE –> block after any other jQuery calls, preferably right before the closing </head> tag.
  • If you need help, please ask in our forum.

Products are added to your customer's cart using “add to cart links” that you create. Create your FoxyCart links the same as you would create any HTML link (e.g.: <a href=“blah”>Link Text</a>) To make this a FoxyCart link you'll need to create a link with an href pointing to your FoxyCart domain: https://YOURSUBDOMAIN.foxycart.com/cart?name=ITEMNAME&price=YOURPRICE

In this example, YOURSUBDOMAIN is the value you entered as your store subdomain.

ITEMNAME is, of course, the name you would like the cart to display for your item.

<a href="https://YOURSUBDOMAIN.foxycart.com/cart?name=ITEMNAME&price=YOURPRICE">Add to Cart</a>

To have a link to view the customers cart, you can do that with a simple links as well:

<a href="https://YOURSUBDOMAIN.foxycart.com/cart?cart=view">View the Cart</a>

To display the total items or price of the customers cart, take a look at the minicart functionality.

Site Tools