Jump to content
thirty bees forum

TB 1.5 Division by zero error in Cart.php


Recommended Posts


I got an divsion by zero error. I do not know what the customer had done but it happened that one cart seems to have this problem.

Any idea? Is it a problem with the code? should I try to remove the cart (which requires deep sql-knowledge and might be dangerous)

Best wishes

Source file: .../thirtybees/classes/Cart.php

591:                true,
592:                $cartShopContext
593:            );
595:            $row['total'] = $this->roundPrice(
596:                $row['price_with_reduction_without_tax'],
597:                $row['price_with_reduction'],
598:                $row['cart_quantity'],
599:                false
600:            );
601:            $row['total_wt'] = $this->roundPrice(
602:                $row['price_with_reduction_without_tax'],
603:                $row['price_with_reduction'],
604:                $row['cart_quantity'],
605:                true
606:            );
608:            // Recalculate prices after rounding, these go into an order.
609:            $row['price'] = round(
610:                $row['total'] / $row['cart_quantity'],
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...