Skip to main content

Questions tagged [adjusters]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Rounding Total Price Adjuster Commerce not working correctly

I have this adjuster which should round prices to the nearest 5 decimal. I am pretty sure it had been working, and now it does not anymore. I tried to debug, but I don't find the error. In my commerce ...
Henrik's user avatar
  • 425
1 vote
1 answer
47 views

How to get category id of lineItem to use in commerce adjuster

I want to add an adjustment to a product in the basket via an adjuster, only when the product has certain categories. (10% off if there are more than 6 same items in the basket. It's not possible to ...
Henrik's user avatar
  • 425
1 vote
1 answer
94 views

How To Designate Adjuster on Order Only

Registering like so and all is well. Event::on( OrderAdjustments::class, OrderAdjustments::EVENT_REGISTER_ORDER_ADJUSTERS, function(RegisterComponentTypesEvent $event) { $event->...
Steve Mock's user avatar
2 votes
0 answers
142 views

Commerce shipping tax rate based on tax rate of line items

I have a shop with products that have 6% VAT & products with 21% VAT. The VAT rate that is applied to the shipping cost should depend on the VAT rate of the line item with the highest subtotal (...
Fred's user avatar
  • 21
1 vote
1 answer
81 views

Craft Commerce: Replacing Adjuster causes error "Something changed with the order before payment, please review your order and submit payment again."

In a current project we need more complex logic to determine when to set the VAT to 0%, so we do this with an adjuster added through a module. We are using the exact method described on https://...
Roy Baijens's user avatar
1 vote
1 answer
164 views

Can't register custom adjuster with Craft CMS commerce

following https://craftcms.com/docs/commerce/3.x/extend/adjusters.html#writing-an-adjuster I am trying to make a custom adjuster: I placed class myPlugin extends Plugin{ Event::on( ...
Steven Zhang's user avatar
1 vote
1 answer
190 views

Module: adding amounts to total item price, based on chosen option (e.g. giftWrapped)

I made a module, which should add an amount to an item, based on the chosen option. For example, if user checks "gift wrapped" 5$ gets added, if "Gift wrapped with Card" is chosen, ...
Henrik's user avatar
  • 425
1 vote
1 answer
154 views

Free shipping discount on whole order doesn't appear as adjustment

TL;DR : Free shipping on order discounts don't appear as a discount (or any type of) adjuster. So how do I check if a free shipping discount has been applied? Sorry for the long post - hopefully it ...
Emily Fitton's user avatar
1 vote
2 answers
420 views

Commerce: Remove tax adjuster from line item in plugin

I need to remove adjusters from each line item if a certain condition is not met. I see that in the CP you can manually remove them by editing the line item but hunting down this code in Commerce's ...
Ryan's user avatar
  • 1,962
1 vote
0 answers
69 views

Looping over categories, product variants, and subsequently applying adjuster(s)?

Using the Craft 3 and Commerce 2 APIs, how would one go about looping through products in the cart to apply adjusters, looking at the following example; A category, "Product Packs" is set up where ...
Anders's user avatar
  • 652
2 votes
1 answer
381 views

Check for whole cart adjustment and apply line item discount

I'm writing a custom plugin for a customer that does 2 things. Uses prices from Pricing Categories. There are 10,000 digital products, so adjusting prices for large quantities is cumbersome on a per-...
Marc Miller's user avatar
1 vote
2 answers
192 views

Tax Exempt Adjuster

I'm attempting to add a very basic tax adjuster to specific users based on a custom lightswitch field. I currently have a simple plugin with two classes for the plugin and adjuster that mirror the ...
Brad Lilley's user avatar
2 votes
1 answer
443 views

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

Is there a way to retrieve and loop through all the available tax rates that have been set up in Commerce 1? I had thought I could loop through the adjusters like so; {% for adjustment in cart....
foamcow's user avatar
  • 2,029
1 vote
0 answers
325 views

Include adjusters in order total

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 ...
Jan Henckens's user avatar
1 vote
1 answer
147 views

Shipping Adjustment not being added to Total Price

I have an adjuster that calculates shipping cost which I can see when I view the order in the backend. The problem is that the shipping adjustment is not being added to the total price. Any help would ...
Mouse's user avatar
  • 53
1 vote
1 answer
497 views

Problem with Adjuster plugin Class not found

I'm basically having this problem Getting started with Order Adjuster plugin I have the file plugins/carbonbalance/carbonBalancePlugin.php containing; <?php namespace Craft; Craft::import('...
foamcow's user avatar
  • 2,029
1 vote
1 answer
119 views

Add Adjuster after Order is completed?

I need to add an adjuster after the order is completed, but can't get it working. The reason is that the customer can order a individual picture, after that he get's a preview of the picture where ...
phaetons's user avatar
  • 705
1 vote
1 answer
127 views

Can a plugin manually raise another plugin's Event?

I have created an Adjuster which is attached to commerce_lineItems.onPopulateLineItem. The discount criteria is based on validation of a completely separate coupon API, so I created a permission-less ...
casey's user avatar
  • 447
1 vote
2 answers
477 views

Adjusters: Conditionally include tax in price

I have a question about adjusters: I am working on a shop which has two tax zones (Switzerland and EU) and two tax rates (8% and 19%). The tax should always be included in the item price. From my ...
Marcus Scheller's user avatar
3 votes
2 answers
832 views

Getting started with Order Adjuster plugin

Starting with the Business Logic plugin from https://github.com/lindseydiloreto/craft-businesslogic I'm following 3 for 2 etc with Craft Commerce to get started. I have my main plugin file containing:...
Clive Portman's user avatar
2 votes
1 answer
514 views

Commerce: How do I use an adjustor for line items?

I have built a plugin that, TL;DR subtracts credits. Everything is working great - until I actually need to change the price. I just flat-out don't understand it. This is how I am looping through ...
Damon's user avatar
  • 4,706