mkakpabla/session-shoppingcart

There is no license information available for the latest version (1.0.1) of this package.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/mkakpabla/session-shoppingcart

1.0.1 2019-10-20 20:21 UTC

This package is auto-updated.

Last update: 2025-09-21 23:02:24 UTC


README

Build Status

Shopping Cart

Requirements

  • PHP 7.2 or higher
  • Composer for installation

Quick Start

Installation

composer require "mkakpabla/shoppingcart"

Usage

<?php

require 'vendor/autoload.php';

$cart = new Cart();

$cart->addItem(1, [
    'name' => 'item1',
    'price' => 'item2'
], 2);

// Return the list of the CartItems
$items = $cart->getItems();

// Return the price of the cart
$cartPrice = $items->totalPrice()