Hot answers tagged

3 votes
Accepted

Commerce: Remove tax adjuster from line item in plugin

There is a way to do this, obviously, it is worth noting that the code below is written to be easy to understand and could be improved. Also, it is worth noting that there are plenty of things to ...
nfourtythree's user avatar
3 votes

How can we use TaxJar with CraftCommerce?

The onBeforeSaveOrder event runs before all of the adjustments are calculated (including taxes), so it seems like that's what you're looking for.
Brad Bell's user avatar
  • 67.2k
2 votes
Accepted

How to get all available tax rates in a Commerce site?

Commerce 2 {% set allTaxRates = craft.commerce.taxRates.allTaxRates() %} {% for taxRate in allTaxRates %} {{ taxRate.name }}<br> {% endfor %} taxRate will be an instance of craft\commerce\...
Brad Bell's user avatar
  • 67.2k
2 votes

Craft Commerce payment gateway: general info requested

How far does Craft Commerce go when a user puts an order? When an order is paid in full it is marked as complete and gets a default order status that you can configure, after that a store admin ...
Luke Holder's user avatar
  • 6,767
2 votes
Accepted

Craft3, Plugin Craft Commerce, Tax without percentages

It's not currently possible to charge a fixed tax fee natively, it needs to be a percentage. You can however implement your own tax adjuster within a plugin or module, which is what Craft is doing ...
Matt Banner's user avatar
2 votes
Accepted

Tax validation in Craft Commerce

Probably best to just update the address business tax ID if it is in the wrong format automatically for them. Event::on(Order::class, Order::EVENT_BEFORE_SAVE, function(\craft\events\ModelEvent $event)...
Luke Holder's user avatar
  • 6,767
2 votes

Commerce: Remove tax adjuster from line item in plugin

@nfourtythree's answer was correct, but just for a 2nd example, here's what I ended up going with: use craft\commerce\Plugin; use craft\commerce\elements\Order; use craft\commerce\models\...
Ryan's user avatar
  • 1,942
1 vote
Accepted

Craft Commerce: discount taxation

Got to bottom of this - is down to how the Tax Rules are set-up. Taxable Subject was set to Line Item but should have been set to Order Total.
Cole Henley's user avatar
  • 1,741
1 vote

Craft Commerce multisite, different tax rates

As of Commerce 2.0, there is no support for multi-site apart from a product’s custom field information. A cart exists in the session, once per Craft installation, and there are not separate carts per ...
Luke Holder's user avatar
  • 6,767
1 vote

Craft Commerce Shipping Total Order Price rule

The current rule for the total in Commerce 1 is in craft/plugins/commerce/models/Commerce_ShippingRuleModel.php starting at line 214: if ($this->minTotal && $this->minTotal > $order-...
Luke Holder's user avatar
  • 6,767

Only top scored, non community-wiki answers of a minimum length are eligible