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.
$9

Personal License

1 site, unlimited servers No source distribution
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: Jun 1, 2011
    Last Update: Jun 1, 2011
  • Language: PHP
  • Category: Ecommerce
(1 ratings)

DevKen Cart Class

DevKen Cart Class
Developed by Ken Elliott, Released Jun 1, 2011

Cart class that works with wishlists, carts and recognizes products smartly.

PHP

Tags: bag , basket , cart , ecommerce

The DevKen Cart Class addresses an issue that I ran into several times while developing ecommerce websites. Customers wanted shopping carts that fit their needs exactly in design and aesthetics. I used a couple free versions for a few projects and found myself spending more time modifying them than I should have had to. So I decided to roll my own shopping cart class that would provide just what was required. It saved the list of products that users wanted to save and organized them in a way that makes it easy to display and calculate.

The Cart class handles any type of list that you need to manage. I also use it to maintain a history of products that users have visited and I use it to keep track of wishlists and download lists at the same time. It is very versatile and easy to integrate into any project. It is well documented and comes with a demo that works right out of the box. Just place it on your webserver and load it up.

Back to top

Example Usage

$cart = new Cart;       

// create a new item array - ID is required
$item = array('id'=>132,'qty'=>'1','color'=>'blue','size'=>'large');    
// Add item to cart
$cart->addItem($item);  

// Add two more items with the same ID (no overwrite)
$item['qty'] += 2;      
$cart->addItem($item);  

// Change the item color, a new item will be added this time
$item['color']  = 'white';  
$cart->addItem($item);  

// Remove item by index
$cart->removeItem(0);   

// Update item properties by index
$cart->updateItem(0,array('color'=>'yellow')); 

// Empty the cart
$cart->clearCart();     

// Dump the cart for debugging
$cart->dumpCart();      

// Get the cart for processing
$cartItems = $cart->getCart();      
foreach($cartItems as $item) {
      // Process cart 
}
View all 1 reviews »

User Reviews

  • fabricio leite 12 months ago
    Great class, lots of features and easy to use.
    The author provided good support.
    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.