JavaScript Shopping Cart ecommerce PayPal

SoftXML
                  Programming Books
                Open Web Directory
           SoftXMLLib | SoftEcartJS
Contact Us












SoftXMLEcart(js) - easy, xml based ecommerce shopping cart written in JavaScript with built-in PayPal integration.

Sign up for PayPal and start accepting credit card payments instantly.

Advantages of using a SoftXMLEcart(js):

# It is designed to be small, fast, powerful, yet easy to install for even the most novice web designer. Within minutes of installing the cart, you can be selling your products online. All you need to get started is an active PayPal account, the rest applications will do for you.

# The application requires no third party software, all you need is a web browser.

# You do not need to have advanced web hosting that supports server-side programming languages, all that is necessary for the application to work is a client-side language JavaScript and HTML. You just copy the original application files to your server and access the home page in following manner: http://www.yoursite.com/ecartjs/shopcart.htm

Browsers supported:
FireFox [2.0,3.0] Opera [9.63, 9.64] Google Chrome 1.0.154.65 Internet Explorer [6,7] Safari 3.2.1 Netscape Navigator 9.0.0.6 K-Meleon 1.5.3 Maxthon 2.5.1.4751 UNICODE

SoftXMLEcart(js) configuration:

SoftXMLEcart(js) uses the XML file as a data source. "Data.xml" file located in root folder and can be configured to fit your needs:

1) To display the categories and products offered for sale.
2) To design look and feel of the shopping cart.

File structure - Data.xml

This file consist of categories and products, each category can have multiple products.

Setting up categories and products

<category id="1" name="XML Products">
category tag has two must have attributes and multiple product elements:
"id":      Unique Identifier, value of this attribute should be unique and not be repeated within category tags
"name": value of this attribute will be displayed as category name on your shopping cart

<product id="1" price="15.55" shippingcost="10.05">
product tag has three must have attributes and three must have child elements:
"id":      Unique Identifier, value of this attribute should be unique and not be repeated within product tags
"price": value of this attribute must be a decimal and will be used to calculate cost of this product
"shippingcost": value of this attribute must be a decimal and will be used to calculate shipping cost of this product

<product> tag must have following child elements:
<title>SoftXpath library</title> tag is used to display product name on your shopping cart
<description>some text about javascript library</description> tag is used to display product description on your shopping cart
<image link="http://www.softxml.com" width="181" height="181">images/1369401655_dotpeak_products1.gif</image> tag has three must have attributes
"link": URL to online resource used when user clicks product's image
"width": image width in pixels
"height": image height in pixels

Product's image should be placed in images folder of shopping cart

Designing look and feel of the shopping cart

<cart logo="images/softxmlogo.gif" category-font-family="arial" category-font-size="19px" category-color="#ff0000" product-title-font-family="arial" product-title-font-size="13px" product-title-color="#000000" product-price-font-family="arial" product-price-font-size="13px" product-price-color="#ff0000" product-description-font-family="arial" product-description-font-size="12px" product-description-color="#000000"> tag defines shopping cart logo,colors,fonts and etc..

Data.xml file

<?xml version="1.0" encoding="UTF-8"?>
<cart logo="images/softxmlogo.gif" category-font-family="arial" category-font-size="19px" category-color="#ff0000" product-title-font-family="arial" product-title-font-size="13px" product-title-color="#000000"   product-price-font-family="arial" product-price-font-size="13px" product-price-color="#ff0000"  product-description-font-family="arial"
      product-description-font-size="12px" product-description-color="#000000">
	<category id="1" name="Online Software Programs">
		<product id="1" price="30.00" shippingcost="0.00">
			<title>SoftXpath library</title>
			<description>some text about javascript library</description>
			<image link="" width="181" height="181">images/1369401655_dotpeak_products1.gif</image>
		</product>
		<product id="2" price="29.33" shippingcost="7.56">
			<title>SoftXML library</title>
			<description>some text about javascript library</description>
			<image link="" width="181" height="181">images/secrets.jpg</image>
		</product>
		<product id="3" price="21.33" shippingcost="4.44">
			<title>Bitor excel</title>
			<description>some text about bitor library</description>
			<image link="" width="181" height="181">images/Galaxias.png</image>
		</product>
		<product id="4" price="27.73" shippingcost="6.37">
			<title>FileZilla</title>
			<description>some text about bitor library</description>
			<image link="" width="181" height="181">images/email-product-box.jpg</image>
		</product>
	</category>
	<category id="2" name="Web Tutorials">
		<product id="5" price="41.23" shippingcost="10.00">
			<title>Python tutorials</title>
			<description>some text about javascript library</description>
			<image link="http://www.softxml.com" width="181" height="181">images/psa_wheel.jpg</image>
		</product>
		<product id="6" price="22.39" shippingcost="10.00">
			<title>JScript Tutorials</title>
			<description>some text about javascript library</description>
			<image link="" width="181" height="181">images/xsitepro2.jpg</image>
		</product>
		<product id="7" price="20.19" shippingcost="10.00">
			<title>ASP Tutorials</title>
			<description>some text about ASP library</description>
			<image link="" width="181" height="181">images/quicken-deluxe.jpg</image>
		</product>
		<product id="8" price="26.49" shippingcost="9.90">
			<title>JSP Tutorials</title>
			<description>some text about JSP library</description>
			<image link="" width="181" height="181">images/seo-website-builder-box.jpg</image>
		</product>
		<product id="9" price="26.49" shippingcost="9.90">
			<title>Python Tutorials</title>
			<description>some text about Python library</description>
			<image link="" width="181" height="181">images/instant-software-products.jpg</image>
		</product>
	</category>
	<category id="3" name="XML products">
		<product id="10" price="41.23" shippingcost="7.00">
			<title>XML databases</title>
			<description>some text about javascript library</description>
			<image link="" width="181" height="181">images/35029product-oscommerce-advanced-seo.jpg</image>
		</product>
		<product id="11" price="22.39" shippingcost="5.50">
			<title>XML DStructure</title>
			<description>some text about javascript library</description>
			<image link="" width="181" height="181">images/99100-TrafficBoosterPro-Marketing-SEO-Tool.jpg</image>
		</product>
		<product id="12" price="20.19" shippingcost="10.00">
			<title>XML querytoo</title>
			<description>some text about ASP library</description>
			<image link="" width="181" height="181">images/Frontware_SEO_tools_product.gif</image>
		</product>
		<product id="13" price="24.09" shippingcost="3.99">
			<title>XPATH queryedit</title>
			<description>some text about ASP library</description>
			<image link="" width="181" height="181">images/blocks_image_4_1.png</image>
		</product>
	</category>
</cart>
                                                

JavaScript Configuration

myCart = new SoftXMLCart();   //CREATE instance of shopping cart
myCart.currency="EUR"   //set currency of your shopping cart, see list of paypal currency codes
myCart.productsPerRow="4";   //number of products displayed on each row
myCart.productBGColor="#CCCCCC";   //set background color of product box
myCart.setDefaultCategoryID("2");   //set default category ID to be displayed
myCart.setPayPalEmail("info@softxml.com"); //set your paypal email for order process

Useful cart functions

myCart.js2xml();  //get content of the shopping cart in xml format
myCart.xml2json();  //get content of the shopping cart in json format

SoftXMLEcart(js) Demo Page

download SoftXMLEcart(js)
Use this form to send your feedback, bug alerts or questions related to using SoftXMLEcart(js).
If you have implemented SoftXMLEcart(js) in real world web applications, please let us know resource URL so we can include it on SoftXML.
*Email: *Your Message: