I have a strange problem with a rule for shipping. I setup a rule that between 0 and 50 € in total each shipping item is charged with 1,40 €. The rule match like it should and when it's over 50 € shipping is free. Now when i choose an item which is below a 2 digit number the rule doesn't match anymore and it only match when it is over 60 €.

At the moment i have only one rule. The Filter is for every country and region Maximum Order Total is 50,00 € and per Item rate is 1,40.

Another problem is also with the shipping. When i set round item prices after tax and added all prices without tax inside the backend, all store frontend prices are fine, but the shipping of 1,40 display on two items always 2,81 and i don't want that. Independently if it round the value or not where does the 0,01 come from when i set the item charge to 1,40??

To fix this i commented the following lines out at store_shipping_default.php to prevent the strange rounding on shipping but this can't be a solution for my problem.

It would be nice if someone can have a look why this happens. Especially the wrong charging on items where the price is under 10,00 €?

Below is also the part i commented out of the function:

        // this isn't particularly tidy, but it solves the tax rounding problem
    // if ($this->EE->store_config->item('tax_rounding') == 'y')
    // {
    //  $tax_multiplier = 1 + $order['tax_rate'];
    //  foreach (array('base_rate_val', 'per_item_rate_val', 'per_weight_rate_val', 'min_rate_val') as $field)
    //  {
    //      $rule[$field] = store_round_currency($rule[$field] * $tax_multiplier) / $tax_multiplier;
    //  }
    // }



1 Answer 1


This issue has been resolved via email but I'll provide a solution to anyone else who may have similar issues.

To answer your first problem with regards to the shipping rule, the problem here was that Store calculates tax on the tax-exclusive subtotal whereas you were displaying the subtotal including tax: {order_subtotal_inc_tax}.

So in your case with tax intended to be free on orders over €50 with the tax rate set at 19% you would use this formula to calculate what you should set your shipping rate too:

target shipping / (1 + tax rate)


50 / (1 + 0.19) = 42.0168

So your shipping rule should be set to €42.0168 to provide free shipping on orders over €50.

To answer your second question regarding rounding errors, that's not a bug but expected behaviour. If you include tax in your product prices (shown on the front-end) then you need to set "Round item prices after tax" to Yes. If you don't include tax in your item prices (displayed on the front-end) then you can set this to No.

The "Round item prices after tax" takes care of some special rounding if you are displaying tax-inclusive prices on the front end, so basically every time people are using the {price_inc_tax} variables they should set "round item prices after tax" to Yes.

For example, if tax rate is 10%, and your item is $20.00 exactly including tax, you would enter this as $18.18 in the CP. Now if a customer purchased one item, {price_inc_tax} shows $20.00 which is fine. But if they purchased 10, ($18.18 x 10) * 1.1 = $199.98. If you were displaying prices including tax in the checkout, that would display as $20.00 x 10 = $199.98 which would definitely confuse your customer. "Round item prices after tax" means that Store will calculate round_to_2dp($18.18 * 1.1) * 10, or $20.00 * 10 = $200.00 which is what you would expect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.