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

feat(donation): Add company name fields in donation form #2453 #2926

Merged
merged 36 commits into from
Mar 23, 2018

Conversation

raftaar1191
Copy link
Contributor

@raftaar1191 raftaar1191 commented Mar 16, 2018

Description

PR to fix #2453

How Has This Been Tested?

  • Added global Company Donations radio buttons setting with Disabled|Required|Optional options where the Default option will be Disabled
  • Added form Company Donations radio buttons setting with Disabled|Required|Optional|Global options. where the Default option will be Global
  • Include description Do you want a Company field to appear after First Name and Last Name?
  • Ensure Company field appears on the front-end form if the setting is enabled. The Company field should be a full-width field that appears below First Name and Last Name. The name fields must always be present even if a company field is displayed, too.
  • Save Company field to payment meta as _give_donation_company so it is permanently preserved.
  • Save Company field to donor meta as _give_donor_company and update the donor meta if a company was previously entered for that donor.
  • Display Company field in Donor details screen if it is populated.
  • Display Company field in Donation details screen if it is populated.
  • Add company for the field on donor profile shortcode page.
  • Add feature to show company name on a receipt ( by default hide )
  • Add feature to show company name in email receipts.
  • "Donor Details" meta box UI updates ( feat(donation): Add company name fields in donation form #2453 #2926 (comment) )
  • Add company field to donation history export CSV
  • Hide company name field when clicking on Create New Donor on donation detail screen

Video/Screenshots (jpeg or gifs if applicable):

Video Link: https://screencast-o-matic.com/watch/cFeqq9Dusj (deprecated)

image

image

image

image

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

Copy link
Collaborator

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 Please use save fn, for now, to save company name in donation meta as we discussed.

Copy link
Collaborator

@ravinderk ravinderk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 Please add the following issue.

  1. Autofill company name if any.
  2. Save company name if updates from profile editor ( not working currently)
  3. Read my all commit to this PR. I found lots of issues which I already fixed. Make sure you always create Pr with standard code.

@raftaar1191
Copy link
Contributor Author

@ravinderk PR updates as you have suggested in the following comment.

Kindly review it again and merge it

ravinderk added a commit to raftaar1191/Give that referenced this pull request Mar 21, 2018
remove code changes from pr impress-org#2926 which is not related to issue impress-org#2453
ravinderk added a commit to raftaar1191/Give that referenced this pull request Mar 21, 2018
remove code changes from pr impress-org#2926 which is not related to issue impress-org#2453
remove code changes from pr impress-org#2926 which is not related to issue impress-org#2453
@DevinWalker
Copy link
Member

DevinWalker commented Mar 22, 2018

Review Findings

Nice work on this feature. Please see the following

1. Move Global Settings

Move the settings from it's own subtab to the main "Display" tab:

2018-03-21_19-41-01

2. Arrange Donation Fields Better

2018-03-21_19-42-30

3. Fix issue when clicking "Create a donor"

When you click "create donor" all fields hide except this new field:

2018-03-21_19-45-28

4. The "Donation History" export need to have the "Company" column

2018-03-21_19-49-55

2018-03-21_19-47-46

@ravinderk
Copy link
Collaborator

@raftaar1191

@DevinWalker @mehul0810 and I discussed Donor detail metabox UI and this is the final mockup.

image

@DevinWalker
Copy link
Member

Looks good @ravinderk 👍

@raftaar1191
Copy link
Contributor Author

raftaar1191 commented Mar 22, 2018

@ravinderk @DevinWalker

This menu here is used to show the Donor Details not the Donation Details
image

Does it sound good are we showing the Donation Company Name in Donor Details section and one more thing we can change the donor from the Dropdown as well this result in changing all the value like donor name donor email donor id but not the Donor Company Name

image

Video Link: https://screencast-o-matic.com/watch/cFe31KDxwc

@raftaar1191
Copy link
Contributor Author

@ravinderk @DevinWalker
Should I add Donation Company option in CSV at the time of importing the Donation

image

CSV Link: https://docs.google.com/spreadsheets/d/1FZkxJDtvhAfUZYtL0HA2awfYvnuhOWbEcAK1egV0zxM/edit#gid=1089390285

@raftaar1191
Copy link
Contributor Author

raftaar1191 commented Mar 22, 2018

@DevinWalker
Copy link
Member

@raftaar1191 good call on allowing Company Name to be importable as well. Please proceed with adding that functionality.

@DevinWalker DevinWalker merged commit ec0a962 into impress-org:release/2.0.7 Mar 23, 2018
@nguyenrom
Copy link

@DevinWalker , The 'Company name' didn't update when I changed the donor. Is this bug?

2020-02-11 at 13 32

@ravinderk
Copy link
Collaborator

@nguyenrom thank you for reporting this. I created an issue for this.

ref: #4483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants