Local Pickup + TaxCloud = Wrong Tax Rate

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #164585

-- url of the page with the problem -- : www.littleapplewoodenpuzzles.com
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Any

An order (the very 1st order since the site launch just hours ago) came in with the situation outlined below.
Some how we missed this in all our 60+ test orders over the last 2 months.

Cart Configuration:
TaxCloud plugin is enabled.
Manual Shipping Method for "Local Pickup" is free ($0 cost) but limited to the Kansas (state) zone with an "Override shipping address" set to "Your Shop Address".

What happens when the Kansas based customer chooses a "Local Pickup" method:
TaxCloud is incorrectly using the original Kansas billing/shipping address that the customer entered (before shipping was presented/selected) for the tax rate lookup.

The correct tax rate should be that of the "Your Shop Address".

I cannot find a way to manually override the TaxCloud rate either using the Tax Zones.
But I'm not sure that is even possible with the TaxCloud plugin.

You can test this simply by using the following addresses:

309 Poplar St.
Wamego, KS 66547 (this will give you a 8.9% tax rate)

The correct tax rate should be 8.4% tax rate (for the Your Shop Address).

Is there any fix or work around that I'm missing?
I believe the TaxCloud plugin exclude usage of any of the tax zone rules.

I would think/hope that the logic should be that the TaxCloud should recognize the "Override shipping address" when set to Your Shop Address or at the very least the tax rules should be allowed to override TaxCloud in such a circumstance.

Thanks for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #164730

Hi,

That's a case we didn't thought about.
You'll have to add the code:

$app = JFactory::getApplication();
		$shipping_method = $app->getUserState(HIKASHOP_COMPONENT.'.shipping_method');
		if(empty($shipping_method))
			$shipping_method = array();
		if(!is_array($shipping_method))
			$shipping_method = array($shipping_method);

		$currentShipping = array();
		if(count($shipping_method)==1){
			foreach($shipping_method as $method){
				$method = explode('@',$method);
				$method = $method[0];
				$currentShipping[] = hikashop_import('hikashopshipping', $method);
			}
		}
		$override = false;
		foreach($currentShipping as $selectedMethod){
			if(!empty($selectedMethod) && method_exists($selectedMethod, 'getShippingAddress')) {
				$override = $selectedMethod->getShippingAddress();
			}
		}
		if($override){
			return false;
		}
after the line:
protected function loadAddress(){
in the file plugins/hikashop/taxcloud/taxcloud.php in order for taxcloud to ignore the tax calculations when the shipping address is overridden.

The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 14
10 years 4 months ago #164735

In the situation described, where the purchase is being picked up at the shop address, the shop address should be used to calculate the tax due. Tax calculation should still be sent to TaxCloud, but the destination address should be the shop address. The last post sounds like tax calculation would be skipped, rusulting in no tax collection - that would be bad.
B)


TaxCloud is the internet's only free sales tax service.
Learn more at taxcloud.com
Support available via service.taxcloud.net or by email to This email address is being protected from spambots. You need JavaScript enabled to view it.
Last edit: 10 years 4 months ago by TaxCloud.
The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #164746

I agree with TaxCloud on that part of it.

It might be better to use the address information that is entered in the TaxClould plugin for the tax rate .
In all my sites, that address will be the same as the vendor's address for pickup purposes..

TaxCloud might be able to back me up that assertion.
I'm sure there are some rare exceptions but I would think that would cover the majority of setups.

Last edit: 10 years 4 months ago by jazzmang.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #164749

Tax calculations by TaxCloud would indeed be skipped in that case.
But then, the HikaShop tax rules would be used instead so in most cases it would be easy to just create a simple tax rule in HikaShop in order to have HikaShop's default tax system to calculate the tax of the products. That would also allow the system to handle different tax rates for different pickup addresses by having several tax rules in HikaShop, while that wouldn't be possible with TaxCloud as there is only one shop address.
But I reckon that it's a good idea to have the possibility to still use the store address with TaxCloud in that case, and even have it as default as it's the most probable use case. We'll add an option in next release to be able to choose between one mode and the other.

The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 14
10 years 4 months ago #164784

If a merchant is using TaxCloud, then ALL transactions have to be sent to TaxCloud (even local pickup) so we can prepare complete and accurate sales tax returns. Skipping TaxCloud for local pickup would impede our service, and force the retailer into manually entering those skipped transactions into TaxCloud - if they don't, our filings will be incomplete.


TaxCloud is the internet's only free sales tax service.
Learn more at taxcloud.com
Support available via service.taxcloud.net or by email to This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #164809

I understand that. That's why I said that it will be an option to work one way or the other so that they can have all their transactions filled automatically, but also support multiple local pickups manually if they have to.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #165025

I'm trying this patch (client is fine with it not filing TaxCloud at this time).

However I cannot get a HikaShop tax rule to apply when choosing the local pickup shipping method.

it doesn't apply TaxCloud tax rate (good) if I pick the local pickup.

If I pick another shipping method (e.g. UPS), the TaxCloud rate is applied (good)

If I choose the local pickup (with shipping address overide); it doesn't apply any taxes to the order.

My Default tax category rule is as follows:



The Main tax zone is set to "United State of Americia)".

And the manual shipping setup for Local Pick up as the "Product tax category" set to "Default tax category" as are all products:


Any idea what am I missing to get the 8.4% tax to show up for only for local pickup method?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #165047

I guess that it's because your user address is not meant to be taxed as per your tax rules.

Here is a new version of the plugin which has that new option is was talking about:

File Attachment:

