2017 © Pedro Peláez
 

library cart

Coercive Cart / Basket Handler

image

coercive/cart

Coercive Cart / Basket Handler

  • Thursday, July 12, 2018
  • by Coercive
  • Repository
  • 1 Watchers
  • 1 Stars
  • 531 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 21 Versions
  • 20 % Grown

The README.md

Coercive Shop Cart

Cart / Basket shopping handler, (*1)

Get

composer require coercive/cart

Usage


setTitle('Example 1') ->setPrice(10) ->setQuantity(1) ->setRef(666); $cart->Items()->addItem($item, '#test123'); $item->Promo() ->setToken('#123456789ABCD') ->setPriceCut(3); $item = (new Item) ->setTitle('Tutu') ->setPrice('\MyClass\For\Calculate\PriceItem::price') ->setQuantity(3) ->setRef(777); $cart->Items()->addItem($item); $cart->User() ->setRef(42) ->setLanguage('EN') ->setFirstName('Example FName') ->setLastName('Example LName') ->setEmail('example@coercive.fr'); $cart->Shipping() ->setTitle('Example Shipping Title') ->setFirstName('Example FName') ->setLastName('Example LName') ->setAddress('Example Address') ->setZip('#12345') ->setTown('Example Town') ->setCountry('Example Country') ->setIsoCountry('EN'); $cart->Billing() ->setTitle('Example Billing Title') ->setFirstName('Example FName') ->setLastName('Example LName') ->setAddress('Example Address') ->setZip('#12345') ->setTown('Example Town') ->setCountry('Example Country') ->setIsoCountry('FR'); // -------------------------- ?>

# EXAMPLE START #

<br /><br />

User : = $cart->User()->getEmail() ?>, (*2)

Shipping : = $cart->Shipping()->getTitle() ?>, (*3)

Billing : = $cart->Billing()->getTitle() ?>, (*4)

<br />Items()->keys() as $mId): $item = $cart->Items()->getItem($mId); ?> <p>----------------------------------------</p> <p>Title : <?= $item->getTitle() ?></p> <p>Price : <?= $item->getPrice() ?></p> <p>Quantity : <?= $item->getQuantity() ?></p> <p>Ref : <?= $item->getRef() ?></p><?php if($item->Promo()->isModified()): ?> <p>Token : <?= $item->Promo()->getToken() ?></p> <p>Price cut : <?= $item->Promo()->getPriceCut() ?></p> <p>New item price : <?= $item->Promo()->calc($item->getPrice()) ?></p><?php endif; endforeach ?> <br /><br />

# EXAMPLE END #

<?php # Storage in session $session = new Session; $session->store($cart); # Retrieve from session $cart = $session->retrieve();

The Versions

12/07 2018

dev-master

9999999-dev http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

MIT GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

06/03 2018

0.0.2.8

0.0.2.8 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

MIT

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

23/02 2018

0.0.2.7

0.0.2.7 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

MIT

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

21/02 2018

0.0.2.6

0.0.2.6 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

MIT

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

07/02 2018

0.0.2.5

0.0.2.5 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

MIT

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

25/09 2017

0.0.2.4

0.0.2.4 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

15/09 2017

0.0.2.3

0.0.2.3 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

14/09 2017

0.0.2.2

0.0.2.2 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

11/09 2017

0.0.2.1

0.0.2.1 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

08/09 2017

0.0.2

0.0.2.0 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

08/09 2017

0.0.1.9

0.0.1.9 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

08/09 2017

0.0.1.8

0.0.1.8 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

06/09 2017

0.0.1.7

0.0.1.7 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

05/09 2017

0.0.1.6

0.0.1.6 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

05/09 2017

0.0.1.5

0.0.1.5 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

04/09 2017

0.0.1.4

0.0.1.4 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

04/09 2017

0.0.1.3

0.0.1.3 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

04/09 2017

0.0.1.2

0.0.1.2 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

04/09 2017

0.1.1.2

0.1.1.2 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.1
  • jeremeamia/superclosure ^2.3

 

03/09 2017

0.0.1.1

0.0.1.1 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.0

 

03/09 2017

0.0.1

0.0.1.0 http://coercive.fr

Coercive Cart / Basket Handler

  Sources   Download

GNU

The Requires

  • php >=7.0