Page 1 of 1
[VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 6:44 am
by philbydevil
A great little modification graciously shared by Deeman:
http://www.opencart.com/index.php?route ... ame=deeman.
This modification shows tax in the shipping price in the cart/checkout confirm/order confirmation email/customer history/admin (basically, anywhere that the shipping sub-total is shown).
It makes it much less confusing for customers, as by default, the shipping quotes are shown with tax, and then without tax when the quote is applied to the cart. This standardizes the amounts to both show with tax.
Deeman also has written the best one-page checkout (
http://www.opencart.com/index.php?route ... on_id=4811) and his support is amazing!
Works on 1.5.4.1
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 3:53 pm
by thbr02
I'll tried it on OC 1.5.1.3 without success. I can find the code in "catalog/model/total/shipping.php" as the VQMod are searching for. It has to be some of the code as the mod adds which is not compatible. What will be needed to change to get it work on OC 1.5.1.3?
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 4:27 pm
by philbydevil
catalog/model/total/shipping.php hasn't changed since 1.5.1.3 so I'm not sure why it isn't working. Any errors is admin or your vQmod log? Could one of your other changes be conflicting? What's happening? Is it showing $0.00 in the shipping sub-total, or just isn't changing the amount?
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 5:12 pm
by thbr02
I tried to implement the code right into "catalog/model/total/shipping.php" then it showed the shipping incl tax properly. So there is nothing wrong with your mod. I will take a closer look at it. There maybe a conflict with another VQmod. Thanks a lot for your help!
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 5:43 pm
by philbydevil
There was an error in the xml. I tried to add a url in the <author></author> area and so the xml wasn't running.
Fixed now.
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 5:48 pm
by thbr02
Okay, I think there is something wrong when calculate the total tax. It seems like the total excl tax adds with the shipping incl tax. Then it calculates the tax once again at the total.
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 5:54 pm
by philbydevil
That could be a problem with your other modifications?
Mine is calculating correctly (183.15 divided by 11 equals 16.65) and here's what it looks like:
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Tue Oct 16, 2012 11:32 pm
by figge88
Well, I'm getting the same error as thbr02. The amount of tax of the shipping cost is added to the total price.
So lets say you have bought a product for 100$ (incl tax), shipping cost (incl. tax) is 20$. Then the total price should be 120$, right?
But it not, it is calculated to be 124$.
With 25% tax on shipping cost generates 4$ in taxes for this. And those 4$ are added to the total price...
And also it seems as if the shipping incl. tax doesn't show where you choose different shipping methods, or where you calculate the shipping cost (before going to checkout).
But it's a really good start! Thank you!
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Wed Oct 17, 2012 12:21 am
by thbr02
I can't figure out why this tax error occurs.
At this screendump the VQMod is inactive. There is no tax added to products total and no tax added to shipping (Skicka lätt). The total tax is 19,80 SEK and the total incl tax 99,00 SEK.
At this screendump the VQMod is active. There is no tax added to products total, but tax added to shipping (Skicka lätt). The total tax is 19,80 SEK and the total incl tax 116,80 SEK.
There is a difference of 17,80 SEK and that's exactly the same sum as the shipping tax?! In some way the tax is added twice.
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Wed Oct 17, 2012 5:10 am
by thbr02
I think solved the problem with the double tax. I just marked out th last part of the VQMod.
Code: Select all
<!-- <operation>
<search position="replace"><![CDATA[
$total += $this->session->data['shipping_method']['cost'];
]]></search>
<add><![CDATA[
$total += $this->tax->calculate($this->session->data['shipping_method']['cost'], $this->session->data['shipping_method']['tax_class_id'], $this->config->get('config_tax')); // increase of the total value on shipping cost
]]></add>
</operation>-->
Now it seems to display the right amount all over. Thanks a lot to philbydevil and Deeman for this VQMod.
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Wed Oct 17, 2012 5:20 am
by philbydevil
EDIT: I just double-checked the xml I am using on my site and the last <operation> was commented out (similar to the post above). A new xml has been uploaded above and should hopefully fix the double tax calculation....
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Thu Oct 18, 2012 12:54 am
by figge88
philbydevil wrote:EDIT: I just double-checked the xml I am using on my site and the last <operation> was commented out (similar to the post above). A new xml has been uploaded above and should hopefully fix the double tax calculation....
Yep, it seems as if the double tax is fixed! Now it works correctly for med! Thank you!
Do you know if it can be fixed so that it shows all way through the shopping process?
For me it doesn't show shipping incl. tax when I'm at step 4 in checkout...
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Thu Oct 18, 2012 3:26 am
by thbr02
I don't think this mod effects the shipping cost at step 4 at the checkout. If I uninstall the VQmod the shipping cost still displays with tax. I think you have to look for the answer somewhere else. What is your setting for taxes for shipping?
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Thu Oct 18, 2012 5:15 am
by philbydevil
That's right, this mod won't affect Step 4 in the checkout process, but my Step 4 shows the shipping prices with tax anyway. I've just upgraded to 1.5.4.1, but I think that it showed correctly in 1.5.1.3 as well.
Show prices with tax is set to yes in admin, and the correct geo-zones are set for the shipping methods as well...
Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Fri Oct 19, 2012 12:15 am
by figge88
I am so sorry, this was a fault in the shipping-extension I'm using. I tried an other module for shipping which showed cost incl. taxes in step 4.
So this is a great modification, and thats it!

Re: [VQMod] Shipping price (sub-total) includes tax
Posted: Sat Oct 20, 2012 12:53 am
by Sebcart
This was just the mod I was looking for! but I ended up not using it..
I have a fixed shipping rate for all orders.. and I'm using the Automatic Shipping mod (payed) to apply the shipping costs automatically to the cart as soon as a customer orders something. I was bothered that this amount was vied ex vat.. But I found out I had set the Shipping method 'Fixed rate" to 'no tax', instead of tax. This works out beautifully for my shop, but I'm not sure how this worked out with the tax office.. We'll see
