Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order cycle mail reports to producers display different data in html and txt versions #12993

Open
nicolasVr opened this issue Nov 21, 2024 · 5 comments · May be fixed by #12996
Open

Order cycle mail reports to producers display different data in html and txt versions #12993

nicolasVr opened this issue Nov 21, 2024 · 5 comments · May be fixed by #12996
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. feedback-needed

Comments

@nicolasVr
Copy link

nicolasVr commented Nov 21, 2024

Description

At the end of an order cycle the producers cans receive by mail a report of their orders. This mail contains a plain text and a html versions.
Both display the total order the producer has to deliver, but only the html shows the order by customer.

I acknowledged this issue because a hub complained that he missed an information he received before. Actually he probably changed email reader or settings.

Expected Behavior

Both text and html versions should display all informations.

Actual Behaviour

Here is an example retrieved from an email :

Plain text version :

Cher(ère) La Ferme des p'tits cllos,

Vous trouverez ci-dessous les informations pour le cycle de vente prévu pour :

  • Du Cllos à la Fourchette (Ferme des Margannes le 22/11)

Orders summary

Les produits et quantités à livrer :

  • La Ferme des p'tits cllos - Crème crue - 20 cl (QTY: 2) @ 3,30 € = 6,60 €
  • La Ferme des p'tits cllos - Lait cru de vache - 1L (QTY: 1) @ 1,65 € = 1,65 €
  • La Ferme des p'tits cllos - Yaourt au lait de vache - 125g (QTY: 8) @ 0,60 € = 4,80 €

Total: 13,05 €

Merci et belle fin de journée!,
Du Cllos à la Fourchette
1501 avenue de la Banque à Genêts, Cherbourg-en-Cotentin, 50470
0662833336
[email protected]

html version :

_CoopCircuits

CoopCircuits

Cher(ère) La Ferme des p'tits cllos,

Vous trouverez ci-dessous les informations pour le cycle de vente prévu pour :
• Du Cllos à la Fourchette (Ferme des Margannes le 22/11)

Les produits et quantités à livrer :
Référence Produit Produit Quantité Prix Sous-total Inclut TVA
Crème crue - 20 cl 2 3,30 € 6,60 € 0,34 €
Lait cru de vache - 1L 1 1,65 € 1,65 € 0,09 €
Yaourt au lait de vache - 125g 8 0,60 € 4,80 € 0,26 €
13,05 € 0,69 €

Détail par client·e :
Référence Produit Produit Quantité Prénom Nom de famille
Crème crue - 20 cl 1 Anne XXX
Yaourt au lait de vache - 125g 4 Régine ZZZ
Crème crue - 20 cl 1 Jourdainne AAAA
Lait cru de vache - 1L 1 Jourdainne AAAA
Yaourt au lait de vache - 125g 4 Jourdainne AAAAA

Merci et belle fin de journée! ,

Du Cllos à la Fourchette

1501 avenue de la Banque à Genêts
Cherbourg-en-Cotentin
50470

0662833336

[email protected]

Conditions Générales d'Utilisation et de vente de CoopCircuits | CoopCircuits

other point regarding mails

All mails sent by OFN-FR contain in the html headers -- If you delete this meta tag, Half Life 3 will never be released. --
Funny, but maybe not necessary ?

Workaround

use html version...

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

French OFN instance

@RachL
Copy link
Contributor

RachL commented Nov 22, 2024

@openfoodfoundation/developers any hints at what may have caused this? FYI this was reported by users: https://openfoodnetwork.slack.com/archives/CG7NJ966B/p1726668578218679 (but I suspect it has been here longer than september)

@RachL RachL added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Nov 22, 2024
@nicolasVr
Copy link
Author

It seems that more informations were added in html version of the email 3 years ago, but plain text version was not modified accordingly : https://github.com/openfoodfoundation/openfoodnetwork/blame/7a2a6fab21cbf869c928fddb178d73b21485776c/app/views/producer_mailer/order_cycle_report.html.haml

@nicolasVr
Copy link
Author

"The Half Life 3" stuff was introduced 10 years ago : https://github.com/openfoodfoundation/openfoodnetwork/blame/7a2a6fab21cbf869c928fddb178d73b21485776c/app/views/layouts/mailer.html.haml#L4
I think it can be removed now !

@chahmedejaz
Copy link
Collaborator

Hi @RachL, @nicolasVr - The customer information was also added in the text version in future commits however, there was a conditional check to display the information which was never true in the case of the text version. It's a quick fix, and raising the PR now. Thanks.

@chahmedejaz chahmedejaz self-assigned this Nov 25, 2024
@chahmedejaz chahmedejaz moved this from All the things 💤 to Dev ready 👋 in OFN Delivery board Nov 25, 2024
@chahmedejaz chahmedejaz moved this from Dev ready 👋 to In Progress ⚙ in OFN Delivery board Nov 25, 2024
@chahmedejaz
Copy link
Collaborator

chahmedejaz commented Nov 25, 2024

@nicolasVr, @RachL - We are also missing the Included Tax for the line item in the text version. Do we have any format/template to display this tax in the text version of the report? Other than that, the missing customer information issue is fixed as shown in the screencast below. Thanks.

bandicam.2024-11-26.03-33-05-838.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. feedback-needed
Projects
Status: In Progress ⚙
3 participants