PHPackages                             tungsten/growdough - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tungsten/growdough

ActiveCraft-plugin[API Development](/categories/api)

tungsten/growdough
==================

This plugin allows collecting donation designations in a Donations List that works similar to a shopping cart.

3.0.0(3y ago)0128MITPHPPHP ^8.0

Since Nov 28Pushed 3y ago3 watchersCompare

[ Source](https://github.com/atomic74/craft3-growdough)[ Packagist](https://packagist.org/packages/tungsten/growdough)[ RSS](/packages/tungsten-growdough/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

GrowDough plugin for Craft CMS 4.x
==================================

[](#growdough-plugin-for-craft-cms-4x)

This plugin allows collecting donation designations in a Donations List that works similar to a shopping cart.

[![Screenshot](resources/img/plugin-logo.png)](resources/img/plugin-logo.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require tungsten/growdough

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for GrowDough.

Settings
--------

[](#settings)

- **Donations URL:** Stores the full URL to the donations form for the account
- **Test Mode Enabled:** Allows to test the GrowDough integration with the Craft website. When enabled, the Test Mode is enabled during the checkout on GrowDough.

When the test mode is enabled, the following hidden input is added to the form:

```

```

Variables
---------

[](#variables)

### getDonationItems

[](#getdonationitems)

Retrieves the donation items stored in the session as a collection (array). Use the collection in a for loop to build the items list.

```
{# Get the Donation Items stored in the session. Returns false if there are no Donation Items #}
{% set donationItems = craft.growDough.getDonationItems %}
```

### donationItemInList

[](#donationiteminlist)

Check if the donation item with the provided id is already in the list of donation items.

```
{% if craft.growDough.donationItemInList(fund.id) %}
  {# If the item is already in the donation list, show disabled button #}
  Selected
{% else %}
  {# Ir the item is NOT in the donation list, show the button to add it to the list. #}

{% endif %}
```

### addDonationItemFormTag

[](#adddonationitemformtag)

Opening form tag to add a donation item to the donation items list.

#### Params

[](#params)

- **itemId** Unique id for the donation item
- **itemTitle** Donation item title that is used for display
- **itemAttributes** Donation item attributes array that will be stored as JSON

#### Example

[](#example)

```
{{ craft.growDough.addDonationItemFormTag(
  fund.id,
  fund.title,
  {
    'Donation Type': 'Scholarship Fund',
    'Donating To': 'The Erie Art Museum',
    'Designation': fund.title
  }
) }}
```

### formTag

[](#formtag)

Opening form tag to submit donation to GrowDough. Includes the GrowDough post URL and all hidden fields required for submission.

#### Options

[](#options)

- **templateVariables** Include the template variables that should be used in the GrowDough donation workflow (donation form, email receipt, thank you page, etc.) *If not included, an empty JSON array will be submitted.*
- **donationItems** Include an array of donation items to override the items in the donation list. *If not included, an array of donation items will be automatically generated from the donation list.*
- **paymentMethod** Include a predefined payment method (**credit\_card** or **giving\_card**) if the form is intended to use a pre-determined GrowDough donation form.
- **donationAmount** Include a predefined donation amount if the form is intended to use a pre-determined amount on the GrowDough donation form.

#### Most Common Use

[](#most-common-use)

The form tag will be most commonly used with templateVariables and paymentType.

```
{{ craft.growDough.formTag({
  'templateVariables': {
    'Variable Key': 'Variable Value',
    'Variable Key': 'Variable Value',
    ...
  },
  'paymentMethod': 'credit_card|giving_card',
  'donationAmount': 100
}) }}
```

#### Full Variable Syntax

[](#full-variable-syntax)

```
{{ craft.growDough.formTag({
  'templateVariables': {
    'Variable Key': 'Variable Value',
    'Variable Key': 'Variable Value',
    ...
  },
  'donationItems': [
    {
      "title": "Item title",
      "attributes": {
        "Attribute Key": "Attribute Value",
        "Attribute Key": "Attribute Value",
        ...
      }
    },
    {
      "title": "Item title",
      "attributes": {
        "Attribute Key": "Attribute Value",
        "Attribute Key": "Attribute Value",
        ...
      }
    }
  ],
  'paymentMethod': 'credit_card|giving_card',
  'donationAmount': 100
}) }}
```

### getDonationItemsJson

[](#getdonationitemsjson)

Format the donation items list as an encoded JSON string.

```
{{ craft.growDough.getDonationItemsJson }}
```

### donationsUrl

[](#donationsurl)

Retrieves the GrowDough donations URL from the plugin settings. The URL is used to post the donation to the GrowDough system for the particular account.

```

```

### givingCardPurchaseUrl

[](#givingcardpurchaseurl)

Retrieves the GrowDough Giving Card purchase URL from the plugin settings. The URL is used to post the desired Giving Card amount to the GrowDough system for the particular account.

```

```

Actions
-------

[](#actions)

### Add Donation Item to Dontation Items

[](#add-donation-item-to-dontation-items)

Add a specific donation item to the **Donations List**. If an item with the provided *itemId* already exists in the list, it will **NOT** be added.

#### Example using `addDonationItemFormTag` variable

[](#example-using-adddonationitemformtag-variable)

```
{{ craft.growDough.addDonationItemFormTag(
  fund.id,
  fund.title,
  {
    'Attribute Key': 'Attribute Value',
    'Attribute Key': 'Attribute Value',
    ...
  }
) }}
  {{ fund.title }}

```

#### Example using HTML form directly

[](#example-using-html-form-directly)

```
{% set itemId = fund.id %}
{% set itemTitle = fund.title %}
{% set itemAttributes = {
  'Attribute Key': 'Attribute Value',
  'Attribute Key': 'Attribute Value',
  ...
} %}

  {{ fund.title }}

```

#### Redirecting to another page upon submission

[](#redirecting-to-another-page-upon-submission)

By default, upon form submission the plugin will automatically reload the current page.

To override this default behavior, include `redirectInput` function after the PerForm `addDonationItemFormTag` and specify your redirect destination.

```
{{ craft.growDough.addDonationItemFormTag(
  fund.id,
  fund.title,
  {
    'Attribute Key': 'Attribute Value',
    'Attribute Key': 'Attribute Value',
    ...
  }
) }}
{{ redirectInput('some/url/here') }}
```

OR

```

  {{ redirectInput('some/url/here') }}
```

### removeDonationItem

[](#removedonationitem)

Remove a specific donation item from the **Donations List**. If an item with the provided *itemId* does not exist in the list, the action will be ignored.

```
Remove
```

*Optional:* Add a **redirectUrl** parameter if you'd like to redirect to a specific page after the item is added. If the parameter is omitted, the browser will redirect to the origin page (using http\_referrer).

```
Remove
```

### removeAllDonationItems

[](#removealldonationitems)

Remove all donation items from growDoughItems session variable. This is useful when checking out a multi-designation donation and the session needs to be remove so that it does not stick around after the donation is complete.

This action needs to be called via AJAX while the GrowDough form is being submitted.

```
$.get('/growdough/remove-all-donation-items', { deleteAll: true }, function(response) {
  console.log('Deleted ' + response.item_count + ' donation items.');
});
```

Brought to you by [Tungsten Creative Group](https://www.atomic74.com)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~390 days

Total

5

Last Release

1163d ago

Major Versions

2.0.3 → 3.0.02023-03-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/167ac04bb46c40eaae120a95deebfb477e108976b4c9c19e8b00334aa1b54cf9?d=identicon)[tungsten](/maintainers/tungsten)

---

Top Contributors

[![ohlincik](https://avatars.githubusercontent.com/u/1297647?v=4)](https://github.com/ohlincik "ohlincik (11 commits)")

---

Tags

cmsCraftcraftcmscraft-plugingrowdough

### Embed Badge

![Health badge](/badges/tungsten-growdough/health.svg)

```
[![Health](https://phpackages.com/badges/tungsten-growdough/health.svg)](https://phpackages.com/packages/tungsten-growdough)
```

###  Alternatives

[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[craftpulse/craft-typesense

Craft Plugin that synchronises with Typesense

122.7k](/packages/craftpulse-craft-typesense)[jsmrtn/craftagram

Grab Instagram content through the Instagram API

141.3k](/packages/jsmrtn-craftagram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
