Tax Exemptions for some Customers (USA)

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288005

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.5
-- PHP version -- : 5.6.30
-- Browser(s) name and version -- : Firefox 58.0.1

Hello,

I have encountered a problem after running a shop for some time now. Occasionally, there are customers who have a tax exempt status. Is it possible to use a condition to remove taxes on a shopping cart?

I am using TaxCloud to calculate taxes. I have custom fields created - one asks yes/no for tax exempt; if yes, a new field displays to upload the certificate and/or enter the tax ID. This all works great.

The issue is I cannot figure out how to use these fields to change the taxes being applied to the cart. I have read some old forum threads (5 years ago and 2 years ago) that did not really lead to a solution. There were also suggestions for VAT to default customers to no tax and then apply it to users, or manually set users into different user groups. I don't know if that is practical or possible for US-based commerce that doesn't use VAT.

I attempted to make this work using a combination of tax categories, tax zones, and payment gateway restrictions, but it wasn't yielding any result.

Is it possible to do this? If so, how can it be configured? If not, what would you suggest as a way to handle these customers?

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288015

Hi,

If you use TaxCloud, then it's the TaxCloud plugin which automatically get the tax amounts based on the data in the cart from TaxCloud web services.
So one way you could do it is this:
- create a custom user field to ask if the user is exempt or not, and as values of each choice, enter the id of the user group you want for the user after the registration
- in the HikaShop configuration, select your custom field in the "User group on registration" setting.
- configure the "access level" setting of the TaxCloud plugin so that it won't run for the user group of customers being tax exempt.
That way, when someone registers as tax exempt, they will be in a special user group, which will lead in the taxcloud not being triggered and thus no tax will apply.

The following user(s) said Thank You: itsyourit

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288037

Thank you for the reply.

The only way to do this while using TaxCloud is to set users into a group, then adjust the access level of TaxCloud plugin so it doesn't run?

Many users already have user accounts, as the website is a membership organization. I suppose we will have to ask users to contact so that they can be added to this tax exempt group. I can use your suggestions for new registrations, at least.

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288044

Hi,

Since the TaxCloud API doesn't have "tax exempt" field as far as I know that's indeed the only solution I can see.

The following user(s) said Thank You: itsyourit

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288334

Hi Nicolas, I think this does not work very well. I was able to get it partially working, but for now it seems we may have to handle exempt customer orders manually.

If you have more suggestions I'm happy to try, otherwise hopefully this feedback is at least useful in case you consider expanding tax exempt options in HikaShop.

  1. I created the User Group "Tax Exempt" to place tax exempt users into it at registration, using the "user group on registration" setting of HikaShop configuration.
  2. I set up the custom field, a single dropdown asking about exemption status - yes and no options that mapped to the "Tax Exempt" group and the standard "Registered" group.

When I went to the TaxCloud plugin to adjust access levels, I realized I also had to create a new Joomla Access Level, since the plugin access is based on that and not user groups. Since access works from inclusion and not exclusion, I named the access level "Taxed Users" and granted all user groups access except the "Tax Exempt" group. This means the plugin will be allowed for all groups except the exempt group.

To test, I went to the store, added some products and went to checkout.
  1. I signed up and chose the option "yes" for exempt status. The tax on products seemed to be 0, which is great.
  2. There was still tax being charged, I figured out it is being charged for the shipping cost.
  3. Tried to correct this using my own thoughts and some from this old forum post .
  4. I created a tax category "Tax Exempt" and tax rate of 0%. Using these, I created a tax rule also, set the access level (which seems to display user groups?) only for "Tax Exempt".
  5. On Shipping Methods, I edited the normal method (USPS) to custom access level (again, seems to be user groups?) selecting all but "Tax Exempt" to hide this method from exempt users.
  6. On Shipping Methods, I created a copy of my normal method, but set the access level to "Tax Exempt" as only selection. I also chose the "Tax Exempt" category for "Product tax category" in the Generic configuration for the shipping method.
Unfortunately, none of this seemed to have any effect on the tax applied to shipping in the cart. I read that TaxCloud plugin will use the TIC and override HikaShop calculations , but if the plugin is not triggered (not applying on products) it shouldn't be running. Maybe there is code that will fix that part.

The other concern: for this case, I just need to stop the plugin for users belonging that one group, rather than allow it for the other groups. This is important because the users can belong to multiple groups - for example there would be two users - both in the members group. One would also be in the Tax Exempt group.

It seems that the TaxCloud plugin still doesn't run as long as a user is in the exempt group, among any other groups, which is good. But the shipping methods both display, and the second (tax exempt) set of USPS options have different prices - almost but not quite double.

Attachments:
Last edit: 2 years 5 months ago by itsyourit.

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288339

Hi,

I don't understand why you had to do all that for the shipping methods.
If the TaxCloud plugin is not adding the taxes for the products, then it shouldn't either for the shipping methods.
To test that, disable the TaxCloud plugin completely.
If you see no taxes on the products but taxes on the shipping method, then it means that you have tax rules configured in the menu System>Taxes to add taxes to the shipping/products when TaxCloud is not adding them and you shouldn't have them.
So then, disable the tax rules, enable back the TaxCloud plugin and it should work like you want.
If you see no taxes when you disable the TaxCloud plugin, then it would indicate that the TaxCloud plugin would be triggered even though its access says that it shouldn't. So I don't understand why it would do it for the shipping and not the products in that case.

The following user(s) said Thank You: itsyourit

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288412

Thanks for the suggestions about testing by just turning things on & off.

