New Captcha System in Virtuemart 3.8.6

on .

New virtuemart now supports any Joomla captcha-type plugin which follows Joomla's core recaptcha plugin triggerers. The captcha handling in new Virtuemart release was unified to use single point of handling within an updated shopfunctionsf which now takes care of rendering captcha and checking captcha's answer. New Virtuemart now listens to your Global captcha configuration and if you chose a specific captcha plugin which has to be used globally on your site, this plugin will be then triggered. If your global captcha configuration uses defaults, all enabled captcha plugins will be initialized and html will be returned from all of them into a proper place shown within the templates. New captcha system now supports displaying and checking captcha for logged in users as well via hidden configration (see below).

Default handling
Default captcha handling wasn't changed compared to previous Virtuemart versions, so if you used Joomla's core recaptcha plugin, it will work exactly same as it did before.

Templating
Virtuemart views Vendor + Recommend + User + Askquestion send variable $this->captcha to underlying templates which can be printed at any position inside a form, that you'd like the captcha to be shown. It is not needed to wrap it with logged in state check (this is done per configuration in shopfunctions)

Custom views may render captcha directly with
echo shopfunctionsf::renderCaptcha('ask_captcha');

Available configuration keys are:

Available from backend Virtuemart configration:
ask_captcha (used by ask a question + reviews for anonymous users)
reg_captcha (used by registration or address edits for anonymous users)

Available hidden configuration:
notify_captcha=1 (used by product low stock notify system)
notify_captcha_logged=1 (low stock notify for logged in users)
ask_captcha_logged=1 (ask a question captcha for logged in users)
reg_captcha_logged=1 (address edit of a logged user)

If you need to utilize hidden configuration, you can append the configuration line (example: notify_captcha=1 ) to your /administrator/components/com_virtuemart/virtuemart.cfg file, visit Virtuemart backend configuration page and click save. (this will automatically load the cfg file and save it to database toghether with your own configuration)