Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darryldecode committed Apr 17, 2015
1 parent 704cf6f commit 116895e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ Cart::update(456, array(
'name' => 'New Item Name', // new item name
'price' => 98.67, // new item price, price can also be a string format like so: '98.67'
));

// you may also want to update a product's quantity
Cart::update(456, array(
'quantity' => 2, // so if the current product has a quantity of 4, another 2 will be added so this will result to 6
));

// you may also want to update a product by reducing its quantity, you do this like so:
Cart::update(456, array(
'quantity' => -1, // so if the current product has a quantity of 4, it will subtract 1 and will result to 3
));
```

Removing an item on a cart: **Cart::remove()**
Expand Down

0 comments on commit 116895e

Please sign in to comment.