News:

Support the VirtueMart project and become a member

Main Menu

Warning: Division by zero...

Started by betterlead, June 11, 2013, 10:41:11 AM

Previous topic - Next topic

betterlead

I need help on this one. What does this message mean? It pops up in my Klarna one page checkout cart. See screen shot below. The code in the file (197 starts with  $tax_rate = $cart->)
if (isset($cart->pricesUnformatted ['shipmentValue'])) {
            $price = $paymentCurrency->convertCurrencyTo(
                $method->payment_currency,
                $cart->pricesUnformatted ['shipmentValue'] + $cart->pricesUnformatted['shipmentTax'],
                FALSE
            );
            $tax_rate = $cart->pricesUnformatted['shipmentTax'] / ($cart->pricesUnformatted['shipmentValue'] - $cart->pricesUnformatted['shipmentTax']) * 100;
            $name = JText::sprintf ('VMPAYMENT_KLARNA_CHECKOUT_ONEPAGE_SHIPPING', strip_tags($cart->cartData['shipmentName']));
            $korder['cart']['items'][] = array(
                'reference'     => 'shipping',
                'name'          => substr($name, 0, 127),
                'quantity'      => 1,
                'unit_price'    => $this->formatCurrency($price),
                'discount_rate' => $this->formatCurrency(0),
                'tax_rate'      => $this->formatCurrency($tax_rate)
            );
        }



[attachment cleanup by admin]
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

alatak

Hello
The klarna payment you are using, is not the one provided in the core.
So i cannot help you.

May be you can contact the developer

betterlead

Well no, it's the new Klarna One page checkout, I know. But the code / error don't tell anybody what it might be?
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

alatak

Hello

Quote, it's the new Klarna One page checkout
Where did you get that from?

betterlead

From Klarna and a company that installs it for free on VM2. Klarna certified developer. Or whatever it's called. "Me novice" ;)
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

Klarna Integration

Hi!

Have you managed to get past this?
Any progress?

For us to be able to help you further, it would be great if you could supply us with some more info regarding the matter.

Do you get any more specific error codes?

If you need any more feedback or questions, feel free to send an email straight to integration@klarna.com

Kind regards
Klarna integration.