Post by philbydevil » Tue Oct 16, 2012 6:44 am

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

Attachments

Last edited by philbydevil on Wed Oct 17, 2012 5:55 am, edited 4 times in total.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by thbr02 » Tue Oct 16, 2012 3:53 pm

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?

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by philbydevil » Tue Oct 16, 2012 4:27 pm

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?

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by thbr02 » Tue Oct 16, 2012 5:12 pm

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!

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by philbydevil » Tue Oct 16, 2012 5:43 pm

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.

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by thbr02 » Tue Oct 16, 2012 5:48 pm

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.

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by philbydevil » Tue Oct 16, 2012 5:54 pm

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:

Attachments

Picture 16.png

Picture 16.png (34.19 KiB) Viewed 6411 times


I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by figge88 » Tue Oct 16, 2012 11:32 pm

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!

New member

Posts

Joined
Tue Apr 10, 2012 12:16 am

Post by thbr02 » Wed Oct 17, 2012 12:21 am

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.

Image

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.

Image

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.

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by thbr02 » Wed Oct 17, 2012 5:10 am

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.

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by philbydevil » Wed Oct 17, 2012 5:20 am

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....

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by figge88 » Thu Oct 18, 2012 12:54 am

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...

New member

Posts

Joined
Tue Apr 10, 2012 12:16 am

Post by thbr02 » Thu Oct 18, 2012 3:26 am

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?

Active Member

Posts

Joined
Wed Jun 22, 2011 10:30 pm
Location - Sweden

Post by philbydevil » Thu Oct 18, 2012 5:15 am

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...

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1


User avatar
Active Member

Posts

Joined
Fri Dec 03, 2010 5:20 am

Post by figge88 » Fri Oct 19, 2012 12:15 am

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! :D

New member

Posts

Joined
Tue Apr 10, 2012 12:16 am

Post by Sebcart » Sat Oct 20, 2012 12:53 am

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 :joker:

New member

Posts

Joined
Sat Sep 08, 2012 11:25 pm
Who is online

Users browsing this forum: No registered users and 6 guests