1

We're building out a Commerce site that needs an "Insurance" option set on an order. Based on the selected option, a percentage of the subtotal should be added to the total amount in the cart.

I've added an adjuster for this, added a field to the order to keep track of which option the customer selects and I can add the adjuster to the order (as in: the type & amount are added to the cart in the backend).

But it seems I can't add that amount to the cart total. In the docs I found this:

Included Adjustments

If you mark the adjustment model’s included attribute as true, the adjustment does not make any changes to the orders value, but simply records an amount that was included in the price of the order.

The only included adjustment we use in the core system at the moment is included taxes.

Is there a way do this?

Thanks!

2
  • Can you post your adjuster class? Nov 6, 2017 at 10:19
  • 1
    You need to make sure you modify one of the adjustable values on the order? craftcommerce.com/docs/adjusters#adjustable-values Your adjuster needs to return the adjustment model as well as modifying tan value on the order like order.baseDiscount. Nov 6, 2017 at 10:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.