Prestashop: ps_mailalerts new order notification - logic for displaying customized products is broken

Created on 26 Nov 2019  路  3Comments  路  Source: PrestaShop/PrestaShop

To Reproduce

  1. Make a customizable product. A text or file field (optional customization).
  2. Go to FO. Open up the product.
  3. Customize it, add it to cart. - Customization A
  4. Customize it again, add it to cart. - Customization B
  5. Do not customize it, add it to cart.
  6. Your cart - 3 products - 1 default, 2 customized.
  7. Order it.

Resulting email table

  • Product - Customization A + Customization B
  • Product - Customization A + Customization B
  • Product - Customization A + Customization B

Why is it wrong - ps_emailalerts.php (lines 300-320)

foreach (product in order) {
    if (product ID found in customized datas) {
        foreach (customization for this product id) {
            // echo customization
        }              
    }
}

Additional information
PrestaShop version: 1.7.6.1

1.7.5.2 1.7.6.1 Bug Customized Email Mailalerts Minor PR available To Do

Most helpful comment

@khouloudbelguith @matks Hi guys, made a PR to fix this problem. Check it out.

https://github.com/PrestaShop/ps_emailalerts/pull/28

All 3 comments

Hi @Hlavtox,

Thanks for your report.
I manage to reproduce the issue with PS1.7.6.1 & ps1.7.5.2 & Mail alerts v2.1.1.
image

I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

@khouloudbelguith @matks Hi guys, made a PR to fix this problem. Check it out.

https://github.com/PrestaShop/ps_emailalerts/pull/28

Hi,

In the BO, it is OK
image

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matks picture matks  路  3Comments

Fabuloops picture Fabuloops  路  3Comments

PrestaShark picture PrestaShark  路  3Comments

Van-peterson picture Van-peterson  路  3Comments

sandra2n picture sandra2n  路  3Comments