I've used the Extra Fields Pane module (https://www.drupal.org/project/uc_extra_fields_pane) to create an extra field (VAT number) on the checkout form.
With taxes I want to create a conditional action, when the VAT number is filled in the Tax must not be applied. I can select the Extra Field in the Condintional Actions, but nothing happens.

I set up an action which checks if the field is empty or not. When it's empty the Tax must applied, otherwise it shouldn't be applied. But it doesn't seem to work.

I've set up the same action with a base ubercart field (company name or first name for example) and then the action does work. (when I change the postal code a ajax request is done)

I think the problem is that the check is done only once when the page is loaded. I want the CA to be checked again (with AJAX maybe?) so when the VAT field is filled in the Tax will be removed.

Can anyone help me out?

Comments

marcoh182 created an issue. See original summary.

marcom2021’s picture

Issue summary: View changes
marcom2021’s picture

Issue summary: View changes
TR’s picture

Category: Bug report » Support request

Conditional Actions are in D6, Rules are in D7. So do you mean CA/D6 or Rules/D7?

Regardless, I would recommend going about this in a more structured way, say by assigning a role to your tax-exempt users when they register, after collecting and verifying their VAT number. Then you can make your tax conditions based on the user role.

marcom2021’s picture

Sorry, I mean a setting up a condition with Rules. I'm afraid your solution won't work because users can check out anonymously and an account is created for them when they finish the order.

TR’s picture

So I would be able to checkout anonymously using someone else's VAT number to avoid paying tax? And your business isn't required to have documentation of customer's tax-exempt status for sales where you don't collect tax?

longwave’s picture

There is an EU-provided validation API to check VAT numbers but it is up to the store whether they choose to use it or just trust their customers.

Regardless, you should be able to handle this with the Ubercart Ajax Administration module. In the checkout settings there will be a new Ajax tab where you can set up triggers for form elements to refresh certain checkout panes - you will need to trigger the VAT field to update the payment pane.

marcom2021’s picture

It's not entirely anonymous. The same fields have to be filled in as when you register. You don't have to be logged in to place an order. When you're not logged in a user is made or the order is assigned to na existing user when the e-mailaddress exists.

marcom2021’s picture

I've used the VAT number module and the Ubercart Ajax Administrator to check the VAT numbers and update Taxes at checkout. Thank you.

longwave’s picture

Status: Active » Fixed

Thanks for the confirmation. Good to hear that the Ajax admin module works for your case, as it's quite an advanced feature and I think it's somewhat rarely used.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.