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

[Question] Tax and Shipping plugins/integrations #261

Closed
AshotN opened this issue Feb 11, 2020 · 6 comments
Closed

[Question] Tax and Shipping plugins/integrations #261

AshotN opened this issue Feb 11, 2020 · 6 comments

Comments

@AshotN
Copy link

AshotN commented Feb 11, 2020

I've tried looking around the documentation. But I can't seem to see a way to integrate with sales tax calculator, or a shipping calculator. Is there any such plugins currently?

I was hoping to at least find an NPM package and follow the documentation for making a plugin. But UPS has really crappy documentation so it'll be a mission.

@michaelbromley
Copy link
Member

Hi,

So for shipping, you need to implement a ShippingCalculator and add that to your VendureConfig object in the ShippingOptions. You can use the default shipping calculator as a guide.

There are currently no ready-made plugins at this point. Crappy API documentation from shipping providers is unfortunately a universal truth. Hopefully you don't need to use XML 😅.

Likewise for taxes, you can define your own TaxCalculationStrategy, see the default strategy as an example. Unfortunately the major limitation at this time is that the calculation function is synchronous, so if you want to call out to an external API you'll have trouble. I plan on making async possible in a future release.

@AshotN
Copy link
Author

AshotN commented Feb 11, 2020

Alright, I'll probably try to see if I can integrate the tax calculator first as there are decent APIs for that. Granted they are paid but no real choice for that.

A couple things I've got a few more questions about but I don't want to spam a bunch of issues.

I can't seem to find a way to delete Tax categories/rates, and same with shipping methods. I tried deleting them from the SQL database, it worked but caused some issues with the default products, I assume some relation is messed up now.

Also, I'm in the US and typically we don't have the tax included in the price which Vendure seems be doing. Is there an option to list the price and tax separately? This may be out of scope, since I haven't dived into the Diety code.

Sorry for the barrage of questions, but a business I started work for has their own custom eCommerce system, and it's an absolute mess. I wanted to replace it and hopefully transfer their existing data.

@michaelbromley
Copy link
Member

Hey, no problem with the Qs, but a better venue to ask is our slack workspace.

I can't seem to find a way to delete Tax categories/rates, and same with shipping methods. I tried deleting them from the SQL database, it worked but caused some issues with the default products, I assume some relation is messed up now.

Yep, this is missing from the UI right now. Please create a separate issue and I may be able to work that in to the next release.

Also, I'm in the US and typically we don't have the tax included in the price which Vendure seems be doing. Is there an option to list the price and tax separately? This may be out of scope, since I haven't dived into the Diety code.

There is an option in the Channel detail page "Prices include tax for the default Zone" - check that, it should be switched off in your case. If this is the case, then both the price with and without tax is available via the Shop API:

query {
  products(options: { take: 3 }) {
    items {
      id
      variants {
        price
        priceWithTax
        priceIncludesTax
      }
    }
  }
}

@AshotN
Copy link
Author

AshotN commented Feb 11, 2020

I'll hop on slack, I think I have an account.

I'll create a separate issue for the missing UI elements.

I'll leave this issue open until either I or anyone else creates some sort of plugin to interface with tax/shipping services.

@chanmathew
Copy link

May I suggest a Taxjar integration at some point? It’s been amazing with our store and super user friendly.

@michaelbromley
Copy link
Member

Closing in favour of #307

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

3 participants