Enhancement #1148

SHOP enhance mail notifications

Added by Blatti Yves about 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:09/24/2015
Priority:NormalDue date:
Assignee:Battaglia Marc% Done:

100%

Category:SHOP
Target version:4.4.0
Sponsor: Ergonomic impact:

for users : better notifications

Functional impact:

For admins : ability to have more customizable notifications, use any order fields in any Subject or Body of notification mails.


Description

In V4 notifications have been simplified (many fields have been removed compared to V2).

Some of the fields in mails are important for users, validators and suppliers.

Here are the needs of ASIT VD for notifications as an example, elements in green are present in the V4 mails:

item/event recipient (note) mail subject mail body
new order user (order created) id_order id_order
order_name
new order extraction responsible id_order
client_org_name
id_order
order_name
client_name
client_org_name
[list]products_name (1)
new order notified users id_order
client_org_name
note(2)
id_order
order_name
client_name
client_org_name
[list]products_name (1)
partial response
(first product ready)
see #1136
user id_order id_order
order_name
direct_access_order (3)
final response
(order_completed)
user id_order id_order
order_name
direct_access_order (3)
new order validation validation managers (TP) id_order
client_org_name
id_order
order_name
client_name
client_org_name
third_party_name
mandate_descr
mandate_contact
mandate_mail
direct_access_request (4)
validation done validation managers (TP) id_order
client_org_name
id_order
order_name
client_name
client_org_name
third_party_name
mandate_descr
mandate_contact
mandate_mail
direct_access_request (4)
validation rejected validation managers (TP) id_order
client_org_name
id_order
order_name
client_name
client_org_name
third_party_name
mandate_descr
mandate_contact
mandate_mail
direct_access_request (4)
validation rejected
(does not exists,
see #1146
)
user id_order id_order
order_name
third_party_name
mandate_descr
mandate_contact
mandate_mail
direct_access_order (3)
supplier rejected
(when all products are
rejected by supplier)
user id_order id_order
order_name
direct_access_order (3)

Table notes:
1) See #1150 group by suppliers
2) This mail subject has currently no specific string (it's the same as the one for the extrection manager)
3) This doesn't exist yet, and should be secured by unique token
4) This link exists but is not secured by token, if a user knows the id of the validator he can validates his own order : #1147

Problem :

The current mailing system uses sprintf mechanism, it results in a limitation of fields usable and their order.
For example:

COM_EASYSDI_SHOP_BASKET_SEND_MAIL_CONFIRM_ORDER_BODY="Your order '%s' has been sent. \n\n You can view it in your account on http://myeasysdi.org \n\n My EasySDI" 

Solution proposal :

We could introduce a tag replacement system, with all elements of an order.
We can then pass the type of notification and an order id to the new mailer system.
For example the previous string could become:

COM_EASYSDI_SHOP_BASKET_SEND_MAIL_CONFIRM_ORDER_BODY="Your order '{ORDERNAME}' has been sent. \n\n You can view it in your account on http://myeasysdi.org \n\n My EasySDI" 

EasySDI admins could then override the strings in joomla and for example change it to :
COM_EASYSDI_SHOP_BASKET_SEND_MAIL_CONFIRM_ORDER_BODY="Your order {ORDERID} name '{ORDERNAME}' has been sent. \n\n You can view it in your account on http://mysite.ch \n\n My site admins" 

Notes :

  • We should use this change to correct some easySDI defects: #1136, #1146 and #1147
  • To avoid breaking previous versions of easysdi (4.2.x), we should introduce new strings for mail, but keep the content (except if )
  • This string mechanism should be applied to Subject and Body of the mails.
  • This mechanism will have to be documented in the wiki for admins

Related issues

Related to easySDI - Enhancement #1150: Group notifications for suppliers and notified users Closed 09/25/2015
Related to easySDI - Defect #1147: The validation link in mail is not secured Closed 09/24/2015
Related to easySDI - Defect #1146: Wrong notification sent in case of rejection third party Closed 09/24/2015
Related to easySDI - Defect #1136: SHOP, user is notified for every product Closed 09/16/2015
Related to easySDI - Defect #1192: Option "send notification email to user" when request is ... Closed 11/13/2015

History

#1 Updated by Blatti Yves about 4 years ago

  • Description updated (diff)

#2 Updated by Blatti Yves about 4 years ago

Note TP: Direct access link without token auth should be proposed as an alternative.

#3 Updated by Van Hoecke Hélène about 4 years ago

  • Status changed from Request For Comments to Accepted
  • Assignee changed from Technical Committee to Blatti Yves

TC has validated such enhancement.

#4 Updated by Blatti Yves almost 4 years ago

rev 9372

#5 Updated by Blatti Yves almost 4 years ago

  • Related to Enhancement #1150: Group notifications for suppliers and notified users added

#6 Updated by Blatti Yves almost 4 years ago

  • Related to Defect #1147: The validation link in mail is not secured added

#7 Updated by Blatti Yves almost 4 years ago

  • Related to Defect #1146: Wrong notification sent in case of rejection third party added

#8 Updated by Blatti Yves almost 4 years ago

  • Related to Defect #1136: SHOP, user is notified for every product added

#9 Updated by Blatti Yves almost 4 years ago

  • Status changed from Accepted to Affected

#10 Updated by Blatti Yves almost 4 years ago

  • Status changed from Affected to Resolved
  • % Done changed from 0 to 100

rev 9383

#12 Updated by Blatti Yves almost 4 years ago

  • Related to Defect #1192: Option "send notification email to user" when request is sent does not work added

#13 Updated by Blatti Yves almost 4 years ago

  • Status changed from Resolved to To merge

#14 Updated by Blatti Yves almost 4 years ago

  • Assignee changed from Blatti Yves to Battaglia Marc

#15 Updated by Battaglia Marc almost 4 years ago

  • Target version set to 4.4.0

#16 Updated by Battaglia Marc almost 4 years ago

  • Status changed from To merge to Closed

Also available in: Atom PDF