Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darryldecode committed Mar 16, 2015
1 parent be3d255 commit 05637f8
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,47 @@ Then Finally you can call **Cart::getSubTotal()** to get the Cart sub total with
```php
$cartSubTotal = Cart::getSubTotal(); // the subtotal will be calculated based on the conditions you have provided
```

Clearing Cart Conditions: **Cart::clearCartConditions()**
```php
/**
* clears all conditions on a cart,
* this does not remove conditions that has been added specifically to an item/product.
* If you wish to remove a specific condition to a product, you may use the method: removeItemCondition($itemId,$conditionName)
*
* @return void
*/
Cart::clearCartConditions()
```

Remove Specific Cart Condition: **Cart::removeCartCondition($conditionName)**
```php
/**
* removes a condition on a cart by condition name,
* this can only remove conditions that are added on cart bases not conditions that are added on an item/product.
* If you wish to remove a condition that has been added for a specific item/product, you may
* use the removeItemCondition(itemId, conditionName) method instead.
*
* @param $conditionName
* @return void
*/
$conditionName = 'Summer Sale 5%';

Cart::removeCartCondition($conditionName)
```

Remove Specific Item Condition: **Cart::removeItemCondition($itemId, $conditionName)**
```php
/**
* remove a condition that has been applied on an item that is already on the cart
*
* @param $itemId
* @param $conditionName
* @return bool
*/
Cart::removeItemCondition($itemId, $conditionName)
```

## Instances

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

```

## Change Log
**1.1.0
- added new method: clearCartConditions()
- added new method: removeItemCondition($itemId, $conditionName)
- added new method: removeCartCondition($conditionName)

## License

The Laravel Shopping Cart is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
Expand Down

0 comments on commit 05637f8

Please sign in to comment.