AJAX PayPal – shopping cart jQuery plugin

Easy to use jQuery plugin, allowing the developer to add a full function of shopping cart on the website.

Shopping cart jQuery plugin for our e-commerce projects

PayPal Website payment standard supported.

Ajax PayPal cart jQuery plugin
Ajax PayPal cart jQuery plugin

Highlighted features:

– In page AJAX cart, no window refresh

– Cart widget to display current cart status

– Shipping Page

– Support PayPal Website Payment Standard

– Support Localization (en, jp, en included)

– Support different currency (USD, YEN, HKD…)

– Custom payment gateway (support PHP, ASP.NET)

– Easy customization with CSS

– Full API support

Basic setup

<!-- CSS files -->
<link rel="stylesheet" type="text/css" href="lib/dc.core.1.0.0.min.css" />    
<link rel="stylesheet" type="text/css" href="lib/dc.cart.1.0.0.css" />

<!-- Script files -->
<script src="lib/dc.core.1.0.0.min.js" type="text/javascript"></script>
<script src="lib/dc.cart.1.0.0.min.js" type="text/javascript"></script>      
<script src="lib/dc.cart.lang.js" type="text/javascript"></script>

<script type="text/javascript">
    $(function(){
        // Create a basic cart
        var cart = $('#cart').DCAJAXPaypalCart({
            width:600,
            height:400,
            paypalOptions:{
                business:'YOU_PAYPAL_EMAIL@email.com'
            }
        });

        // Create a buy button from a link with id "buy_button_1"
        cart.addBuyButton("#buy_button_1",{
            id:'item_1',                        // Specify the unique id for this item
            name:'Dummy Item',                  // Item name appear on the cart
            thumbnail:'product_thumbnail.jpg',  // Thumbnail path of the item (Optional)
            price:10                            // Cost of the item
            shipping:5                          // Shipping cost for the item (Optional)
        });
    });
</script>    

Properties

// #cart is the elements id which you wan to place the cart widget
var cart = $('#cart').DCAJAXPaypalCart({
    width:600,      // Width of the cart
    height:400,     // Height of the cart
    currency:'USD', // The display currecy of the cart, support USD,YEN,HKD,GBP,AUD..etc (Optional)
    language:'en',  // The language of the cart. Included en, jp, de. (Optional)
    autoOpenWhenAdd:true,  // Enable auto open the cart window after a item added to cart (Optional)
    autoCleanCart:true, // Enable auto clean cart after checkout button click (Optional)
    openNewCheckOutWindow:false, // Indicate if the paypal checkout window is open in a new window (Optional)
    themeColor:'#0066cc',       // Color in the theme (Optional)
    themeDarkColor:'#0040a1',   // Dark color in the theme (Optional)
    header:'Header Text Here',  // The content of header (Optional)
    footer:'Footer Text Here',  // The content of footer (Optional)
    paypalOptions: {
        business:'YOU_PAYPAL_EMAIL@email.com' // The paypal email addres which use for receive money
    }
});

Live demo:

http://livedocs.digicrafts.com.hk/examples/JSAJAXPayPalCart

Download shopping cart jQuery plugin:

http://javascript-html5-tutorial.net/wp-content/uploads/2015/12/jQuery-Ajax-Shopping-Cart-Plugin.zip

Enjoy!

Share:Share on Facebook0Share on Google+1Tweet about this on TwitterShare on LinkedIn1Pin on Pinterest1