Giter VIP home page Giter VIP logo

Comments (5)

curtismorte avatar curtismorte commented on August 17, 2024

I wanted to pose this as a discussion to get your thoughts. There is a likely hood that we'll be able to help facilitate a PR for this.

Before any of that though, having some dialog with you all first would help.

from craft-avatax.

imagehat avatar imagehat commented on August 17, 2024

@curtismorte - tax calculation should only happen once there is a shipping address and at least one line item in the cart, and the response is cached until something else changes again (quantity, address, shipping method, etc) so there shouldn't be too many roundtrip requests to the Avatax API already hopefully.

That said for your use case would something like a hidden form attribute that overrides the plugin's tax calculation setting for just the current cart update form help?

Maybe something like:

<input type="hidden" name="avatax_disable_tax_calclution" value="1">

or

<input type="hidden" name="avatax_force_tax_calculation" value="1">

from craft-avatax.

curtismorte avatar curtismorte commented on August 17, 2024

@imagehat that solution would be ideal because it allow us to specify when to submit for calculation.

You have outlined how tax calculation is completed. The e-commerce setup I am working on right now has hundreds of SKUs where purchasing a single SKU is a rare use case and purchasing multiple SKUs that are related is more common. We have a "Catalog" page that groups SKUs together and the user can very quickly select how many quantities of each SKU they need. Think of this as a page that allows you to purchase individual Lego pieces where you need to purchase 10+ pieces for your order to be "meaningful" to you.

We're using Sprig, so each SKU specification causes the cart to be updated which ultimately causes Tax validation to be run frequently for any returning customer (since they have a saved address).

This is not a common use case, but is one that is critical to the way we are operating.

from craft-avatax.

imagehat avatar imagehat commented on August 17, 2024

@curtismorte - That makes sense, and I think it will be pretty easy to add the check for those params. I'll take a look and let you know.

from craft-avatax.

Mosnar avatar Mosnar commented on August 17, 2024

Correct me if I'm wrong, but it seems like it may be a good idea to require this parameter to be passed through with a security hash to avoid bypassing taxes.

from craft-avatax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.