VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mywam on October 02, 2012, 13:15:03 PM

Title: Add extra fields to "Ask a question about product" Pop up form
Post by: mywam on October 02, 2012, 13:15:03 PM
Dear all,

Please can someone help me to add extra fields in "Ask a question Pop up form" in addition to the already exist fields "Name" and "Email" ? 
I need to add fields as a combo box field and also a calendar field .. can u help me please as soon as possible , Thanks alot.



[attachment cleanup by admin]
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: K&K media production on October 06, 2012, 00:34:41 AM
The layouts for ask question are in com_virtuemart/views/askquestion
You need some overrides to add new fields.
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: hmarenco on February 07, 2013, 03:40:47 AM
Hi mywam, have you solved the issue? I have the same need but do not know how to do it.
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: mywam on April 16, 2013, 16:49:08 PM
How i do overrides to add extra fields please ??????????
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: K&K media production on April 16, 2013, 17:14:45 PM
http://docs.virtuemart.net/tutorials/33-templating-layouts/78-introduction-template-system.html
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: mywam on April 16, 2013, 23:14:42 PM
Quote from: kkmediaproduction on April 16, 2013, 17:14:45 PM
http://docs.virtuemart.net/tutorials/33-templating-layouts/78-introduction-template-system.html

Really i can't figure out this ??
I need just to add some fields in this ask a question form ??
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: K&K media production on April 17, 2013, 11:20:09 AM
you must write a override for the files in

com_virtuemart/views/askquestion/tmpl

in default.php you must add the field

in mail_html_question.php and mail_raw_question.php you must add the output

you need also in this files something like this for the new field

$this->my_field = JRequest::getString ('my_field');

if you have no php/html knowledge, make it as commercial job
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: mywam on April 17, 2013, 14:43:14 PM
Thanks for your help , Please can u tell me , how to change the link of "ask a question " when i press on it redirects to another component " Fabrik form " ??? thanks .

like this link example in your extensions website :  http://extensions.virtuemart.net/vm-templates/mobile-template-detail
Title: Re: Add extra fields to "Ask a question about product" Pop up form
Post by: K&K media production on April 20, 2013, 14:12:39 PM
Also with a template override for product details page. There you can change the link.