VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: biowan on June 05, 2013, 11:30:32 AM

Title: Customize contact form
Post by: biowan on June 05, 2013, 11:30:32 AM
Hi,

How can I disable the contact form with VirtueMart ? The contact form link is visible when I use VirtueMart menu item "Display vendor details".
I wish to customize a new one with the default Joomla component and with captcha activation.

Thanks for your help.
Title: Re: Customize contact form
Post by: jenkinhill on June 05, 2013, 12:09:51 PM
Edit the template file  components/com_virtuemart/views/vendor/tmpl/details.php   to remove or modify the link, <?php echo $this->linkcontact ?>

Use the modified file as a template override.  http://docs.virtuemart.net/tutorials/33-templating-layouts.html and http://www.ostraining.com/blog/joomla/overrides
Title: Re: Customize contact form
Post by: biowan on June 05, 2013, 13:38:47 PM
Hi jenkinhill,

Thanks for your quick answer and suggestion.
Sorry, I dislike a solution to change code in the component. Because it must change code again after a component update/upgrade. I wished that it has a user friendly solution.

So finally, I made a rewrite directive in .htaccess to block totally the vendor detail in GET parameters and use the basic Joomla article system and Contact component.

Thx
Title: Re: Customize contact form
Post by: jenkinhill on June 05, 2013, 14:53:18 PM
Quote from: biowan on June 05, 2013, 13:38:47 PM
Sorry, I dislike a solution to change code in the component. Because it must change code again after a component update/upgrade. I wished that it has a user friendly solution.

That is the whole idea of using overrides - they do not get overwritten by updates.  The VM template system has been designed to take advantage of the use of overrides, which have been part of Joomla since J1.5 was introduced.