1) The call chain looks like
func_send_mail->func_display('your_mail_template')->func_clean_url_filter_output->func_clean_url_product_callback->func_clean_url_get
Add an additional param like this
func_send_mail->func_display('your_mail_template',...,$new_url)->func_clean_url_filter_output(,...,$new_url)->func_clean_url_product_callback(,...,$new_url)->func_clean_url_get(,...,$new_url)
And use the $new_url URL in the func_clean_url_get instead of original one.
The function func_display may be called from the func_send_mail function
The call looks like
$mail_message = func_display($body_template,$mail_smarty,false);
2)Another solution is simply to change it in the xcart_clean_urls table.
3)Another solution
Apply the patch
diff -ru include/func/func.core.php include/func/func.core.php
--- include/func/func.core.php 2012-01-13 11:44:16.000000000 +0400
+++ include/func/func.core.php 2018-04-09 12:29:32.293262983 +0400
@@ -833,7 +833,7 @@
/**
* Smarty->display wrapper
*/
-function func_display($tpl, &$templater, $to_display = true, $is_intermediate = false)
+function func_display($tpl, &$templater, $to_display = true, $is_intermediate = false, $skip_output_filter = false)
{
global $config;
global $predefined_lng_variables, $override_lng_code, $shop_language, $user_agent, $__smarty_time, $__smarty_size;
@@ -1006,7 +1006,7 @@
$templater->register_outputfilter('func_postprocess_output');
if (func_constant('AREA_TYPE') == 'C') {
- if ($config['SEO']['clean_urls_enabled'] == 'Y')
+ if ($config['SEO']['clean_urls_enabled'] == 'Y' && !$skip_output_filter)
$templater->register_outputfilter('func_clean_url_filter_output');
if ($config['General']['use_cached_templates'] != 'Y')
diff -ru include/func/func.mail.php include/func/func.mail.php
--- include/func/func.mail.php 2012-01-10 16:27:54.000000000 +0400
+++ include/func/func.mail.php 2018-04-09 12:30:30.042523154 +0400
@@ -270,7 +270,8 @@
if ($config['Email']['html_mail'] != 'Y')
$mail_smarty->assign('plain_text_message', 1);
- $mail_message = func_display($body_template,$mail_smarty,false);
+ $_skip_output_filter = strpos($body_template, 'ask_question.tpl') !== false;
+ $mail_message = func_display($body_template,$mail_smarty,false, false, $_skip_output_filter);
if (X_DEF_OS_WINDOWS) {
$mail_message = preg_replace("/(?<!\r)\n/S", "\r\n", $mail_message);
And change the eml_someone_ask_question_at language variable.