Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAT check and AJAX #15

Open
samikeijonen opened this issue Jan 12, 2015 · 8 comments
Open

VAT check and AJAX #15

samikeijonen opened this issue Jan 12, 2015 · 8 comments

Comments

@samikeijonen
Copy link
Contributor

It would be cool if user enters valid VAT number and couple of things would happen in AJAX way.

  1. Tax would go back to zero and purchase price would be without tax. Now user is kind of uncertain do I get the product without tax. They only see it after purchase.
  2. Some kind of green check mark inside VAT number input field when VAT number is valid.
@dannyvankooten
Copy link

I might have some code to throw in for this - have a look at my checkout for example (scroll down, switch to an EU country & the VAT field will appear). Will get back on this.

@samikeijonen
Copy link
Contributor Author

Cool! I'd like to use tick.png from EDD core same way as in Credit Card check.

@dannyvankooten are you using Taxamo API for checking VAT number? That's what I was original thinking because we're already using their API.

@rhyswynne
Copy link
Owner

I would be incredibly curious to see how this work (and feel it's needed). The VAT check is using Taxamo's own API, which returns a JSON array. One of the fields is a buyer_tax_number_valid, which is a boolean check we can use to change how this is structured. I'm sure @dannyvankooten's code can be modified to check for that field instead.

Must admit I cannot AJAXify my way out of wet paper bag, so must admit I probably won't be much help, but happy to assist wherever you need :).

@samikeijonen
Copy link
Contributor Author

I have done AJAX stuff only couple of times but I can give it a shot at some point. Like I said vatinfoeu plugin also have really cool AJAX stuff added. So we can learn from there.

@NateWr
Copy link
Contributor

NateWr commented Feb 1, 2015

I'd love to see what @dannyvankooten comes up with, but hit me up if you need any help on this front. I noticed this on the Javascript API documentation for Taxamo.

taxamo-js-api-domains

For that reason, it's probably better to hit wp_ajax and make the request from the PHP code. It won't be quite as snappy, though. The alternative is to make shop owners opt-in to the live check, and inform them of the settings change they need to make at Taxamo.

@samikeijonen
Copy link
Contributor Author

This would be awesome either way.

@samikeijonen
Copy link
Contributor Author

Any news or updates on this one?

@rhyswynne
Copy link
Owner

Hi,

I've a few other priorities than this bug, sorry, so not sure when I'll get around to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants