Overview
The Gravity Forms Cart Add-On turns product forms into a store. Each product form adds its submission to a persistent cart. One checkout form collects payment for everything in that cart through a Gravity Forms payment add-on.
You mark each form as a product form or the checkout form under Form Settings → Cart. Product forms can hold their notifications and feeds until the order is paid. The checkout form uses a Cart Summary field and a Total field, and its payment feed charges Form Total so the gateway receives every line.
Shoppers add items from any page where a product form is embedded. A header icon shows the count, and a slide-out drawer lists the cart. Coupons created under Forms → Cart discount the cart subtotal at checkout.
When the payment add-on reports the order paid, the checkout form sends a Customer Receipt and the held product-form notifications and feeds run. Guest carts stay with the shopper for the number of days you set, and items left behind are trashed or deleted on a schedule.
Key Benefits
- Take payment for several product forms on a single checkout form.
- Hold product-form notifications and feeds until the order is paid.
- Show a header cart icon and a slide-out drawer after an item is added.
- Offer percentage or flat coupons with usage limits, dates, and a minimum subtotal.
- Match the cart to the checkout form’s colors, or set the accent, text, background, border, radius, and drawer width.
- Send a Customer Receipt when the order completes, with the shopper’s details and the order summary.
How It Works
Build a form with a Product field, and Option or Quantity fields when you need them. Open Form Settings → Cart and set the role to A product form. Choose whether to hold that form’s notifications and feeds until checkout, then embed the form on a product page.
Build a second form with a Cart Summary field, a Total field, the customer fields you need, and your payment add-on’s field. Set its Cart role to The checkout form. Add a payment feed and set Payment Amount to Form Total. Embed that form on a page, then enter the page URL under Forms → Settings → Cart. The drawer, mini-cart, and add-to-cart confirmation link there.
Add [gravityforms_cart_icon] where the cart badge should appear, or [gravityforms_cart] on a cart page. Turn the drawer on under Forms → Settings → Cart and choose the right or left edge. Create coupon codes under Forms → Cart, and turn on Show a coupon code box on the Cart Summary field.
When a shopper adds an item, the submission is stored on the product form and the confirmation offers Checkout, View cart, and Add another. At checkout they review the lines, apply one coupon, and pay. After the gateway reports payment, the order is complete, the Customer Receipt goes to the Email field, and the product form’s held notifications and feeds are sent.
Please log in to access this content. Log in
Requirements
- WordPress 6.5 or later
- Gravity Forms 2.9.24 or later
- PHP 7.4 or later
- A Gravity Forms payment add-on when checkout charges for the order
Changelog
0.1.0-alpha.3
2026-10-22
- Prepared the add-on for Gravity Labs. The add-on URL is now https://labs.gravity.com/cart.
- Replaced the Labs acknowledgement checkbox with the standard Labs notice on Cart settings and the coupons screen.
- Deleting the plugin now removes the coupon tables, the coupon code stored on entries, and the customer-receipt setup flag.
- View more
0.1.0-alpha.2
2026-09-30
- Added coupon codes. Create them under Forms → Cart: percentage or fixed-amount discounts on the cart subtotal, optional minimum subtotal, start/end dates, a total usage limit and a per-customer limit.
- Added a coupon code box to the Cart Summary field (per-field setting) and coupon endpoints to the REST API (POST/DELETE gf-cart/v1/cart/coupon).
- Added the discount as a negative line in the checkout form’s product info so the Total field, payment add-ons and the entry Order Summary all reflect it.
- View more
0.1.0-alpha.1
2026-09-29
- Initial Gravity Labs release.
- Added per-form Cart roles: Product forms add their submission to a persistent cart; the Checkout form collects payment for the whole cart.
- Added cart lines as tagged entries on product forms, with guest carts (cookie) and logged-in carts (user meta) that merge on login.
- View more
Documentation
Cart Add-On Documentation
This is a Gravity Labs project and is not officially supported. The notice on Forms → Settings → Cart is expected.
Cart does not charge a card itself. Product forms add entries to a persistent cart. One checkout form collects payment for the whole cart through any Gravity Forms payment add-on.
Create a product form
Build a normal form with a Product field, plus Option or Quantity fields if you need them. Open Form Settings → Cart and set the role to A product form.
Option fields, such as Color, show under the item on their own. Show These Fields in the Cart is for other fields, such as a dropdown or a single line of text. That list stays empty when the form only has product, option, and quantity fields. Hold notifications and feeds until the item is paid for at checkout.
A product page is any page with that form embedded, for example Oops! We could not locate your form.. After someone adds the item, the confirmation offers View cart, Checkout, and Add another. The header mini-cart badge updates in place.
Create the checkout form
Build a second form with a Cart Summary field (Pricing Fields), a Total field, the customer fields you need (Email, Address, Shipping), and the payment add-on’s field. Set its Cart role to The checkout form.
Add a payment feed and set Payment Amount to Form Total. Embed the form on a page, then enter that page URL under Forms → Settings → Cart. The drawer, mini-cart, and add-to-cart confirmations link there.
The Payment panel on the checkout form’s Cart settings lists the payment add-ons and feeds it found. A feed that does not charge Form Total is flagged, because it would miss the cart lines. Use one feed per gateway, with conditional logic on a payment-method field, when you offer more than one gateway.
Put payment feeds on the checkout form only. A product form with a payment feed is flagged in its Cart settings.
Show the cart
Add [gravityforms_cart_icon] to the header for a mini-cart with a badge, or [gravityforms_cart] on a cart page. In a block theme, open Appearance → Editor → Patterns → Header, add a Shortcode block next to the Navigation block, and paste the shortcode. The icon and drawer work on every page, with or without a form.
Turn the slide-out drawer on under Forms → Settings → Cart, and choose the right or left edge.
Coupons
Coupons are built in. The Gravity Forms Coupons add-on is not required. Create codes under Forms → Cart.
- Type: a percentage of the cart subtotal, or a flat amount that never exceeds the subtotal. Coupons discount cart items only. Shipping and other checkout fields are not discounted, so a 100% coupon plus paid shipping still charges shipping.
- Limits: total uses, uses per customer (WordPress user, or the checkout form’s Email field for guests), minimum subtotal, start and end dates, and an active toggle.
0means unlimited. - Shoppers enter the code in the Cart Summary coupon box, or remove it from the drawer’s Discount row. Turn the box on per field with Show a coupon code box. One coupon per cart.
- The discount is a negative line in the checkout form’s product info, so the Total, the payment add-on, and the entry Order Summary all include it.
- A use is counted when the order completes, not when the code is applied. Codes are checked again at checkout. An invalid code is removed, and the shopper is asked to review the new total before submitting again.
Appearance
Under Forms → Settings → Cart → Appearance, set the accent, accent text, text, secondary text, background, border, corner radius, and drawer width. Leave a field empty to inherit. The drawer, mini-cart badge, Cart Summary, and add-to-cart buttons share these --gf-cart-* values.
Match Checkout Form Theme is on by default. It copies the checkout form’s Orbital styles onto those tokens. A color you set under the toggle wins over the inherited value.
A theme can set the same tokens:
:root {
--gf-cart-accent: #111;
--gf-cart-accent-contrast: #fff;
--gf-cart-radius: 999px;
}
Cart lifetime
Under Forms → Settings → Cart, set how long a guest keeps the same cart, and when items left in a cart are abandoned. Abandoned items are moved to the trash or deleted.
After an order
Orders complete when the gateway reports payment, including webhooks. A checkout form with an active payment feed does not complete an unpaid order. A form with no payment feed completes immediately, which is how free items work.
The checkout form gets a Customer Receipt notification, sent to the Email field on the “Cart order completed” event. {all_fields} includes the shopper’s details and the order summary. Edit it under Form Settings → Notifications. It is not replaced once created.






