Skip to content

Commit

Permalink
[FIX-TOTALPRICE-SHIPMENTPARAMETER] Make use of $shippingAddress variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Lex committed Jul 14, 2022
1 parent ca3419c commit 26136fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Model/Checkout/WidgetConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,16 @@ public function getConfig()

switch ($this->scopeConfig->getTotalPrice()) {
case "grand_total":
$totalPriceValue = (float) $this->getQuote()->getShippingAddress()->getGrandTotal();
$totalPriceValue = (float) $shippingAddress->getGrandTotal();
break;
case "subtotal_excl_discount":
$totalPriceValue = (float) $this->getQuote()->getShippingAddress()->getSubtotalInclTax();
$totalPriceValue = (float) $shippingAddress->getSubtotalInclTax();
break;
case "subtotal_incl_discount":
default: // default from config.xml = "subtotal_incl_discount"
$totalPriceValue = (
(float) $this->getQuote()->getShippingAddress()->getSubtotalInclTax() +
(float) $this->getQuote()->getShippingAddress()->getDiscountAmount()
(float) $shippingAddress->getSubtotalInclTax() +
(float) $shippingAddress->getDiscountAmount()
);
break;
}
Expand Down

0 comments on commit 26136fe

Please sign in to comment.