Orders with multiple orderlines generate multiple emails

Created on 12 June 2023, over 1 year 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

Needs work

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.71.5 2024