4 SHOP emails customization

EasySDI 4.4+ email customization system.

You can override the messages strings using the joomla language override process (see: Joomla documentation).

In the strings, you can uses codes (see codes list) you want to replaces in the email strings (see email strings list).

Codes list

These codes can be used in mail string

Item Code Notes
Order ID {ORDER_ID}
Order name {ORDER_NAME}
Order creation date {ORDER_CREATE_DATE} Joomla LC3 date format is used
Client name {CLIENT_NAME}
Client email {CLIENT_EMAIL}
Client's organism name {CLIENT_ORG_NAME}
List of diffusions name {DIFFUSIONS_LIST} The list is dynamic, a user gets all products, an extraction manager gets only his products
Direct access URL {DIRECT_URL} The URL to a direct access to the order, if the user is not authenticated, it cannot access the page
Direct access URL + TOKEN {DIRECT_URL_TOKEN} The URL to a direct access to the order with a token for:
- the user (client): if user is not authenticated he can access his order
- validation managers, a validator will by authenticated with the token if not logged in
Other users (extraction managers, etc) will not be authenticated (same as {DIRECT_URL})
Third party org. name {THIRD_PARTY_NAME} Is only set if order has a thrid party messages# : 4,8,9,10
Mandate description {MANDATE_REF} Is only set if order has a thrid party + mandate, etc. messages# : 4,8,9,10
Mandate contact name {MANDATE_CONTACT} Is only set if order has a thrid party + mandate, etc. messages# : 4,8,9,10
Mandate contact email {MANDATE_EMAIL} Is only set if order has a thrid party + mandate, etc. messages# : 4,8,9,10
Date of validation/reject {VALIDATED_DATE} Is only set if order has a thrid party + mandate and is valid/rejected by TP: messages# : 4,9,10
Reason for validation/rej {VALIDATED_REASON} Is only set if order has a thrid party + mandate and is valid/rejected by TP: messages# : 4,9,10
Validator name {VALIDATED_BY_NAME} Is only set if order has a thrid party + mandate and is valid/rejected by TP: messages# : 4,9,10
Validator organism {VALIDATED_BY_ORG} Is only set if order has a thrid party + mandate and is valid/rejected by TP: messages# : 4,9,10
Website base URL {SITE_URL} example : http://www.example.com/joomla/
Site name {SITE_NAME} sitename configured in Joomla
SIte HTML link {SITE_LINK} example: <a href="http://www.example.com/joomla/">My Sitename</a>

Email strings list

# Item/Event Recipient Email subject Email body Notes
1 new order client (order owner) COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_NEW_ORDER_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_NEW_ORDER_BODY
2 first item ready client (order owner) COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_FIRST_PRODUCT_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_FIRST_PRODUCT_BODY
3 order completed client (order owner) COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_FINISH_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_FINISH_BODY
4 order rejected by thirdparty client (order owner) COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_REJECTED_THIRD_PARTY_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_REJECTED_THIRD_PARTY_BODY
5 order rejected by supplier(s) client (order owner) COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_REJECTED_SUPPLIER_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_CLIENT_ORDER_REJECTED_SUPPLIER_BODY only when all products are rejected by supplier
6 new order (or just validated) notified users of product COM_EASYSDI_SHOP_NOTIFICATION_NOTIFIEDUSER_NEW_ORDER_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_NOTIFIEDUSER_NEW_ORDER_BODY All products where user is notified
7 new order (or just validated) extraction responsibles COM_EASYSDI_SHOP_NOTIFICATION_EXTRACTION_RESPONSIBLE_NEW_ORDER_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_EXTRACTION_RESPONSIBLE_NEW_ORDER_BODY All manual products where user is extraction responsible
8 new order with third party all validation managers COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_NEW_ORDER_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_NEW_ORDER_BODY
9 an order has been validated all validation managers COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_VALIDATED_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_VALIDATED_BODY
10 an order has been rejected all validation managers COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_REJECTED_SUBJECT COM_EASYSDI_SHOP_NOTIFICATION_VALIDATIONMANAGER_REJECTED_BODY

(note: message number is only here for documentation)

More customization with plugins

You can write a plugin to override system replaced values, or add your own values.
Plugins must be in 'easysdi_shop_mails' folder and offer the 'getReplaceStringsArray($sdiBasket)' public function that returns and associative array of strings (same structure as Easysdi_shopBasketStringParser::searchStrings)
See code in /joomla/components/com_easysdi_shop/helpers/basket_string_parser.php for details