1. Go to this page and download the library: Download lombervid/shoppingcart library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lombervid / shoppingcart example snippets
use Lombervid\ShoppingCart\ShoppingCart;
$shoppingCart = new ShoppingCart();
use Lombervid\ShoppingCart\Item;
use Lombervid\ShoppingCart\ShoppingCart;
$cart = new ShoppingCart();
$cart->add(new Item('1', 'Cake', 15.56));
$cart->add(new Item('15', 'Frappe', 5));
foreach ($cart->items() as $item) {
// $item->id
// $item->name
}