-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add Donation Widget on the site #71
Comments
Have started on this and got it all cloned down locally to investigate. It looks like the members site uses a version of CiviCRM to handle the donations, ive requested access to the member's site in slack. Will see if its possible to use the existing functionality, if not we can possibly do this using the T51 donations plugin, but will try and leverage what they already have if possible. |
👋 Wanted to confirm that you received the access you needed @gin0115 . Let me know! |
Hey Sadly i was told its not something i can work on as its not held in Team51 Repos, so its been added back to the triage queue, sorry @xpurichan |
No worries, thanks for confirming @gin0115 ! I see this will be re-assigned out next week. |
I've had a brief look at this and there's two main things to address here. One is the page templates, the other is donation handling.
|
Glad to read you sorted out 1. For donation handling, we should really make an effort to use Civi, ideally through its API. We need to find a way to build a donation form that uses the Civi installation we have on members.opensource.org. @ajolo2ky can you please loop in Bryan to address this? |
Sure. I've created ticket #7880 for him. opensource.org and members.opensource.org are connected through Civi, so I think the easiest way is to create a new Contributions Page and develop a quick plugin to fetch its HTML code through the API, but let's wait and see what Brian has to say. |
I realized there's a simple option to allow embedding Contribute Forms from Civi elsewhere. Here's a quick example: https://registro.nerdear.la/civijs.php This is the javascript provided by Civi:
I've added the staging website in our CORS policy. Could you please try it and let me know if it works. Thanks, |
this is perfect! If we can put the Google|Apple Pay option in that Civi
form that'd be golden!
…On Fri, May 10, 2024 at 3:10 AM Ariel Jolo ***@***.***> wrote:
I realized there's a simple option to allow embedding Contribute Forms
from Civi elsewhere. Here's a quick example:
https://registro.nerdear.la/civijs.php
This is the javascript provided by Civi:
`
<script src="
https://members.opensource.org/wp-content/civicustom/ext/net.ourpowerbase.remoteform/remoteform.js"></script>
<script> var remoteFormConfig = { url: "
https://members.opensource.org/civicrm/remoteform/", id: 7, entity:
"ContributionPage", // Uncomment line below for test mode, //
paymentTestMode: true, // Extra JavaScript Params, if any: ... }; if
(typeof remoteForm !== "function") {
document.getElementById("remoteForm").innerHTML = "Oh no! I was not able to
display the form! Please check your security settings (for example Privacy
Badger) and allow remote javascript to be displayed from
members.opensource.org."
document.getElementById("remoteForm").style.color = "red"; } else {
remoteForm(remoteFormConfig); } </script>`
I've added the staging website in our CORS policy. Could you please try it
and let me know if it works.
Then we'll have to do some visual touches for it to look good, but let's
first try to see if this is technically viable.
Thanks,
—
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKJJAEGV6EXFQUVKPVV6W3ZBQNB7AVCNFSM6AAAAABG2U3TP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGY3TGOBWGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I've made a first go at adding a sidebar widget area called "License Sidebar" (in Appearance > Widgets) and pasted in the script above. I've un-commented the test mode attribute. Sample page here, though any license will show it. Can we find out if it's possible to also pull the form element selectors the same way it renders on the members site? |
Thanks for testing it out! I've reached out our Civi developer to see if he can help us with the styling. |
@nickpagz this is his response: from what I understand remote form intentionally breaks from the Civi styling to present a more stripped down markup because the assumption is that the site where you are embedding the form will have it's own styling that you would want to match. in other words, you would adjust the styling on your target website so have the embedded form match. re: form element selectors specifically -- all of the form elements have unique IDs, so they should be easily selectable. |
Ok, let me see what I can do. |
@ajolo2ky @smaffulli If recurring donations are a must, then we can consider alternatives such as a basic link to redirect users to Looking forward to your thoughts. |
Let's get this started, if in the next three months we get a good flow of donations we will consider expanding the functionality. Please move forward! Thanks, |
@ajolo2ky I've tried a few different options for getting this form to submit without any real success. It's not clear if this is the remote form extension not working, I'm doing it wrong, or some other issue (like CORS policy - see below). I've mainly tested this with Form 7 which is Paypal based, and later with Form 17 which appears identical to 7, but Stripe based. Regardless of the form, remoteForm adds "required" credit card fields. I've tried removing them for the Paypal form in various ways (including the remote form custom cfg options For reference, you can test either form by going to the widgets section and under the License Sidebar widget area, in the HTML widget change the id to either 7 or 17. Form 7 (Paypal) is currently the active form - example page: https://open-source-initiative-development.mystagingwebsite.com/blog/license/artistic-1-0 When trying to submit Form 7, I run into a CORS policy error: And when I try to submit Form 17, I get a 500 error: I'm wondering if you can reach out to your civi dev and see if they can provide any insight on the above errors, and hopefully a way forward. cc: @ahegyes |
Hi, I've reached out to our developer and update as soon as I hear back. |
Hi, We have a new contribution page, ID 19, could you try with that one instead of 7 or 17 ? |
Hey @ajolo2ky |
Hi, sorry for the delay, I was away. I've added @lcdservices as a contributor. He is our CiviCRM developer and I think it would be faster if you interacted with him directly. I'm here following the issue in case you need anything on my end. Best, |
@nickpagz @lcdservices could you confirm you two connected about this in any way? |
@nickpagz sorry for the delay following up on this. The page you linked to previously doesn't appear to have the form anymore. Can you setup a new test page that includes the remoteform js and we can troubleshoot there before adding it to the "real" page? We should be using form ID 19, and I've made one change at my end to address a possible issue. But I'll need something setup for testing at your end to try to troubleshoot the CORs issue further. |
@lcdservices My turn to apologize on the delay here! It looks like another PR wiped out the changes I had made to the theme, but I've added them back now. You should now be able to see the form here: I'm bypassing my script ( |
Hi, after all the back and forth we decided to go with a much simpler choice. I integrated a Stripe card and it's now working in stg: Could you please promote the license template with the sidebar to production ? |
Thanks @ajolo2ky I'll get the PR cleaned up and pushed out this week. |
@ajolo2ky The license sidebar template is now live on production. You can add the Stripe donation code to it now. Please let me know if you run into any issues. |
Hi, I added it and it's working, thanks. Minor fix (test in stg and then we move to prod): Could you separate a little more the body of the license and the sidebar ? ideally the donation box would fit visually right below the OSI approved license logo |
Sure thing! Let me see what I can do. |
@ajolo2ky I've made the adjustment on the staging site. Let me know what you think. |
@ajolo2ky checking to make sure you saw this thread |
Thanks for the nudge. Looks good, please promote it to prod. |
@nickpagz noting the above. |
@ajolo2ky My apologies for the delay! I've now merged the change to the production site, though it looks like the donation widget code is commented out. If/when the code is reactivated and you notice any issues, please let me know. |
Hi, yes, just responded in the thread over email. Thanks for pushing this. Let's close the issue as we need to implement some internal processes before enabling this again. |
Description
The partner wants to add a widget to the side of the website to show a little bit of info about OSI and has an option for people to contribute.
The partner wants to copy the functionality on: https://members.opensource.org/donate/
Here is a quick Mockup the partner provided:
When the user clicks on either of the One-time or Yearly buttons, the rest of the fields are displayed:
This is the Mobile/Tablet view:
Reference
Zendesk
Dev Repo
The text was updated successfully, but these errors were encountered: