Getting started with Snipcart is child's play! It will take a couple of minutes and, by the end of this tutorial, you’ll be all set.
First of all, you will need a Snipcart account. To register, go to https://app.snipcart.com/register
- Include the Snipcart JS/CSS files
Note that Snipcart v1.0 uses jQuery, so make sure you have it included in your page.
- Define your products
Now that you have included the files, you simply need to define the products on your website. A product is described using a simple HTML syntax.
<a href="#" class="snipcart-add-item" data-item-id="2" data-item-name="Bacon" data-item-price="3.00" data-item-weight="20" data-item-url="http://myapp.com/products/bacon" data-item-description="Some fresh bacon"> Buy bacon </a>
Important notice: For users with a single-page website, the data-item-url field should be filled with only your basic domain name, such as www.example.com, or with a simple slash bar /.
See Product Definition section for more information about the available properties. That’s it, you’re all set. Try it out!