Skip to content

Voucher payment method available for mix of products #891

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

Open
Quazz opened this issue Apr 30, 2025 · 2 comments
Open

Voucher payment method available for mix of products #891

Quazz opened this issue Apr 30, 2025 · 2 comments
Assignees
Labels
Fixed and planned for next release Fix will be included in the next release.

Comments

@Quazz
Copy link

Quazz commented Apr 30, 2025

Describe the bug
Let's say you want to accept Ecocheques as payment method. You have a custom attribute with drop down values for each of the voucher types. When you have a mix of products with 'none' and 'eco', the Voucher payment method is shown despite full payment not being possible for the quote.

Used versions

  • Magento Version number(eg 2.3.5): 2.4.7-p3
  • Open source/Enterprise/B2b: Open source
  • Mollie version number (Check configuration): 2.45.0

To Reproduce
Steps to reproduce the behavior:

  1. Configure a custom attribute called voucher_type and add the voucher type dropdown values to possible values
  2. Add the attribute to the relevant attribute sets
  3. Configure voucher type payment method to use custom attribute and select voucher type attribute.
  4. Configure a product with 'eco' voucher type drop down value.
  5. Configure a different product with 'none' voucher type drop down value.
  6. Go to the frontend and create a cart with both products.
  7. Proceed to checkout.

Expected behavior
When checkout is reached, we expect the voucher payment method to not show.

Actual behavior
Voucher payment method shows

Additional context
I believe the issue is caused here:

return count($itemsWithCategories);

return count($itemsWithCategories);

Should likely be changed to:

return count($itemsWithCategories) === count($cart->getItems());

michielgerritsen added a commit to michielgerritsen/mollie-magento2 that referenced this issue May 8, 2025
@Frank-Magmodules
Copy link
Collaborator

Hi @Quazz,
Thanks for opening this issue!
We’ve prepared a PR that should address it: #895

Could you please take a look and let us know if it meets your needs?

Thanks a lot!

@Frank-Magmodules Frank-Magmodules added the Fixed and planned for next release Fix will be included in the next release. label May 9, 2025
@Quazz
Copy link
Author

Quazz commented May 12, 2025

@Frank-Magmodules Yes, that seems to work as expected, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed and planned for next release Fix will be included in the next release.
Projects
None yet
Development

No branches or pull requests

2 participants