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

[5.x][4.x]: Improve setting amount when adding a donation line item in the CP #3781

Open
icreatestuff opened this issue Nov 21, 2024 · 3 comments
Labels
bug commerce4 Issues related to Commerce v4 Craft Commerce

Comments

@icreatestuff
Copy link

What happened?

Description

When adding a donation line item to an order from the control panel there is no option to set the donation amount, which then triggers an error preventing the order from being able to update on save.

Curiously you can set the quantity of donation line items to add, which presumably should only ever be a maximum of 1.

Steps to reproduce

  1. Enable donations
  2. Create an order
  3. Add the donation line item
  4. See the error about no Donation Amount set

Expected behavior

Adding a donation line item should allow setting the amount

Actual behavior

No amount field is visible when adding the donation line item, causing the amount to be set to 0 and therefore causing an error

Craft CMS version

Pro 4.13.0

Craft Commerce version

4.7.0

PHP version

8.1.29

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@icreatestuff icreatestuff added bug commerce4 Issues related to Commerce v4 Craft Commerce labels Nov 21, 2024
@nfourtythree nfourtythree self-assigned this Nov 22, 2024
@nfourtythree
Copy link
Contributor

Hi @icreatestuff

Thank you for your feedback.

It is possible to create an amount on a donation line item. It follows the same convention, technically, as it does when creating a donation from the front end. This is in the fact that it uses the donationAmount key in the line item options.

The video below shows how this is possible:

CleanShot.2024-11-22.at.08.29.42.mp4

We understand that this is not the most ideal way of managing this process. I will update this issue to be a feature request so this is something that we can look into improving in a future release of Commerce.

Thanks!

@nfourtythree nfourtythree removed their assignment Nov 22, 2024
@nfourtythree nfourtythree changed the title [4.x]: Adding a donation line item via control panel doesn't allow setting amount [5.x][4.x]: Improve setting amount when adding a donation line item in the CP Nov 22, 2024
@icreatestuff
Copy link
Author

Thanks @nfourtythree for the explanation and demo video. As a dev, having some understanding of the underlying architecture for how Commerce is working, I could just about work with that. For clients, this is too complex a process. Thanks for making this a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4 Craft Commerce
Projects
None yet
Development

No branches or pull requests

2 participants