Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module prevents users from submitting the Drupal Commerce checkout form multiple times. It uses server-side locking and client-side double-click protection to ensure only one submission is processed, while automatically cleaning up locks on completion or termination.

Commerce Checkout Lock

Prevents duplicate checkout submissions in Drupal Commerce.

Features

  • Server-side locking using Drupal's persistent lock backend
  • Client-side double-click protection with visual feedback
  • Automatic lock cleanup via kernel terminate safety net
  • Configurable checkout pane for flexible placement

Installation

  1. Install as usual: `composer require drupal/commerce_checkout_lock`
  2. Enable the module
  3. Configure your checkout flow to include the "Checkout Lock" pane before payment

Configuration

In your checkout flow settings, add the "Checkout Lock" pane to an existing step
(e.g., "Review" or "Payment") before any payment-related panes. The pane is
invisible to customers - it only attaches the protection logic to the form.

How it works

  1. When checkout form submits, JavaScript disables buttons and shows "Processing..."
  2. The checkout pane acquires a persistent lock for the order
  3. If lock fails (concurrent submission), user sees an error message
  4. Lock releases on checkout completion or request termination (safety net)

Requirements

  • Drupal 10.3+ or 11.x
  • Commerce 2.x or 3.x

Activity

Total releases
1
First release
Jan 2026
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0 Stable Jan 13, 2026