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]: Donation not available #3818

Open
frederik-station opened this issue Dec 16, 2024 · 1 comment
Open

[5.x]: Donation not available #3818

frederik-station opened this issue Dec 16, 2024 · 1 comment

Comments

@frederik-station
Copy link

What happened?

Description

After upgrading from Craft 4, adding donations to the cart doesn't work anymore, neither in the frontend nor in the backend.

In the frontend, when I submit the the donation form to commerce/cart/update-cart nothing happens, the cart is still empty, also no error message.

In the backend it's also not possible to add a donation to an order via the "Add a line item" functionality on the order detail page. The donation line item cannot be selected and the "Available?" column has no checkmark. When the order site is not my primary site I don't even see the donation item in the list 🤔

I found that the "getIsAvailable" method on the Purchasable class returns false because in my database the column "inventoryTracked" of the commerce_purchasables_stores table contains "1" for the entry corresponding to the donation purchasable. Re-saving the donation settings through the backend also doesn't do anything because it skips the current (and in my case only) store when setting the default values.

Steps to reproduce

  1. Setup a Craft 4 project with donations
  2. Upgrade to Craft 5
  3. Try to add a donation to the cart

Expected behavior

After upgrading from Craft 4, it should still be possible to add a donation to the cart.

Actual behavior

It's not possible to add a donation to the cart.

Craft CMS version

5.5.6.1

Craft Commerce version

5.2.9

PHP version

8.2.26

Operating system and version

No response

Database type and version

MySQL 8.0.36

Image driver and version

No response

Installed plugins and versions

Copy link

linear bot commented Dec 16, 2024

@lukeholder lukeholder self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants