recommend form: How to Add an additional email recipient

Started by conejo, March 10, 2014, 14:54:59 PM

Previous topic - Next topic


Hello together!
I´m working with Joomla! 2.5.11 / VM2.0.24c
on file ..//mytemplate/html/com_virtuemart/recommend/form.php

I want to add a custom field like in topic  "How to add Custom Fields to "Ask A Question../Call for Price" ??"
but in my case must be an additional email recipient.
This field must be optional. It is for example to send to my self or any body else a copy of the recommendation.

Many thanks for a replay,


its me again:

I found out that the "recommend" email will be send in components/com_virtuemart/controllers/productdetails.php controller:
I thing that the solution is to override the file and send a second mail after following code:
Line 199:
      $toMail = JRequest::getVar ('email'); //is sanitized then
      $toMail = str_replace (array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $toMail);

      if (shopFunctionsF::renderMail ('recommend', $toMail, $vars, 'productdetails', TRUE)) {
      } else {

For example adding following code...
        $tocopymail = JRequest::getVar ('tocopymail'); //is sanitized then
   $tocopymail = str_replace (array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $tocopymail);
   shopFunctionsF::renderMail ('recommend', $tocopymail, $vars, 'productdetails', TRUE)

My problem is that I can´t override the controller and I´m not sure if this is the correct solution of this problem:
I tried following:
And some others but there change nothing.

Many thanks in advance for any help,


See the example in my page in
"Als E-Postkarte schicken" -> "Kopie an mein E-Mail (optional):" .

Thanks and regards


QuoteI need to do this before I update to the newest version!
Please help me!!

Thanks in advance,