Post by nureddin21 » Tue Mar 16, 2021 8:30 pm

Hi,
I am using v3.0.3.6 in my store ..
I want to show sum of all tax classes on cart page and checkout . Please help.

kind regards.

New member

Posts

Joined
Tue Feb 23, 2021 2:48 am

Post by paulfeakins » Wed Mar 17, 2021 6:44 pm

nureddin21 wrote:
Tue Mar 16, 2021 8:30 pm
I want to show sum of all tax classes on cart page and checkout . Please help.
What exactly do you mean? Give us some examples?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Johnathan » Wed Mar 17, 2021 11:20 pm

I've discussed this with nureddin21 via e-mail, so maybe I can explain in more detail. When different tax rates are present (even within 1 tax class), each one shows up as a line item on the order. nureddin wants a line item that sums together all taxes, rather than splits them up. For example, if the order is like this:

Sub-Total: $50.00
Shipping: $10.00
Product Tax (10%): $5.00
Shipping Tax (20%): $2.00
Total: $67.00

then he wants it to show up like this:

Sub-Total: $50.00
Shipping: $10.00
Taxes: $7.00
Total: $67.00

I told him to post in the forums asking about an extension, to see if one like this exists. If not, he knows he can post in the Commercial Support forum to hire someone to do this.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by nureddin21 » Thu Mar 18, 2021 12:31 am

Thank you very much for this clarification, Mr. Johnathan,
But as you mentioned, in addition to:
Sub-Total: $ 50.00
Shipping: $ 10.00
Product Tax (10%): $ 5.00
Shipping Tax (20%): $ 2.00
Total: $ 67.00

I want it like this:

Sub-Total: $ 50.00
Shipping: $ 10.00
Product Tax (10%): $ 5.00
Shipping Tax (20%): $ 2.00
Total taxes: $ 7.00 <<<<<
Total: $ 67.00

In Sweden, it is necessary to show the different tax rates ... and also their total ...
I only need help showing the total.

Attachments

tax.png

tax.png (23.15 KiB) Viewed 699 times


New member

Posts

Joined
Tue Feb 23, 2021 2:48 am

Post by straightlight » Thu Mar 18, 2021 12:46 am

In this scenario, the problem by doing this is the shipping taxes being collected with its associative tax class ID. Which means, by also calculating the product taxes, the same tax class ID could be conflicted with the previous associated tax class ID in order to pull the tax rate of the shipping cost in the order total extension module you'd be expecting to have.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by nureddin21 » Thu Mar 18, 2021 1:14 am

I think it can be done on the other hand ..
Instead of adding the total of the different tax rates, let us subtract the final two numbers.
As is evident in the attached picture, the total invoice appears, including tax, and another number is also shown, which is the total invoice, not including tax.
So why don't we do the process of subtracting the two numbers and getting the required sum?
who is agree with me ..
Can anyone help me? Where do I adjust the code exactly?

Attachments

tax2.png

tax2.png (28.22 KiB) Viewed 664 times


New member

Posts

Joined
Tue Feb 23, 2021 2:48 am

Post by Johnathan » Thu Apr 15, 2021 1:10 am

I just updated Intermediate Order Total so that you can pick which line items it factors into its calculation, so it should work for your purpose now. If you only choose "Taxes" in the extension, then it will add up any line items that have that internal "tax" code. That means it should work like you want:

Sub-Total: $50.00
Shipping: $10.00
Product Tax (10%): $5.00
Shipping Tax (20%): $2.00
Intermediate Order Total: $7.00
Total: $67.00

You can change the title in the extension as well, so you can make the text say "Total Tax" or something similar.

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by nureddin21 » Thu Apr 15, 2021 3:18 am

Johnathan wrote:
Thu Apr 15, 2021 1:10 am
I just updated Intermediate Order Total so that you can pick which line items it factors into its calculation, so it should work for your purpose now. If you only choose "Taxes" in the extension, then it will add up any line items that have that internal "tax" code. That means it should work like you want:

Sub-Total: $50.00
Shipping: $10.00
Product Tax (10%): $5.00
Shipping Tax (20%): $2.00
Intermediate Order Total: $7.00
Total: $67.00

You can change the title in the extension as well, so you can make the text say "Total Tax" or something similar.

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.
This is very beautiful ..

Thank you Johnathan.

New member

Posts

Joined
Tue Feb 23, 2021 2:48 am
Who is online

Users browsing this forum: alanjones and 90 guests