Post by djcxm » Fri Jun 11, 2010 2:27 pm

Hi All,
I recently upgraded to 1.4.8 and the only mod I had installed was Options Plus.
Currently I am experiencing an issue in which after a product is added to the shopping cart.
The side shopping cart totals included Taxes prior to ever asking for the customers address which would trigger the geozone.

I also notice that the tax is automatically removed once the customer makes an account and their state is selected.
however For example a customer is shown CA Sales Tax in the image which would cause people to think they are being charged by default prior to creating an account.

I would like to make it so that taxes are only displayed on the Checkout Confirmation page.

Any help is greatly appreciated

-Christian
Last edited by i2Paq on Sun Jul 11, 2010 4:42 pm, edited 1 time in total.
Reason: Title adjusted

Newbie

Posts

Joined
Tue Feb 23, 2010 10:59 am

Post by Qphoria » Mon Jun 14, 2010 1:39 am

The fix:

1. EDIT: system/library/tax.php

2. FIND:

Code: Select all

if (isset($this->session->data['country_id']) && isset($this->session->data['zone_id'])) {
	$country_id = $this->session->data['country_id'];
	$zone_id = $this->session->data['zone_id'];
} else {
	$country_id = $this->config->get('config_country_id');
	$zone_id = $this->config->get('config_zone_id');
}
3. REPLACE WITH:

Code: Select all

if (isset($this->session->data['country_id']) && isset($this->session->data['zone_id'])) {
			$country_id = $this->session->data['country_id'];
			$zone_id = $this->session->data['zone_id'];
		} else {
			if ($this->config->get('config_tax')) {
				$country_id = $this->config->get('config_country_id');
				$zone_id = $this->config->get('config_zone_id');
			} else {
				$country_id = 0;
				$zone_id = 0;
			}
		}
4. EDIT: system/library/customer.php

5. FIND:

Code: Select all

public function logout() {  
6. AFTER, ADD:

Code: Select all

session_destroy();  

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat Jun 19, 2010 2:59 am

Updated the post above with the new fix that should shut everyone up for a while.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Sat Jun 19, 2010 4:18 am

Qphoria wrote:Updated the post above with the new fix that should shut everyone up for a while.
Thank you for you kind words ;)

Your not quit there yet Image

When I log in, as a customer with a Tax class different then the default one of the Store/Item, it will change Tax class only after I add an item to the cart and choose Checkout.
Before it will show prices with the default Store/Item Tax.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Sat Jun 19, 2010 4:26 am

i2Paq wrote:
Qphoria wrote:Updated the post above with the new fix that should shut everyone up for a while.
Thank you for you kind words ;)

Your not quit there yet Image

When I log in, as a customer with a Tax class different then the default one of the Store/Item, it will change Tax class only after I add an item to the cart and choose Checkout.
Before it will show prices with the default Store/Item Tax.
You mean if you have "display prices with tax" set to YES correct?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Sat Jun 19, 2010 4:28 am

Qphoria wrote:You mean if you have "display prices with tax" set to YES correct?
Correct.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Sat Jun 19, 2010 4:32 am

Be sure you made all the changes above, including the change in the tax file.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Sat Jun 19, 2010 5:02 am

Qphoria wrote:Be sure you made all the changes above, including the change in the tax file.
Looking at the system/library/tax.php from the 1.4.8b patch I see:

Code: Select all

if (isset($this->session->data['country_id']) && isset($this->session->data['zone_id'])) {
			$country_id = $this->session->data['country_id'];
			$zone_id = $this->session->data['zone_id'];
		} else {
			if ($this->config->get('config_tax')) {
				$country_id = $this->config->get('config_country_id');
				$zone_id = $this->config->get('config_zone_id');
			} else {
				$country_id = 0;
				$zone_id = 0;
			}
		}		
That differs from that what you posted in #2, it looks like a combination of those 2.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Sat Jun 19, 2010 5:05 am

correct.. replace that chunk with the above

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by i2Paq » Sat Jun 19, 2010 5:08 am

Qphoria wrote:correct.. replace that chunk with the above
Edit:
I replaced mine part with the one from #2, Tax stopped working completely.
It only shows tax on the checkout page when logged on, otherwise it is without tax.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by adrunkentheory » Sat Jun 19, 2010 3:29 pm

