jbeee / shopping-cart-lite

A lightweight PHP/JavaScript shopping cart that uses Braintree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

shopping-cart-lite

A lightweight JavaScript/PHP Shopping Cart

index.php --> cart.php --> checkout.php

There is no basic shopping cart and Braintree example code out on the Internet. This project aims to fill that void providing an example using PHP and Javascript.

Files and their purpose

  • index.php : Minimalistic cart display and interaction
  • cart.php : Displays cart details and checkout page using Braintree
  • checkout.php : Processes the transaction
  • lib/braintree.php : Add your Braintree configuration info here
  • lib/cart_session.php : Helper code that grabs cart cookie data
  • js/cart.js : Helper Javascript methods for adding and remove items from the cart

Third-Party libraries used

Screenshots

###Index Page Index Page

###Index Page After Adding Items Index Page After Adding Items

###Shopping Cart Shopping Cart

###Shopping Cart - Paying with PayPal Shopping Cart - Paying with PayPal

###Shopping Cart - Paying with Credit Card Shopping Cart - Paying with Credit Card

###Checkout Checkout

About

A lightweight PHP/JavaScript shopping cart that uses Braintree

License:MIT License


Languages

Language:JavaScript 54.2%Language:PHP 45.8%