I tried with no luck. I was able to display the phone field, but the phone number does not appear in the mail
You need to add entered phone in /components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php
or better do an override in your template
Quote from: Studio 42 on July 10, 2018, 23:08:51 PM
You need to add entered phone in /components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php
or better do an override in your template
Thank you but still receive only Name and E-mail.
I add those lines in com_virtuemart/views/askquestion/view.html.php:
$phonenumber = vRequest::getVar ('phone', '');
$phonenumber = str_replace (array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $phonenumber);
$this->user->phone = $phonenumber;
Then in templates/my_template/html/com_virtuemart/askquestion/form.php ( i am using joomla / vm template from Gavick)
<tr>
<td><label for="phone"><?php echo vmText::_('COM_VIRTUEMART_USER_FORM_PHONE') ?> : </label></td>
<td><input type="text" class="validate[required,custom[phone]]" value="<?php echo $this->user->phone ? $this->user->phone : $sessData['phone'] ?>" name="phone" id="phone" size="30" validation="required phone"/></td>
</tr>
Then in /components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php
$this->user->phone