There are some tax systems that do have tax rate = 0%
Example - some EU VAT rates.
NOTE!
I did not test this to extensively, so I do not know, if it does not wreck havoc elsewhere in the system.
eg.: something * 0 = 0, or something/0 = error
So, if some OpenCart calculations are not "hardened" against such potential use of zero, system may run into problems.
NOTE!
Here is fix.
Go to:
admin/controller/localisation/tax_rate.php
Find and change:
Code: Select all
//find:
if (!$this->request->post['rate'])
{
$this->error['rate'] = $this->language->get('error_rate');
}
//replace with:
if (!preg_match('/^-?(?:\d+|\d*\.\d+)$/', $this->request->post['rate']) || $this->request->post['rate']<0)
{
$this->error['rate'] = $this->language->get('error_rate');
}
What does replacement does:
it allows through only positive floats and zero, e.g.: 0, 0.2, 2, 4 etc.
it prevents anything like: -2, blah, -4s, 7df etc