Skip to content

Commit a23cf01

Browse files
committed
Updated docs for 2 new Cart API
1 parent 63abe7b commit a23cf01

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,32 @@ Remove Specific Item Condition: **Cart::removeItemCondition($itemId, $conditionN
428428
Cart::removeItemCondition($itemId, $conditionName)
429429
```
430430

431+
Get conditions by type: **Cart::getConditionsByType($type)**
432+
```php
433+
/**
434+
* Get all the condition filtered by Type
435+
* Please Note that this will only return condition added on cart bases, not those conditions added
436+
* specifically on an per item bases
437+
*
438+
* @param $type
439+
* @return CartConditionCollection
440+
*/
441+
public function getConditionsByType($type)
442+
```
443+
444+
Remove conditions by type: **Cart::removeConditionsByType($type)**
445+
```php
446+
/**
447+
* Remove all the condition with the $type specified
448+
* Please Note that this will only remove condition added on cart bases, not those conditions added
449+
* specifically on an per item bases
450+
*
451+
* @param $type
452+
* @return $this
453+
*/
454+
public function removeConditionsByType($type)
455+
```
456+
431457
## Instances
432458

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

559585
## Changelogs
560586

587+
**2.2.0
588+
- added new Cart Method: getConditionsByType($type)
589+
- added new Item Method: removeConditionsByType($type)
590+
561591
**2.1.1
562592
- 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)
563593

0 commit comments

Comments
 (0)