Prestashop: Carrier is not correct displayed in the Order confirmation email

Created on 20 Jun 2019  路  24Comments  路  Source: PrestaShop/PrestaShop

1761beta and develop is NOK

data
data2

1751 is OK:

175

Tested on 100% clean install.

Describe the bug
Check the screenshot.

Additionnal information
PrestaShop version: 1.7.6
PHP version: 7.2

1.7.6.x Addresses Bug Carriers Email Fixed Minor Regression

All 24 comments

Hi @MathiasReker,

  1. first issue:
    I did not manage to reproduce the issue with PS1.7.6.0beta1.
    I checked also the develop branch => it is OK.
    https://drive.google.com/file/d/1BE0R5uNr9OMomr5G7mewoNpElbY9UvnC/view
  2. second issue:
    I have the same issue with PS1.7.6.0beta1 & develop branch
    in the email: "Order confirmation", the Carrier is not correct
    image
    In the invoice, the Carrier is correct
    image

In the version PS1.7.5.2 => OK

@khouloudbelguith please check this video: https://streamable.com/oimxw Fresh install 1.7.6.0 beta1

Errorlog:

[2019-06-20 09:34:06] app.ERROR: Class "AdminLinkWidgetController" not found in controllers/admin [] []
[2019-06-20 09:34:07] app.INFO: Exporting mail with theme modern for language English (English) [] []
[2019-06-20 09:34:07] app.INFO: Core output folder: C:\laragon\www\PrestaShopBeta1/mails [] []
[2019-06-20 09:34:07] app.INFO: Modules output folder: C:\laragon\www\PrestaShopBeta1/modules/ [] []
[2019-06-20 09:34:09] app.INFO: Generate html template followup_1 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_1.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template followup_1 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_1.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template followup_2 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_2.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template followup_2 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_2.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template followup_3 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_3.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template followup_3 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_3.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template followup_4 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_4.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template followup_4 at C:\laragon\www\PrestaShopBeta1/modules/\followup\mails\en\followup_4.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template customer_qty at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\customer_qty.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template customer_qty at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\customer_qty.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template new_order at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\new_order.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template new_order at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\new_order.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template order_changed at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\order_changed.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template order_changed at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\order_changed.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template productcoverage at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\productcoverage.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template productcoverage at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\productcoverage.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template productoutofstock at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\productoutofstock.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template productoutofstock at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\productoutofstock.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template return_slip at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\return_slip.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template return_slip at C:\laragon\www\PrestaShopBeta1/modules/\ps_emailalerts\mails\en\return_slip.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template referralprogram-congratulations at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-congratulations.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template referralprogram-congratulations at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-congratulations.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template referralprogram-invitation at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-invitation.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template referralprogram-invitation at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-invitation.txt [] []
[2019-06-20 09:34:09] app.INFO: Generate html template referralprogram-voucher at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-voucher.html [] []
[2019-06-20 09:34:09] app.INFO: Generate txt template referralprogram-voucher at C:\laragon\www\PrestaShopBeta1/modules/\referralprogram\mails\en\referralprogram-voucher.txt [] []


info_outline Configuration information

This information must be provided when you report an issue on our bug tracker or forum.
info_outline Server information

Server information Windows NT build 17134 (Windows 10) AMD64

Server software version: Apache/2.4.27 (Win64) OpenSSL/1.0.2l

PHP version: 7.1.19

Memory limit: 512M

Max execution time: 36000

Upload Max File size: 50M
info_outline Database information

MySQL version: 5.7.19

MySQL server: 127.0.0.1

MySQL name: prestashop

MySQL user: root

Tables prefix: ps12312312312_

MySQL engine: InnoDB

MySQL driver: DbPDO
info_outline Store information

PrestaShop version: 1.7.6.0

Shop URL: http://localhost/PrestaShopBeta1/

Shop path: C:\laragon\www\PrestaShopBeta1

Current theme in use: classic
info_outline Mail configuration

Mail method: You are using the PHP mail() function.
info_outline Your information

Your web browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
info_outline Check your configuration

Required parameters: OK

Optional parameters: OK

Screenshot_2019-06-20 PHP PrestaShop Info

Hi @MathiasReker
The bug with carrier display is fixed by https://github.com/PrestaShop/PrestaShop/pull/14296
About the address display I wasn't able to reproduce it either, but I'm testing on the 1.7.6.x branch not the beta version so maybe it has been fixed since then.
I'm currently performing a fresh install of the branch to see if I can reproduce the bug

FYI: i'm not able to reproduce on 1.7.6.x too :disappointed:

In my case, with PS1.7.6.0beta1 => it is OK also.

debug

@MathiasReker, fresh install in the last few minutes
image

What is the exact county/language did you used during the install?

Thanks!

I also tried with the same address in Iowa but couldn't reproduce the problem.

Okay, let me snow all steps in video on develop branch.

Thank you Also, don't test the beta but rather on the 1.7.6.x branch

Oh by the way that makes me think, which OS do you test on?

My trest env is windows with laragon

@MathiasReker, @jolelievre, yes, it is the issue.
I manage to reproduce the issue with PS1.7.6.0beta1 & windows 10 & Google Chrome Version 74.0.3729.169 (Build officiel) (64 bits)

https://drive.google.com/file/d/16yG8bfLHO3IJ2bKyDUWdc_FDAMWwIfM6/view

With PS1.7.5.2 => OK.
Thanks!

@khouloudbelguith great that you was able to reproduce it.

ping @jolelievre, it is a new regression in PS1.7.6.0.
Same issue in the branch 1.7.6.x => when using windows.

Thanks!

@MathiasReker @khouloudbelguith it's a long shot bu I think it may be due to the replacement of \n with PHP_EOL
I don't have a Windows env to test on, so can you test with the last changes in the PR please?

@jolelievre, great!
This PR fixes for me two issues:

  • Carrier email issue
  • Address display issue on windows

Thanks!

@jolelievre it's maybe because of this line :thinking:
https://github.com/PrestaShop/PrestaShop/blob/develop/classes/AddressFormat.php#L391 :sob: Who have the idea to use \r\n ><

@khouloudbelguith I tried the suggestion of @PierreRambaud can you check if it works fine on Windows please.
We also need to check that this doesn't break the fix from this PR https://github.com/PrestaShop/PrestaShop/pull/13578

@jolelievre We checked but it wasn't :D in fact the format is stored in database, this is why "\n" is needed. I suggested you to rename \n into an AdressFormat const.

@PierreRambaud Can we close this issue as the related PR https://github.com/PrestaShop/PrestaShop/pull/14296 is merged or does it still needs advanced exploration ?

Was this page helpful?
0 / 5 - 0 ratings