Giter Club home page Giter Club logo

simplecart-js's Introduction

***************************************************************************************
*									simpleCart(js)									  
* ----------------------------------------------------------------------------------- 
*	Version 2.0																		  
*	The Wojo Group																	  
*	thewojogroup.com 																  
*	simplecartjs.com														  		  
*	http://github.com/thewojogroup/simplecart-js/tree/master						  
*	Released under MIT License														  
***************************************************************************************								
		
	No databases, no programming, no headaches. A simple javascript shopping 
	cart in under 17kb that you can setup in minutes. It's lightweight, fast, 
	simple to use, and completely customizable. All you need to know is basic HTML.
	
***************************************************************************************

	Copyright (c) 2009 The Wojo Group

	Permission is hereby granted, free of charge, to any person obtaining a copy
	of this software and associated documentation files (the "Software"), to deal
	in the Software without restriction, including without limitation the rights
	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	copies of the Software, and to permit persons to whom the Software is
	furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
	THE SOFTWARE.
		 
***************************************************************************************
*			QUICK START GUIDE														  
***************************************************************************************
		
	After downloading the files, simply place a copy of the simpleCart.js 
	in your site directory, and attach it to each page that will be using the cart:
	
	1.<script type="text/javascript" src="simpleCart.js"></script>

	PayPal is the default checkout option. So if you have a Paypal account, you 
	will need to set your account email:
	
	1.<script type="text/javascript">
	2.    simpleCart.email = "[email protected]";
	3.</script>
	
	
	----------------
	Items for Sale
	----------------

	To have an item for sale (like an awesome t-shirt), you can put it on your 
	"Shelf" like so:

	1.<div class="simpleCart_shelfItem">
	2.  <h2 class="item_name">Awesome T-Shirt</h2>
	3.  <span class="item_price">$35.95</span>
	4.  <input class="item_quantity" value="1" type="text">
	5.  <a href="javascript:;" class="item_add">Add to Cart</a>
	6.</div>

	To create a shelf item, you create a div with a class of “simpleCart_shelfItem”.
	Any field you want for your item can be set by creating a tag with a class 
	of “item_field-name” and the contents or value of the tag will be the value 
	added for the item. Please check out Shelf Setup for more info about the shelf.

	You can also add an item to the cart with a simple link:

	1.<a href="javascript:;" onclick="simpleCart.add( 'name=Awesome t-shirt' ,
	 			'price=35.95' , 'quantity=1' );">Add To Cart</a>
	
	
	---------------------------
	Cart Links and Cart Summary
	---------------------------

	If you want to display information about the cart anywhere on your page, simple 
	create any tag (div, span, a, h2, …etc) with a specific class name.

	For the total items in the cart, use “simpleCart_quantity”
	
	1.You have <span class="simpleCart_quantity"></span> items in your Cart.

	For the cart total, use “simpleCart_total”
	
	1.Cart total: <div class="simpleCart_total"></div>

	You can create a Checkout link or Empty Cart link by using "simpleCart_checkout" 
	and "simpleCart_empty"
	
	1.<a href="javascript:;" class="simpleCart_checkout">Checkout</a>
	2.<a href="javascript:;" class="simpleCart_empty">Empty</a>

	The checkout link will immediately send all the items to PayPal (or another 
	checkout option like Google Checkout) when you click it. These don't have to be 
	links, however, you can also use a div, images, or any other tag by simply 
	setting the class correctly.
	
	
	--------
	The Cart
	--------

	You can display the full cart on any page by simply creating a div with a class 
	of "simpleCart_items"
	
	1.<div class="simpleCart_items"></div>

	SimpleCart(js) will automatically populate the div with all the items in the 
	cart. You can change the appearance of your cart or what columns are in the cart 
	by checking out Cart Header Formatting.
		
		
***************************************************************************************
*	For more information, please go to simplecartjs.com								  
***************************************************************************************		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
				

simplecart-js's People

Contributors

cybershadow avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.