Orders with multiple order items generate multiple emails

Created on 12 June 2023, about 1 year ago
Updated 13 May 2024, about 2 months ago

Problem/Motivation

When an order has more than 1 orderline this module sends the same email multiple times.
This is because a join is made to each orderline, which is never grouped on in SQL, thus creating multiple rows.

Steps to reproduce

Install the module and send (test) e-mails.

Proposed resolution

Use a good GroupBy in file commerce_abandoned_carts.module.
After the orderBy('o.changed', 'ASC'); this extra function should be called, containing only the two fields that are selected:

$select->groupBy('order_id', 'mail');

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium pablovos

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024