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

Custom adjusters in new/edit order #1460

Closed
samuelbirch opened this issue May 21, 2020 · 12 comments
Closed

Custom adjusters in new/edit order #1460

samuelbirch opened this issue May 21, 2020 · 12 comments
Assignees
Labels

Comments

@samuelbirch
Copy link
Contributor

samuelbirch commented May 21, 2020

Can the list of adjusters when editing/creating an order include any custom ones please?

I have a custom adjuster as part of my plugin which gets applied fine, but when editing the order the selecter for adjuster type is blank, which also means that it can't be manually choosen.

@lukeholder lukeholder self-assigned this Jun 1, 2020
@lukeholder
Copy link
Member

@samuelbirch sorry for the delay, what does your adjuster do? We don't support custom adjusters in Commerce 3 - Maybe we if we can understand your use-case we can find a solution.

Thanks

@lukeholder lukeholder added ℹ️ status: need more info When waiting for user to supply database or more information. and removed New labels Jun 3, 2020
@samuelbirch
Copy link
Contributor Author

Hey Luke,

I'm using the EVENT_REGISTER_ORDER_ADJUSTERS to register my custom adjuster. In my case the adjuster is used to change the price of a lineitem after the order has been completed as part of a workshop plugin i'm working on. It all works fine apart from when you view the order details, the adjuster type is visible on the lineitem but when you edit the lineitem the type dropdown just shows blank.
Screenshot 2020-06-03 at 11 50 09
Screenshot 2020-06-03 at 11 50 21

@samuelbirch
Copy link
Contributor Author

I noticed that the dropdown list in the vue component has been hard coded, would it be possible to populate it from a call to get all adjustment types or something?

@nfourtythree
Copy link
Contributor

Hi @samuelbirch

As @lukeholder mentioned custom adjuster types have been deprecated and they will be removed in the next major version of Commerce.

We have however just pushed an update that will show your custom adjuster type but all the fields will be read-only, again to discourage their use as they have been deprecated.

This update will be included in the next release.

Thanks.

@nfourtythree nfourtythree added 💡 enhancement Ideas and suggestions 📝 order edit and removed ℹ️ status: need more info When waiting for user to supply database or more information. labels Jun 10, 2020
@samuelbirch
Copy link
Contributor Author

@nfourtythree thanks for the update. So in the next major release custom adjusters are deprecated. Is there anything to take their place in terms of being able to do custom logic on an adjuster? - will there be an event that we can use?

@lukeholder
Copy link
Member

@samuelbirch please let us know your use cases and we can see what we can do or suggest.

@rbrv
Copy link

rbrv commented Jun 10, 2020

@lukeholder Off the top of my head, we are using custom adjusters for:

@nfourtythree
Copy link
Contributor

@samuelbirch custom adjusters will continue but not custom adjuster types. So you will still be able to create custom shipping, tax and discount adjusters.

We are currently looking into the options for further expanding the ability to make price adjustments to line items. So as Luke said, so if you can send across any particular use cases that would really help us.

Thanks.

@samuelbirch
Copy link
Contributor Author

@lukeholder, @nfourtythree no problem.

  • we have an order notes plugin where admin users can add certain note types that will affect the order price as well as lineitems. It can probably be achieved in commerce 3 now but the plugin gives an audit trail and user restrictions on note types. We use the custom adjuster to loop through any order notes and process as required by the type.

  • The workshop plugin as mentioned above, in this example a lineitem can have many workorders, each workorder has products assigned to it which affect the price of the lineitem in both a positive and negative way. This customer adjuster loops through the workorders on a lineitem and adds the itemised discounts (positive & negative) for each of the assigned products.

@nfourtythree as long as custom adjusters will continue then i think it'll still work ok. It'll be nice to be able to select a subtype maybe? - so that i could add a discount adjuster, but select it as a "workshop" one so we are not relying on staff to type the name in correctly. This would also help for displaying the information to the user and reporting. One thing i've always found is that it would be nice to show discounts to the user in a grouped way, so here are you standard discounts, here are your "workshop" adjustments, etc.

@samhibberd
Copy link

samhibberd commented Jun 12, 2020

We use custom adjusters a fair bit to make adjustments to the price either discounts / additions based on the order settings. We switched over to using just the first party types in advance of them being depreciated, but are yet to find a decent way to differentiate between a first party Discount adjustment and a custom Discount adjustment, thus allowing us to control how we display the different types of discounts to the customer on the front end.

@rbrv
Copy link

rbrv commented Jun 17, 2020

The container deposit I mentioned above is a custom adjuster type. This is a separate adjuster type as the products have taxes and discounts that must be displayed separately as well:

Screenshot 2020-06-17 at 11 24 35

@lenvanessen
Copy link

@nfourtythree @lukeholder not sure if it counts a "use case", but we're currently using the "custom" adjusters to credit single line items from a Order, so we can create a credit PDF.

But the be honest, this is better solved by using a RMA, which is also an open ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants