Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

GNU GPL

The GNU GPL is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

  • Released: May 11, 2011
    Last Update: May 11, 2011
  • Language: PHP
  • Category: Ecommerce
(2 ratings)

Easy PHP Cart

Easy PHP Cart
Developed by Irimia Octavian, Released May 11, 2011

A simple OOP PHP shopping cart for adding and removing products.

PHP

Tags: php cart , shopping cart , simple php cart , simple php shopping cart

This class allows you to add and remove products from an OOP cart. Cart is managed in the session so it is saved between pages and optionally between visits (depending on session configuration).

Usage example

// Start sessions
session_start();
// Set all errors to ON for development and to 0 (zero) when public
error_reporting(E_ALL);

// require the class
require 'class.cart.inc.php';

// set cart name [session key]
$cartName = 'basicCart';

// instance the cart class
$cart = new cart($cartName);

// Add some products to the cart. 
// Here we add a product with an ID of 23, and a quantity of 8.
$cart->addProduct(23, 8, false);
// Set special discount for this product
$cart->discount = 32;

// The 3rd argument allows you to increase quantity if the product exists
$cart->addProduct(16, 2, true);

// set special discount for this too
$cart->addProduct(53, 5, false);
$cart->discount = 35;
$cart->bonusProduct = 11;

echo 'We have '.$cart->cartCount().' products';
$cart->viewCart();
View all 1 reviews »

User Reviews

  • 2 of 2 people found this review helpful Dailis Tukāns 9 months ago
    Good concept idea, but realisation needs an additional work to use it real life project
    Flag
    Was this helpful? Yes No

Questions & Comments


Or enter your name and Email
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.