Edit: I realized my testing was not accurate because I was using a shipping address that was in a county exempt to sales tax on clothing. I have adjusted and using a better address to test.

Here are my findings:

Default rule unpublished + TaxCloud plugin unpublished: No tax at all
Default rule published + TaxCloud plugin unpublished: Default tax on both product & shipping
Default rule published + TaxCloud plugin published (user in normal member group): TaxCloud tax on both
Default rule published + TaxCloud plugin published (user in exempt group): TaxCloud tax on both
Default rule unpublished + TaxCloud plugin published (user in exempt group): TaxCloud tax on both

As long as the TaxCloud plugin is published, that's what is being used, which is good. I suppose that suggests my logic for allowing access to it for all but the exempt group is incorrect.

The plugin "Access" setting is a choice from Joomla Access Levels and allows for the level chosen. I set it to "Taxed Users" which is a new access level I created, and set all user groups to that level except my Tax Exempt group. I then put users into this tax exempt group.

This seems like it should work, but it's not. Any ideas?

Last edit: 2 years 5 months ago by itsyourit.

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288423

Ok, some further trial & error suggests that as long as the access levels and groups are set up correctly, it will work. I'm just not sure how to get the access configured.

I moved the "tax exempt" group from sub-group of "Registered" to "Public" and the taxes disappeared from checkout. But so did the log out button and other parts of the site. The exempt group was no longer considered a registered user, so that won't work. In addition, I tested this configuration but put the user into multiple groups - Exempt group, as well as the registered and member groups. The plugin still ran, because those groups do have access to run the plugin.

User Groups:

Public
- Guest
- Manager
- - Administrator
- Registered
- - Author (editor, publisher)
- - Member
- - Tax Exempt
- Super Users

Access Levels:

Level name| Groups having access
Public| Public
Members Only| Member, Administrator, Super Users
Moderator| Manager, Administrator
Taxed Users| Administrator, Author, Editor, Manager, Member, Publisher, Registered, Super Users
Guest| Guest
Registered| Registered, Manager, Super Users
Special| Administrator, Author, Editor, Manager, Publisher, Super Users
Super Users| Super Users

TaxCloud Plugin access level: Taxed Users

Wouldn't that mean it would run for every group except Tax Exempt? With that setup, it runs even if the user is only in the exempt group. Presumably because it's a child of the Registered group? I suppose I could make a second "taxable" group and set everyone into that? I'll give it a try..

Last edit: 2 years 5 months ago by itsyourit.

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288426

- configure the "access level" setting of the TaxCloud plugin so that it won't run for the user group of customers being tax exempt.
That way, when someone registers as tax exempt, they will be in a special user group, which will lead in the taxcloud not being triggered and thus no tax will apply.


Ok, this might be enough. That last thought I had seems to work. It's similar to what you said, but it has to be configured so that it does run for the regular users, rather than stop it from running for the exempt users. It's just annoying because the exempt set is the smaller group.

In the end, here's what is working enough for me:

  1. Create two user groups "Taxable" and "Tax Exempt" each with "Registered" as the parent group. The logic of course being that everyone with an account will be placed into one or the other. In theory, you don't even need the "Tax Exempt" group.
  2. Create one new Access Level, called "Taxed Users" and assigned access to the new "Taxable" group.
  3. In the HikaShop TaxCloud plugin, set the access level to "Taxed Users"
  4. Unpublish any/all of the rules in HikaShop's Taxes menu (System -> Taxes)
  5. Assign the users to the appropriate groups.

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288428

Sorry for the quadruple(!) post - figuring out things on my own and documenting it for posterity..

Is there a way to use the custom field and "User group on registration" setting to place users in multiple groups? (i.e. registered and taxable, or registered and tax exempt)

I tested a new user checkout and it worked well, but the user is not in the "registered" group. I realize it is the parent of their assigned group, but I'd like to have them in both.

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288460

Hi,

Yes, you can have users in several groups with the "User group on registration" setting and a custom field.
For that in the values of the custom field, instead of using only the id of a user group, you can enter the id of several user groups separated by a comma. The system will automatically add the new users to each of these groups.

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288535

Nicolas, thanks for your continued support.

I tried this and tested a registration. It did not put the user into both groups, only the group of the first ID entered.

Tested the values separated by a comma with and without a space (for example 2,22 and 2, 22). The user only was placed in group 2.

Does the field type matter? I am using a Single Dropdown. 22 is the new group for taxable users, 21 is for exempt users.

Attachments:

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288542

Hi,

I had a look and actually the system was made to only handle several user groups selected in the custom field by the customer but not several fields directly in one value.
You'll have to add the code:

foreach($field->field_value as $key => $val) {
							$groups = explode(',', $key);
							foreach($groups as $group){
								$field->field_value[$key] = $key;
							}
						}
before the code:
if(isset($$variable->{$field->field_namekey})){
in the file administrator/components/com_hikashop/classes/user.php
We'll add that on our end too to be able to support that in the future.

The following user(s) said Thank You: itsyourit

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288661

Nicolas,

I made the edit and tested a couple registrations. It still is only placing users into the group that matches the first value. Any ideas?

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

  • Posts: 70141
  • Thank you received: 10500
  • MODERATOR
2 years 5 months ago #288709

Sorry, I was a bit too fast.
The line:

$field->field_value[$key] = $key;
should actually be:
$field->field_value[$group] = $group;

The following user(s) said Thank You: itsyourit

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

  • Posts: 27
  • Thank you received: 2
2 years 5 months ago #288731

Nicolas, I tested this change and it works great. Thank you!

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

Time to create page: 0.100 seconds
Powered by Kunena Forum