Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Total price


Recommended Posts



I have a problem with rounding the toal price in checkout_confimration.php


I added this at the end:


      if (DISPLAY_PRICE_WITH_TAX == 'true') {
       $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];
     } else {
       $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];
     //$this->info['total'] = round((($this->info['total']+0.000001)*2),1) / 2;

$this->info['total'] = round(20*($this->info['total']),0)/20;


Everything works fine until I put in the admin panel by shipping with tax then the end price is wrong.



product: 18.90

shipping: 10.90

tax: 2.26

end price: 32.08 but it should be 32.10


without adding tax to the shipping costs it works. Example

product: 18.90

shipping: 10.90

tax: 1.44

end price: 31.25




Background: In Switzerland we have only currenyies with 5cents.


Does anybody have any idea why the end price gets wrong as soon as we add tax to the shipping costs.


thanks in advance

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...