Skip to content

Commit

Permalink
Updated docs for 2 new Cart API
Browse files Browse the repository at this point in the history
  • Loading branch information
darryldecode committed May 4, 2015
1 parent 63abe7b commit a23cf01
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,32 @@ Remove Specific Item Condition: **Cart::removeItemCondition($itemId, $conditionN
Cart::removeItemCondition($itemId, $conditionName)
```

Get conditions by type: **Cart::getConditionsByType($type)**
```php
/**
* Get all the condition filtered by Type
* Please Note that this will only return condition added on cart bases, not those conditions added
* specifically on an per item bases
*
* @param $type
* @return CartConditionCollection
*/
public function getConditionsByType($type)
```

Remove conditions by type: **Cart::removeConditionsByType($type)**
```php
/**
* Remove all the condition with the $type specified
* Please Note that this will only remove condition added on cart bases, not those conditions added
* specifically on an per item bases
*
* @param $type
* @return $this
*/
public function removeConditionsByType($type)
```

## Instances

You may also want multiple cart instances on the same page without conflicts.
Expand Down Expand Up @@ -558,6 +584,10 @@ $items->each(function($item)

## Changelogs

**2.2.0
- added new Cart Method: getConditionsByType($type)
- added new Item Method: removeConditionsByType($type)

**2.1.1
- when a new product with the same ID is added on a cart and a quantity is provided, it will increment its current quantity instead of overwriting it. There's a chance that you will also need to update an item's quantity but not incrementing it but reducing it, please just see the documentation (Please see Cart::update() section, and read carefully)

Expand Down

0 comments on commit a23cf01

Please sign in to comment.