Hello,
Please i need assistance using the Variable Substitution for email template notification
The precise area i need it is for the invoice validation capture which should contain the following
Product Name
Product Price
Product Qty
Total
Using the email template, the content didn’t have the variable listed for Product Name, Product Price and Product Quantity.
How can i get these variables so i can set the template?
Secondly is, we have more than one business Sales location and we want to get notification for every invoice validated to be sure of the pricing used. How do i make the notification to be location based so that the notification comes only from one particular location?
// Register the custom substitution function
$substitutionarray[‘custom’] = ‘custom_substitution’;
[/code]
Step 2: Include the Substitution File in Existing Modules
Modify the description files of the relevant modules to include this substitution file. For example, for the proposal and supplier order modules, edit moddesc.propal.class.php and moddesc.commande_fournisseur.class.php.
For Proposals:
// In htdocs/core/modules/propal/moddesc.propal.class.php
include_once DOL_DOCUMENT_ROOT.'/core/substitutions/functions_custom_substitution.lib.php';
// Register the function
$substitutionarray['custom'] = 'custom_substitution';
For Supplier Orders:
// In htdocs/core/modules/fournisseur/moddesc.commande_fournisseur.class.php
include_once DOL_DOCUMENT_ROOT.'/core/substitutions/functions_custom_substitution.lib.php';
// Register the function
$substitutionarray['custom'] = 'custom_substitution';
Step 3: Enable Custom Substitutions
Ensure that the relevant modules are enabled and configured to use custom substitutions.
Step 4: Use the Substitution Variables in Email Templates
Use the substitution variables in your email templates as previously explained:
Example email template:
[code]Dear Customer,
Thank you for your order. Here are the details of your order:
What else can i say? this is a great work, deeply appreciated.
I am not a tech or coding person and my greatest fear in all this is putting this things in the wrong line, place and everything stops working.
I would appreciate it more (of course i want to learn) if its done simply the way i should go about it. Like the first thing to do and the line where it should be inserted, sequentially like that…
Like for number 1, i dont know what to copy, there is an image in between and so i dont get confused.
Pls help align.
Then what i need is the customer invoice validation object - The product Name, The price and Qty, why is it from proposal and supplier order? Can you explain?