File Name: he572fca.zip
File Size:15 KB

You can install it and configure it to use the origin address if the shipping address if overridden.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #165061

This is basically the same set I use for non-Tax Cloud states that have 1 rate for the entire site.
The customer user's billing address is in Kansas; ore are you talking about some other user for the shopping cart?

Regardless I've tried the files you have - no change on the front end.
Still not charging a tax (TaxCloud or otherwise).

On the backend however, any time I try to access the TaxCloud plugin now I get:

Error
Error loading form file


In the web server logs I see:

[Tue Jul 22 18:48:38.287665 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t^ in /home/xyz/www/administrator/components/com_plugins/models/plugin.php on line 166, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303519 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): /home/xyz/www/plugins/hikashop/taxcloud/taxcloud.xml:34: parser error : Opening and ending tag mismatch: params line 16 and param in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303579 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t\t</param> in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303617 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t\t ^ in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303685 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): /home/xyz/www/plugins/hikashop/taxcloud/taxcloud.xml:39: parser error : Opening and ending tag mismatch: extension line 2 and params in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303721 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t</params> in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303755 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t ^ in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303817 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): /home/xyz/www/plugins/hikashop/taxcloud/taxcloud.xml:40: parser error : Extra content at the end of the document in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303859 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t<config> in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins
[Tue Jul 22 18:48:38.303892 2014] [:error] [pid 21512:tid 140096003081984] [client x.x.x.x:61556] PHP Warning: simplexml_load_file(): \t^ in /home/xyz/www/libraries/joomla/form/form.php on line 867, referer: www.littleapplewoodenpuzzles.com/adminis...plugins&view=plugins

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #165064

Note I upgrade the site to 2.3.2 this morning (fixed a few other minor issues we had).

So I don't know if the TaxCloud plugin error I'm seeing now was there before that.

I do know it wasn't under 2.3.1 but once it was setup, there was no reason to go back and check it either.

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
10 years 4 months ago #165119

Ok, please try with this package instead. There was a typo in the XML leading to these errors.
You need first to configure the option of the taxcloud plugin in order to see the change.

File Attachment:

File Name: h2c5de0e.zip
File Size:15 KB

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #165148

I tried that just now. That does fix the TaxCloud plugin form issue, thanks.

I do see the new setting and have set it to Yes:



And then I tried to place an order with the local pickup shipping method and still no taxes on the order. I can switch to one of the other shipping methods and the correct taxes show up just fine. No errors any where that I can find.

I also tried switching override to No in the plugin - still nothing (even with my tax rule).

When I unpublish the TaxCloud plugin, the HikaShop tax rule for KS works for every shipping method but the Local Pickup.

That pointed me to look at the manual shipping / Local Pickup with override closer. After playing around with TaxCloud turn off; I did manage to get taxes to show up eventually by:
  • Use price per product must be set to Yes - otherwise only the shipping cost was getting tax (0 x .084 = 0 or no tax)
  • Override shipping address has to be set to No (this was the key find)

The price per product makes sense I guess.

But override shipping address seems to be where the problem is.
Anything other than No and TaxCloud or not - it never charges taxes.

When Override shipping address to No even with Tax Cloud that is the only time it charges taxes (however at the wrong rate).

I confirmed this on my own internal test site/server which is actually running unmodified 2.3.1 version as well as the production site running 2.3.2.

So I think the issue might be more with the manual shipping method's override & taxes at this point.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 4 months ago #165163

On a side note, I found another bug related to TaxCloud.

When adding a new order on the backend (Orders -> New) I get a error but the order is created:



In the web log files, it points to an PHP error with the TaxCloud plugin:

[Wed Jul 23 10:00:53.205982 2014] [:error] [pid 20377:tid 140096061830912] [client x.x.x.x:32126] PHP Warning: Invalid argument supplied for foreach() in /home/xyz/www/plugins/hikashop/taxcloud/taxcloud.php on line 451, referer: www.littleapplewoodenpuzzles.com/adminis...ale&filter_partner=0
[Wed Jul 23 10:00:53.308593 2014] [core:error] [pid 20377:tid 140096061830912] [client x.x.x.x:32126] Invalid status line from script 'index.php': 0 SQL=, referer: www.littleapplewoodenpuzzles.com/adminis...ale&filter_partner=0


If the TaxCloud plugin is turned off, there is no error. I upgrade my internal test site to 2.3.2 but left the TaxCloud plugin alone but enabled and it has the same problem. I thought I'd just let me know.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 3 months ago #166063

Any update on either of the items I found?

Original issue still open and found two new related ones.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 2 months ago #169369

Just checking in again, if there is anything I can do to help let me know.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 2 months ago #170835

FYI nicolas, I sent you a private message with access details on Sept. 8th, 2014.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 1 month ago #173903

Did this get all addressed in 2.3.3?

I haven't had time to go back and check on this, but was curious.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 1 month ago #174126

Hi,

I am sorry but I don't understand your last message.

About the credentials, I can't tell you if Nicolas right received your message because there is no credentials attached to your issue ticket.
Please prefer using the "contact us" form instead of private message for Nicolas.
(And please, provide a link to this thread in order to help him to find which issue ticket update with the credentials).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
10 years 1 month ago #174131

I got an answer to my last question in another thread I read yesterday.
My understanding is 2.3.3 is just 2.3.2 with the security update.

So I'm assuming based on that this wasn't resolved in 2.3.3.
I asked because I manually applied the security patch.

I have sent the requested access information again, this time via the web contact form.

Let me know if anything else is needed.

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum