File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ Getting an item on a cart: **Cart::get()**
151151$itemId = 456;
152152
153153Cart::get($itemId);
154+
155+ // You can also get the sum of the Item multiplied by its quantity, see below:
156+ $summedPrice = Cart::get($itemId)->getPriceSum();
154157```
155158
156159Getting cart's contents and count: ** Cart::getContent()**
@@ -280,6 +283,11 @@ $condition->getTarget(); // the target of which the condition was applied
280283$condition->getName(); // the name of the condition
281284$condition->getType(); // the type
282285$condition->getValue(); // the value of the condition
286+
287+ // You can get the conditions calculated value by providing the subtotal, see below:
288+ $subTotal = Cart::getSubTotal();
289+ $condition = Cart::getCondition('VAT 12.5%');
290+ $conditionCalculatedValue = $condition->getCalculatedValue($subTotal);
283291```
284292
285293NOTE: All cart based conditions should be applied before calling ** Cart::getTotal()**
@@ -529,6 +537,10 @@ $items->each(function($item)
529537
530538## Changelogs
531539
540+ ** 2.1.0
541+ - added new Cart Method: getCalculatedValue($totalOrSubTotalOrPrice)
542+ - added new Item Method: getPriceSum()
543+
532544** 2.0.0 (breaking change)
533545- major changes in dealing with conditions (Please see [ Conditions] ( #conditions ) section, and read carefully)
534546- All conditions added on per item bases should have now target => 'item' instead of 'subtotal'
You can’t perform that action at this time.
0 commit comments