Problem/Motivation

Currently, the commerce_abandoned_carts module automatically sends abandoned cart reminder emails based on the configured schedule. However, there is no built-in option to completely disable email sending.

This feature request proposes adding a configuration option to the module’s settings form that allows administrators to disable email notifications without disabling the module itself.

Steps to reproduce

  1. Enable commerce_abandoned_carts.
  2. Configure email settings.
  3. Emails are always sent based on the schedule, with no way to disable them from the UI.

Proposed resolution

  • Add a new checkbox to the module’s configuration form at /admin/commerce/config/abandoned_carts (or the relevant settings page).
  • Label: Disable abandoned cart emails
  • Description: "If checked, no abandoned cart emails will be sent, but tracking will continue."
  • Default value: Unchecked (emails are enabled by default).
  • Modify the email-sending logic to respect this setting.

Remaining tasks

  • Implement the configuration setting in the admin UI.
  • Modify the email dispatch logic to check this setting before sending emails.
  • Update the module documentation, if necessary.

User interface changes

A new checkbox will be added to the module's configuration form.

API changes

No API changes are expected.

Data model changes

A new configuration setting will be added to store the email disable option.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

denist3r created an issue. See original summary.

denist3r’s picture

Status: Active » Needs review

denist3r’s picture

Added patch for the 2.0.x branch

denist3r’s picture

Assigned: denist3r » Unassigned
megachriz’s picture

Thanks for your contribution! It looks like a valuable addition to me.

Do you want to add test coverage for it too? This way we can ensure that no mails are being sent when the option is enabled.

I'm also thinking if it would be better UX to reverse the option label, so that it says 'Send abandoned cart emails' (and have it enabled by default). Because I believe that I read somewhere that enabling an option to disable a feature can be confusing.

megachriz’s picture

Issue tags: +Needs tests
finex’s picture

I agree with @megachriz to reverse the option label.

denist3r’s picture

Assigned: Unassigned » denist3r
Status: Needs review » Active

Working on it!

denist3r’s picture

Assigned: denist3r » Unassigned
Status: Active » Needs review