Skip to content

Newsletter campaign Customer Segments selection has no effect on recipients #1245

Description

@fballiano

When Maho_CustomerSegmentation is enabled, the newsletter campaign form shows a Customer Segments multiselect, and saving stores the selection in newsletter_queue.customer_segment_ids. Nothing ever reads that column back, so the segments are ignored: recipients are resolved from the campaign's store links alone.

  • Rendered: Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form:58
  • Persisted: Mage_Adminhtml_Newsletter_QueueController::saveAction() (QueueController.php:252-253), column added in Maho/CustomerSegmentation/sql/schema.php:163
  • Audience built without it: Mage_Newsletter_Model_Resource_Queue::materializeRecipients()

A merchant who picks two segments gets the campaign sent to every subscriber of the selected stores, with no warning.

Two smaller problems in the same field: the multiselect has no value, so a saved selection is not shown when reopening the campaign, and there is no validation that the chosen segments overlap the chosen stores.

Fix is to filter the audience by segment membership where it is materialized, or drop the field and the column if segment targeting is not intended here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions