2017 © Pedro Peláez
 

library shopping-cart

Simple PHP Shopping Cart

image

dyankov/shopping-cart

Simple PHP Shopping Cart

  • Friday, September 18, 2015
  • by dyankov91
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Shopping Cart

Simple PHP shopping cart with coupons package., (*1)

Installation

composer require dyankov/shopping-cart

Usage

All items must implement Dyankov\ShoppingCart\Contracts\ShoppingCartItem so they can be put in the cart. Coupons must implement Dyankov\ShoppingCart\Contracts\ShoppingCartCoupon., (*2)

  • Put item in the cart:
$cart = Dyankov\ShoppingCart\ShoppingCart();
$cart->put($shoppingCartItem);
  • Take item out of the cart:
$cart = Dyankov\ShoppingCart\ShoppingCart();
$cart->put($shoppingCartItem);
$cart->takeOut($shoppingCartItem);
  • Cart total:
$cart = Dyankov\ShoppingCart\ShoppingCart();
$cart->put($shoppingCartItem);
$cart->total();
  • Apply coupon:
$cart = Dyankov\ShoppingCart\ShoppingCart();
$cart->put($shoppingCartItem);
$cart->applyCoupon($shoppingCartCoupon);

The Versions

18/09 2015

dev-master

9999999-dev

Simple PHP Shopping Cart

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stefan Dyankov

cart shopping shopping cart

18/09 2015

0.0.1

0.0.1.0

Simple PHP Shopping Cart

  Sources   Download

MIT

The Requires

 

The Development Requires

by Stefan Dyankov

cart shopping shopping cart