From 1a2945fc9b6389e59a4cbc4d586b749d9b1bf64a Mon Sep 17 00:00:00 2001 From: vegim carkaxhija Date: Thu, 20 Jun 2024 14:11:51 +0200 Subject: [PATCH] update --- library/checkout/in3oldcheckout.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/checkout/in3oldcheckout.php b/library/checkout/in3oldcheckout.php index e792fe5e..5304393a 100644 --- a/library/checkout/in3oldcheckout.php +++ b/library/checkout/in3oldcheckout.php @@ -166,7 +166,7 @@ public function getArticles() 'price' => round($item['price_wt'], 2), ]; - $total += round($item['price_wt'], 2); + $total += round($item['price_wt'] * $item['quantity'], 2); } $wrapping = $this->cart->getOrderTotal(true, CartCore::ONLY_WRAPPING); @@ -202,12 +202,13 @@ public function getArticles() $total += round($shipping, 2); } - if (abs($this->payment_request->amountDebit - $total) >= 0.01) { + $difference = round($this->payment_request->amountDebit - $total, 2); + if (abs($difference) >= 0.01) { $products[] = [ 'description' => 'Other fee/discount', 'identifier' => 'OFees', 'quantity' => 1, - 'price' => round($this->payment_request->amountDebit - $total, 2), + 'price' => $difference, ]; }