If you have enabled express payment options for your website but the new options are not appearing on your pages, you may need to update your custom theme to support the changes.
The following instructions are only applicable to nations that want to retain existing customizations to their pages_donations_v2_wide.html file and intend to use this functionality on all donation pages. If this doesn't apply to you, please select a different set of instructions.
⚠️ Updating a customized theme is fairly technical. If you are not comfortable making the changes described on your own, you can to hire a certified NationBuilder partner to make these changes for you.
Table of contents
Identify your stock theme
Every custom theme is based on an original stock theme. If you're unsure of which stock theme is applicable to your website, you can right-click (or CTRL click) on your live website, and select the option to "View page source."
Once you see code on your screen, find the word "parent". The "parent" listed should be the name of the stock theme your custom theme was build off of.
Download theme files
Click on the name of the relevant stock theme below to download a ZIP file containing a pages_show_donation_v2_wide.html file and an _epo_theme.scss file.
Update your custom theme
Open the _epo_theme.scss file in a text editor (not a browser), and copy and paste the code into the bottom of your current theme.scss file.
Open up the new pages_show_donation_v2_wide.html file in a text editor alongside your existing pages_show_donation_v2_wide.html file to compare the changes. You can follow the Explanation of Changes table below for an explanation of each update - agnostic to theme - to help you determine where you need to make changes to your existing file.
Explanation of changes
Download this this file for an outline of a pages_show_donation_v2_wide.html file highlighting the changes described below.
1. Amount. Update the word “Amount” to remove any numbering.
2. Payment type selection. Add the new “Pay With” section to just below the one-time/monthly selection options.
What | Why | Result |
<div> | Renaming the credit card section to “Pay with” to make it more agnostic towards new payment types | |
<div id="payment-methods"> | This ID allows the section to be hidden if no express payment type can be identified on the user’s device | |
{% if page.donation_v2.express_payment_activated? %} | If express payment options are enabled at both the site and page level, this allows the options to be displayed to the donor. | |
<div id="cc-request-button"> | Displays the new “credit card” button for a donor to opt to pay by card instead of their available express payment method option | |
<div id="apple-pay-notice"> | Notifies donors using Apple Pay on a desktop device that they may be prompted to confirm their payment to "3dna CORP dba NationBuilder." | |
<div id="selected-payment-method> | 1. Allows the donor to flip back to the choice between paying by express payment option or paying by card after express payment option has been selected 2. Encourages donor to scroll to the bottom of the page to complete their transaction | |
<div id="submitted-payment-method"> | Saves the donor’s payment method in case of a page refreshed caused by an error (ex. Submission without address details) | |
<div id="cc-info"> | 1. Payment field allows the donor to pay by card |
|
3. Hide end of form. Following the credit card field, add the ID “your-info” above the start of the “Your information” section
What | Why | Result |
<!-- payment_field above ^ --> | Hides all fields after the credit card/express payment option buttons (when an express payment option is available) to minimize donor overhead in the initial selection.
📌 Note: Be sure to close this div just before the |
4. Donor information. When an express payment option is selected, any information that can be obtained about the donor through that payment method will be stored in those fields. Create a read-only block of the donor’s personal information to simplify the donation form, and allow the donor to expand the fields if they need to edit the data.
What | Why | Result |
<div id="demographics-read-only"> | Create a read-only block that will contain all of the donor’s information if all fields can be pulled from their selected payment method. | |
<div id="demographics-info"> | Expand out the donor’s information if either
The code comprising this section can be copied directly from your existing theme, but be sure the entire block is wrapped in the “demographics-info” ID. 📌 Note: We recommend moving the Phone field up into this block because that data will be displayed in the minimized, read-only block if obtained from the payment option. |
5. Donor address information. Just like the personal information, address information can be compressed and expanded
What | Why | Result |
<div id="address-read-only"> | Create a read-only block that will contain all of the donor’s address information if all fields can be pulled from their selected payment method. | |
<div id="address-info"> | Expand out the donor’s information if either
The code comprising this section can be copied directly from your existing theme, but be sure the entire block is wrapped in the “address-info” ID. |
6. Delete old payment field. Remove the Payment Information block from the bottom of your form. If you add the {% payment_field ‘card’ %} field as instructed above, but fail to remove the original from the bottom of your form, no payment options will be displayed.
What | Why | Result |
<h4>{% if request.current_order %}2{% else %}3{% endif %}. Payment information</h4>
| Delete this code from the bottom of your form |
|