[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

ACSD-69261: Single‑use cart price rule coupon reused due to incorrect times_used handling in partial invoice and cancellation flows

The ACSD-69261 patch fixes the issue where a cart price rule coupon configured for single use per customer was reused multiple times due to incorrect handling of the times_used attribute in partial invoice and remaining quantity cancellation scenarios. This patch is available when the Quality Patches Tool (QPT) 1.1.76 is installed. The patch ID is ACSD-69261. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6-p13

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.8-p3
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

A cart price rule coupon configured for single-use per customer can be incorrectly reused multiple times, due to improper handling of the times_used attribute during partial invoice creation and cancellation of the remaining uninvoiced quantity.

Steps to reproduce:

  1. Create a cart price rule with a coupon limited to one use per customer.

  2. Place an order containing two items.

  3. Increase the quantity of one item to two or more units, and apply the coupon.

  4. Confirm that the following database tables have entries:

    1. The order stores the coupon correctly in the sales_order table.
    2. The salesrule_coupon_usage table shows times_used = 1.
    3. The salesrule_customer table shows times_used = 1.
  5. Create a partial invoice by invoicing only one unit of the item.

  6. Cancel the remaining uninvoiced quantity.

  7. Check the times_used field values in the salesrule_coupon_usage and salesrule_customer tables.

Expected results:

The system decrements the times_used value only after cancelling uninvoiced quantities following a partial invoice, allowing the coupon to be used again when it is configured for a single‑use per customer.

Actual results:

After cancellation, the times_used values are reset to zero instead of retaining their correct usage count.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3