How to use donations as an additional item in a typical e-commerce setup

Created on 17 October 2023, about 1 year ago

Hello, I'm trying to use this module in a Drupal 10 installation.
My purpose is to add a "Donations" page to a commerce store, where other products will also exist.
I have followed the instructions from the Donation settings pages, creating the donation flow using the donation_multistep_flow and adding the "Add Donation" pane in the first step of the flow, just before the Donation step.

After this, my objective was to add some sort of "Donation" block to the Donations page of the site, allowing the customer to choose the amount he wants to donate and that it would add to the cart as if it was a product and then let him pay it at the checkout as a regular commerce product.

But when I tried to add the "Donations" block (which was showing on the blocks section) I get the message saying that this only works with the /donate option, if donations are the only e-commerce.
I'm guessing that in order to use this other option I should complete some extra step that I'm not sure about.
I tried to see if I could "add a product" at the commerce store and somehow there it would allow me to select the option that the product would be just a donation type, or if there is any other way to just add a donation block in a page of the site following this method, but I couldn't find my way out.

I would like to know if somebody could let me know what should I do to use this module to add some kind of "donations block" to a page following the option to have both the donations and regular commerce products at the store after I have already set up the checkout flow following the instructions at the "Donations settings" page.

Thank you in advance.

πŸ’¬ Support request
Status

Active

Version

1.1

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dexter23
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    I've steadily been adding support for this use case, as it's common but not the context of my original case. We will need to extend the two blocks to check commerce_donation_flow.settings and create the proper OrderItem type. I can give you some pointers if you are up for contributing or I'll get to this as soon as I can.

    In the meantime the only integration with a typical commerce flow is to add a donation as part of checkout.

  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
  • Hello, I would really like to help contributing with this but I don't think I have the knowledge enough to be able to achieve something like this. If it was something simple to do I could give it a try and see if I can figure out, but I guess it's gonna be something more complicated to do.

    I think I just got this wrong, because when I installed the module I thought that the option that I have choosen would mean that I could create the donation as a different product within the store. But what is the way for this option to work then? Where should the donation option show if I choose to have it as an additional item in the commerce setup? It would just show at the checkout page if somebody is purchasing some other items or it would be possible to just display it even if they don't buy any other items at the store? Is there any instructions about this?

    Would be any other approach to use this module to have the donation option at the same time that I keep the commerce module to sell different products or this option is not possible?

    Thank you for the module and your reply

  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    It is possible. We don't use Products and Variations because it's more complex that we needed. OrderItems are also a PurchaseableEntity in Commerce's data model so that's what we use to model the donation. Currently the only thing built out for a "mixed" model of products and donations is to add a donation in checkout. Checking the box added to the first checkout step triggers the creation of the donation OrderItem and makes the panes visible to collect the needed data.

    We can do it in a more "add to cart" way but this was the easiest first step extending what we already had.

  • Status changed to Active about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
  • Status changed to Postponed about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
  • Status changed to Closed: works as designed 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
Production build 0.71.5 2024