VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: VopoloS on May 24, 2016, 16:51:15 PM

Title: Captcha in the form to notify
Post by: VopoloS on May 24, 2016, 16:51:15 PM
Please tell me how to add captcha in the form "Notify" in the absence of product in the warehouse. File notify.php
Thank..


J 3.5.1 , VM 3.0.14
Title: Re: Captcha in the form to notify
Post by: jenkinhill on May 24, 2016, 17:44:40 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Captcha in the form to notify
Post by: VopoloS on May 24, 2016, 20:10:05 PM
Quote from: jenkinhill on May 24, 2016, 17:44:40 PM
http://forum.virtuemart.net/index.php?topic=79799.0

J 3.5.1 , VM 3.0.14 , PHP 5.5 or PHP 7
Title: Re: Captcha in the form to notify
Post by: jenkinhill on May 25, 2016, 12:20:50 PM
OK you should use VM3.0.16 with Joomla 3.5.1  - this version contains a fix for the known mail problem with J3.5.1   http://dev.virtuemart.net/projects/virtuemart/files

As for adding a captcha to that file, nobody has ever asked that before - not an obvious source of spam.

I would guess you could look at components/com_virtuemart/views/recommend/tmpl/form.php to see how captcha is used there.

Title: Re: Captcha in the form to notify
Post by: VopoloS on May 25, 2016, 18:10:49 PM
I updated the file with the problem send mail. Your proposed solution is not suitable.
Code             <?php // captcha addition
if(VmConfig::get ('ask_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$dispatcher JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
?>

<div id="dynamic_recaptcha_1"></div>
<?php 
}
// end of captcha addition 
?>

does not work in the file notify.php

Maybe change the code    if(VmConfig::get ('notify_captcha')){ ?

No, this option is also not working.....

And anyway, it would be logical to make a "notify" on the "Ask a question"... More use...

This form can be filled several times with the same e-mail address! You can imagine the situation, if the product be delivered to the store to order this form? I would like to have a check on the reseeding of the same e-mail.