Where is this setting... Display Prices with Tax?
Qphoria wrote:
i2Paq wrote:
Qphoria wrote:Updated the post above with the new fix that should shut everyone up for a while.
Thank you for you kind words ;)

Your not quit there yet Image

When I log in, as a customer with a Tax class different then the default one of the Store/Item, it will change Tax class only after I add an item to the cart and choose Checkout.
Before it will show prices with the default Store/Item Tax.
You mean if you have "display prices with tax" set to YES correct?

New member

Posts

Joined
Fri Apr 09, 2010 3:29 am

Post by i2Paq » Sat Jun 19, 2010 4:53 pm

adrunkentheory wrote:Where is this setting... Display Prices with Tax?
In the BO goto: System -> Settings -> Tab: Option -> Display Prices With Tax:

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by vkaltchev » Tue Jun 29, 2010 11:54 am

djcxm wrote:Tax Added and Showing Before Checkout
by djcxm » Fri Jun 11, 2010 7:27 am
Hi All,
I recently upgraded to 1.4.8 and the only mod I had installed was Options Plus.
Currently I am experiencing an issue in which after a product is added to the shopping cart.
The side shopping cart totals included Taxes prior to ever asking for the customers address which would trigger the geozone.
I have the same problem but only in the second store; my default store calculates the sales tax just fine. Can somebody please summarize what should I do to fix it. I read the discussion but there were a lot of corrections and going back and forth, so I am not sure what I should do and in what order.

Thanks for helping.
Cheers,
Valentina

New member

Posts

Joined
Fri Apr 16, 2010 11:02 am

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by kwasini » Sun Jul 11, 2010 11:26 am

I followed the fix provided by Qphoria, but I still have the same problem with the cart showing sales tax, which is set for NY only, when the customer adds an item to the shopping cart. The tax goes away when the customer keys in their non-New York address. I am not sure if the fix worked for others, but it has not worked in my case, provided I followed them correctly.

Newbie

Posts

Joined
Sun Jul 11, 2010 11:20 am

Post by i2Paq » Sun Jul 11, 2010 4:42 pm

Topic moved to Bug forum.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Moggin » Mon Jul 12, 2010 3:05 am

kwasini wrote:I followed the fix provided by Qphoria, but I still have the same problem with the cart showing sales tax, which is set for NY only, when the customer adds an item to the shopping cart. The tax goes away when the customer keys in their non-New York address. I am not sure if the fix worked for others, but it has not worked in my case, provided I followed them correctly.
Is the store set to 'Display tax= No' in the admin panel? ..I am no expert, but spent some time trying to achieve the opposite effect (show tax before shipping is known).

Active Member

Posts

Joined
Wed May 05, 2010 4:56 am

Post by kwasini » Mon Jul 12, 2010 1:22 pm

Moggin wrote:
kwasini wrote:I followed the fix provided by Qphoria, but I still have the same problem with the cart showing sales tax, which is set for NY only, when the customer adds an item to the shopping cart. The tax goes away when the customer keys in their non-New York address. I am not sure if the fix worked for others, but it has not worked in my case, provided I followed them correctly.
Is the store set to 'Display tax= No' in the admin panel? ..I am no expert, but spent some time trying to achieve the opposite effect (show tax before shipping is known).
Yes, I did set "Display tax=no" (and I also had on "yes" with similar results). I appreciate the help.

Newbie

Posts

Joined
Sun Jul 11, 2010 11:20 am

Post by vkaltchev » Wed Jul 14, 2010 5:12 am

I don't know what I did right or wrong but the Qphoria fix worked for me.

Valentina

New member

Posts

Joined
Fri Apr 16, 2010 11:02 am

Post by sds » Thu Sep 23, 2010 4:03 am

kwasini wrote:I followed the fix provided by Qphoria, but I still have the same problem with the cart showing sales tax, which is set for NY only, when the customer adds an item to the shopping cart. The tax goes away when the customer keys in their non-New York address. I am not sure if the fix worked for others, but it has not worked in my case, provided I followed them correctly.
:bash: What this guy said. I have 1.4.9 where this fix is already applied and the taxes will not go away until the customer types in his nontaxable address. Is this bug now considered "will not fix"?

sds
Newbie

Posts

Joined
Tue Sep 21, 2010 6:25 am
Who is online

Users browsing this forum: No registered users and 1 guest