Setup/Initialization

evoShop(js) requires using jQuery, Prototype, or Mootools. No extra configuration is needed as long as one of them is included on the page

Quick Start

Add the script to your page and set your checkout method

<script src="evoShop.js"></script>
<script>
  evoShop({
    checkout: {
      type: "PayPal",
      email: "you@yours.com"
    }
  });
</script>

To sell items from your “Shelf”, just add some classes to your html like this:

<div class="evoShop_shelfItem">
  <h2 class="item_name"> Awesome T-shirt </h2>
<p>  <input type="text" value="1" class="item_Quantity"><br>
  <span class="item_price">$35.99</span><br>
  <a class="item_add" href="javascript:;"> Add to Cart </a></p>
</div>

Then just add classes where you want your totals to show or have your checkout buttons:

<span class="evoShop_quantity"></span> items - <span class="evoShop_total"></span>
<a href="javascript:;" class="evoShop_checkout">Checkout</a>

That’s it! See below for options you can set, and take a look at the checkout methods and different customizations available.

You can set/change evoShop options at any time:

evoShop({
	option1: "value" ,
	option2: "value2" 
});

Here are the possible options and their default values:

evoShop({
	// array representing the format and columns of the cart,
	// see the cart columns documentation
	cartColumns: [
		{ attr: "name", label: "Name"},
		{ view: "currency", attr: "price", label: "Price"},
		{ view: "decrement", label: false},
		{ attr: "quantity", label: "Qty"},
		{ view: "increment", label: false},
		{ view: "currency", attr: "total", label: "SubTotal" },
		{ view: "remove", text: "Remove", label: false}
	],

	// "div" or "table" - builds the cart as a 
	// table or collection of divs
	cartStyle: "div", 

	// how evoShop should checkout, see the 
	// checkout reference for more info 
	checkout: { 
		type: "PayPal" , 
		email: "you@yours.com" 
	},

	// set the currency, see the currency 
	// reference for more info
	currency: "USD",

	// collection of arbitrary data you may want to store 
	// with the cart, such as customer info
	data: {},

	// set the cart langauge 
	// (may be used for checkout)
	language: "english-us",

	// array of item fields that will not be 
	// sent to checkout
	excludeFromCheckout: [],

	// custom function to add shipping cost
	shippingCustom: null,

	// flat rate shipping option
	shippingFlatRate: 0,

	// added shipping based on this value 
	// multiplied by the cart quantity
	shippingQuantityRate: 0,

	// added shipping based on this value 
	// multiplied by the cart subtotal
	shippingTotalRate: 0,

	// tax rate applied to cart subtotal
	taxRate: 0,

	// true if tax should be applied to shipping
	taxShipping: false,

	// event callbacks 
	beforeAdd		: null,
	afterAdd		: null,
	load			: null,
	beforeSave		: null,
	afterSave		: null,
	update			: null,
	ready			: null,
	checkoutSuccess	: null,
	checkoutFail	: null,
	beforeCheckout	: null,
    beforeRemove    : null,
	changeQuantity	: null
	
});