Forum


Calc Builder Support

Calc Builder support
Forums
Public write access is disabled. Please login

Possibility to add a REF#? 15.03.2017 22:25

Hi,

Is it possible to add a unique REF#, preferably in the subject of the email, in order to track all the emails for a specific calc quote?

Thank you in advance.

Re: Possibility to add a REF#? 16.03.2017 09:59

Hi,
you could add any custom reference at the content of the email, just creating a new result (with a random number, a number based on actual date, getting the number of calculations launched...), and include it same that your other inputs/outputs. At this time the subject doesn't allow to introduce variables, so you would have to introduce a little tweak to the email function in order to get that purpouse. It's located here:

JOOMLA\components\com_calcbuilder\models\calcbuilder.php

You can search for the email function
function getEnvioWrapper($email,$mail_content,$subject,$attach=null,$cc=null,$bcc=null){


and add any content to the subject, just below this line, for ex, adding REF#: + a random number:

$subject=$subject." REF#:".rand();


Hope this helps, regards
Moonsoft Team
www.moonsoft.es

Re: Possibility to add a REF#? 18.03.2017 17:42

Hi,

Thanks for your reply.

Instead of having something random, could I get the timestamp? Maybe something like this:

$date = new DateTime();
$subject=$subject." REF#:".$date->getTimestamp();

Thanks in advance.

Re: Possibility to add a REF#? 20.03.2017 20:22

Hi,
yes, you can use any valid php code for that purpouse, your example code seems ok. Additionallly you can check the date function official doc in order to find out different formats you can use to print your timestamp here:


http://php.net/manual/en/function.date.php

Hope this helps, regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback