Post by gfrancoeur » Wed Feb 24, 2016 3:00 pm

Hi there I am trying to figure out how to hide the tax of the shipping when selecting shipping.

I am using open cart 2.1.0.2

I want to show the price without the tax but still have the shijpping tax calculated in the total, anyone got any idea? I will try and get an extension as well to have more then one flat rate shipping based on geozone, anyone have any suggestion?

thank you

see attached image

Guillaume

Attachments

opencartshipping.PNG

opencartshipping.PNG (43.73 KiB) Viewed 5167 times


Newbie

Posts

Joined
Wed Feb 24, 2016 2:55 pm

Post by Johnathan » Thu Feb 25, 2016 1:59 am

This is standard OpenCart behavior: if you have your prices set to display tax, shipping costs will do this as well. You can change this in System > Settings, but it will affect all prices (including product prices). If you want to make the shipping cost the only one that does NOT show tax, you'll need to edit its code. For the Flat Rate method, that would be something like this:

Code: Select all

IN:
/catalog/model/shipping/flat.php

REPLACE:
'text'         => $this->currency->format($this->tax->calculate($this->config->get('flat_cost'), $this->config->get('flat_tax_class_id'), $this->config->get('config_tax')))

WITH:
'text'         => $this->currency->format($this->config->get('flat_cost')) 
This will still apply tax to the shipping cost, but will change its display so that it always shows without tax.

Other shipping methods should have a similar line in their files (in the same directory) towards the bottom of their code.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by gfrancoeur » Thu Feb 25, 2016 2:11 pm

Thank you Johnathan, this is what I am looking for, I will go and try this soon and report to see if it worked

Cheers
Guillaume

Newbie

Posts

Joined
Wed Feb 24, 2016 2:55 pm

Post by gfrancoeur » Thu Feb 25, 2016 2:25 pm

Worked like a charm!! thank you =)

Newbie

Posts

Joined
Wed Feb 24, 2016 2:55 pm

Post by MrBasic » Tue Jul 13, 2021 9:31 pm

Can you help me with this for Opencart 3.0.3.7 ?
Johnathan wrote:
Thu Feb 25, 2016 1:59 am
This is standard OpenCart behavior: if you have your prices set to display tax, shipping costs will do this as well. You can change this in System > Settings, but it will affect all prices (including product prices). If you want to make the shipping cost the only one that does NOT show tax, you'll need to edit its code. For the Flat Rate method, that would be something like this:

Code: Select all

IN:
/catalog/model/shipping/flat.php

REPLACE:
'text'         => $this->currency->format($this->tax->calculate($this->config->get('flat_cost'), $this->config->get('flat_tax_class_id'), $this->config->get('config_tax')))

WITH:
'text'         => $this->currency->format($this->config->get('flat_cost')) 
This will still apply tax to the shipping cost, but will change its display so that it always shows without tax.

Other shipping methods should have a similar line in their files (in the same directory) towards the bottom of their code.

User avatar
Newbie

Posts

Joined
Wed Sep 23, 2020 11:52 pm
Location - Amersfoort

Post by straightlight » Tue Jul 13, 2021 9:37 pm

MrBasic wrote:
Tue Jul 13, 2021 9:31 pm
Can you help me with this for Opencart 3.0.3.7 ?
Johnathan wrote:
Thu Feb 25, 2016 1:59 am
This is standard OpenCart behavior: if you have your prices set to display tax, shipping costs will do this as well. You can change this in System > Settings, but it will affect all prices (including product prices). If you want to make the shipping cost the only one that does NOT show tax, you'll need to edit its code. For the Flat Rate method, that would be something like this:

Code: Select all

IN:
/catalog/model/shipping/flat.php

REPLACE:
'text'         => $this->currency->format($this->tax->calculate($this->config->get('flat_cost'), $this->config->get('flat_tax_class_id'), $this->config->get('config_tax')))

WITH:
'text'         => $this->currency->format($this->config->get('flat_cost')) 
This will still apply tax to the shipping cost, but will change its display so that it always shows without tax.

Other shipping methods should have a similar line in their files (in the same directory) towards the bottom of their code.
It's the same instructions except the path is slightly different. It's under catalog/model/extension/shipping/flat.php file.

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 MrBasic » Tue Jul 13, 2021 10:06 pm

I tried this, but it doesn't work. The website will then no longer load.
straightlight wrote:
Tue Jul 13, 2021 9:37 pm
MrBasic wrote:
Tue Jul 13, 2021 9:31 pm
Can you help me with this for Opencart 3.0.3.7 ?
Johnathan wrote:
Thu Feb 25, 2016 1:59 am
This is standard OpenCart behavior: if you have your prices set to display tax, shipping costs will do this as well. You can change this in System > Settings, but it will affect all prices (including product prices). If you want to make the shipping cost the only one that does NOT show tax, you'll need to edit its code. For the Flat Rate method, that would be something like this:

Code: Select all

IN:
/catalog/model/shipping/flat.php

REPLACE:
'text'         => $this->currency->format($this->tax->calculate($this->config->get('flat_cost'), $this->config->get('flat_tax_class_id'), $this->config->get('config_tax')))

WITH:
'text'         => $this->currency->format($this->config->get('flat_cost')) 
This will still apply tax to the shipping cost, but will change its display so that it always shows without tax.

Other shipping methods should have a similar line in their files (in the same directory) towards the bottom of their code.
It's the same instructions except the path is slightly different. It's under catalog/model/extension/shipping/flat.php file.

User avatar
Newbie

Posts

Joined
Wed Sep 23, 2020 11:52 pm
Location - Amersfoort

Post by straightlight » Tue Jul 13, 2021 10:12 pm

MrBasic wrote:
Tue Jul 13, 2021 10:06 pm
I tried this, but it doesn't work. The website will then no longer load.
straightlight wrote:
Tue Jul 13, 2021 9:37 pm
MrBasic wrote:
Tue Jul 13, 2021 9:31 pm
Can you help me with this for Opencart 3.0.3.7 ?

It's the same instructions except the path is slightly different. It's under catalog/model/extension/shipping/flat.php file.
Then, either you're using an extension that targets the same line of code or you're applying the change wrong.

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 Luckett552 » Mon Sep 27, 2021 8:00 pm

MrBasic wrote:
Tue Jul 13, 2021 10:06 pm
I tried this, but it doesn't work. The website will then no longer load.
straightlight wrote:
Tue Jul 13, 2021 9:37 pm
MrBasic wrote:
Tue Jul 13, 2021 9:31 pm
Can you help me with this for Opencart 3.0.3.7 tellthebell?

It's the same instructions except the path is slightly different. It's under catalog/model/extension/shipping/flat.php file.
Did you ever find a solution for this? I'm in the same situation.
Last edited by Luckett552 on Tue Sep 28, 2021 5:15 pm, edited 1 time in total.

Newbie

Posts

Joined
Thu Aug 05, 2021 4:33 pm

Post by straightlight » Mon Sep 27, 2021 11:07 pm

Luckett552 wrote:
Mon Sep 27, 2021 8:00 pm
MrBasic wrote:
Tue Jul 13, 2021 10:06 pm
I tried this, but it doesn't work. The website will then no longer load.
straightlight wrote:
Tue Jul 13, 2021 9:37 pm


It's the same instructions except the path is slightly different. It's under catalog/model/extension/shipping/flat.php file.
Did you ever find a solution for this? I'm in the same situation.
Lack.

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
Who is online

Users browsing this forum: No registered users and 24 guests