Could it not be inserted into the "email_template_checkout.php" file in the email folder?
First thing would be to learn the file extensions, since it's email_template_checkout.html rather than PHP under your email folder. :happy:
As for your request, make a backup of your includes/classes/order.php file (since this is not an override file but a core file).
Then, find:
$email_order .= "\n-----\n" . EMAIL_FOOTER_COPYRIGHT . "\n\n";
(should be approx on line 961 in your editor).
add below:
// include survey measurements.
$product_title = "Your_product_title" // Change your product title here.
if (isset($product_title) && !empty($product_title) && preg_match("/^$product_title/i", $this->products_ordered)) {
$html_msg['SURVEY_MEASUREMENTS'] = zen_href_link(SURVEY_MEASUREMENTS_URL, '"target="_blank">"' . EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE . '</a>';
}
Change the following bolded statement:
$product_title = "Your_product_title" // Change your product title here (leave the quotes there though).
for the exact and precise product title name you'd like to fit in (a single one only for now to see if it works the way you like first. If so, multiple product names could be added).
Then, make a backup of the following bolded file. Go to your email/email_template_checkout.html file,
find:
<!-- Footer Section -->
<div class="footer">
<div class="copyright">$EMAIL_FOOTER_COPYRIGHT</div>
</div>
add above:
<! -- Survey measurements -- >
div class="footer">
<div class="measurements">$SURVEY_MEASUREMENTS</div>
</div>
Then, make a backup of the following bolded file. In your includes/languages/<your_language>/checkout_process.php file,
find:
define('EMAIL_TEXT_PAYMENT_METHOD', 'Payment Method');
add below:
define('SURVEY_MEASUREMENTS_URL', 'http://www.mydomain.com/measurements.php');
define('EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE', 'Click here to complete our initial survey.');
Then, modify this block above by changing the URL - pointing to it's original location.
If you're not using the survey measurements on a remote site but on your own site, then simply use this one below:
define('SURVEY_MEASUREMENTS_URL', HTTP_SERVER.'/measurements.php');
define('EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE', 'Click here to complete our initial survey.');
This completes the addition of your survey. Tell me how it went once you have tested your email order. :wink2:
Recall: Backup all bolded files I stated above before proceeding.