Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added shipping tax amout field
  • Loading branch information
zans-laksa committed Dec 22, 2020
1 parent 39821b1 commit 3832ca5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Model/Resolver/GetCartForCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ public function resolve(
$tax_amount = $address->getTaxAmount();
$discount_amount = $address->getDiscountAmount();
$subtotal_incl_tax = $cart->getSubtotal() + $tax_amount;
$shipping_tax_amount = $address->getShippingTaxAmount();
$applied_taxes = $this->getAppliedTaxes($address);

return [
'items' => $itemsData,
'tax_amount' => $tax_amount,
'subtotal_incl_tax' => $subtotal_incl_tax,
'discount_amount' => $discount_amount,
'shipping_tax_amount' => $shipping_tax_amount,
// In interface it is PHPDocumented that it returns bool,
// while in implementation it returns int.
'is_virtual' => (bool) $cart->getIsVirtual(),
Expand Down

0 comments on commit 3832ca5

Please sign in to comment.