Author Topic: Google ReCaptcha does not display in Vendor Contact form  (Read 1263 times)

Panayiotis Fafakos

  • Beginner
  • *
  • Posts: 8
    • Wisdom Software
Google ReCaptcha does not display in Vendor Contact form
« on: August 29, 2018, 23:36:20 pm »
Hello to all developers of Virtuemart.

First of all, I would like to thank you for this wonderful software, Joomla & Virtuemart.
I am using Joomla v3.8.11 and Virtuemart v3.2.15.

I would like to report a missing feature or bug, as described below...

As anyone can see even in
https://demo.virtuemart.net/vendor/virtuemart-3-sample-store/contact
and in all demo installations i.e. download and install
https://dev.virtuemart.net/attachments/download/1120/VirtueMart3.2.14_Joomla_3.8.6-Stable-Full_Package.zip,
even if we enable ReCaptcha in Joomla config, and in VirtueMart configuration,
the ReCaptcha does not show, since (from what I can understand) is it not implemented in the specific contact php file.

Does anybody know what should be added as a template override to enable ReCaptcha in Vendor Contact Form in Virtuemart?

Kind regards to all,

Panos.
Panayiotis Fafakos
Electronics & Software Engineer

Panayiotis Fafakos

  • Beginner
  • *
  • Posts: 8
    • Wisdom Software
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #1 on: August 29, 2018, 23:55:41 pm »
Please notice that it is not a template problem.

I have tried with the default template "vmbeez3",
with a free VM template (https://www.olympianthemes.com/virtuemart-templates/horme-free-virtuemart-template.html)
plus with another commercial template from linelab (which I had from VM 2).

I believe this is a contact form which has been forgotten to get up-to-date somehow...

Searching in Google says how to disable the contact links, yet I would like to keep the option to contact the shop vendor.

I hope a developer steps in to help us...
Panayiotis Fafakos
Electronics & Software Engineer

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3149
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #2 on: August 30, 2018, 07:22:57 am »
Hmmmm, this is a really joomla question, nothing to do with VM.

The contact form is a Joomla view. Works for me with Protostar VM 3.2.12 and 3.2.15.

You have to turn on Recaptcha in Joomla contacts.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Panayiotis Fafakos

  • Beginner
  • *
  • Posts: 8
    • Wisdom Software
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #3 on: August 30, 2018, 09:56:16 am »
At, first, thank you all for your replies.

I will try to elaborated a little bit further on the subject...

I have upgraded to latest Joomla v3.8.12 and lastest Virtuemart 3.2.15
in a demo installation and enabled ReCaptcha in Joomla and Virtuemart.

As you can see in the link below the Joomla contact form is a different contact.php file and the ReCaptcha is working.
http://arvecon3.wisdomsoftware.gr/index.php/el/contact/4-uncategorised/1-contact
This file is located under the templates folder, current template, html/com_contact/contact/default_form.php
Please notice that on top of the form I have added the text "this is the overridden default_form.php in directory /templates/templatename/html/com_contact/contact"

You can also see that the Product "Ask a question", "Recommend to a friend by email" are also working.
http://arvecon3.wisdomsoftware.gr/index.php/en/arvecon-shop/construction-hardware/construction-concrete-mixers/concrete-mixer-130lt-inox-1-detail-page

The problem is with VM vendor communication contact.php which is located elsewhere, specificaly under templates/templatename/html/com_virtuemart/vendor.
Please see the link below:
http://arvecon3.wisdomsoftware.gr/index.php/en/terms-of-service/arvecon-e-shop/contact
Please notice that on top of the form I have added another text "this is the overridden contact.php in directory /templates/templatename/html/com_virtuemart/vendor"

So, since in the code there is no reference for a captcha and this is a virtuemart file, I think I have reported this issue correctly.

Can a virtuemart programmer shed some light of knowledge on this please?

Thank you all,

Panos.
Panayiotis Fafakos
Electronics & Software Engineer

Panayiotis Fafakos

  • Beginner
  • *
  • Posts: 8
    • Wisdom Software
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #4 on: September 03, 2018, 21:23:36 pm »
Please use the following URLs, since I have disabled SEO, etc, in order to simplify the debug process...

The URL links where the ReCaptcha is working are the two below samples.

For a product in virtuemart see the URL below (AskAQuestion, EmailRecommendToFriend):
http://arvecon3.wisdomsoftware.gr/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=6853&virtuemart_category_id=61&Itemid=418&lang=en

Moreover the URL where someone can contact the Joomla user is the one below (with ReCaptcha):
http://arvecon3.wisdomsoftware.gr/index.php?option=com_contact&view=contact&id=1:contact&catid=4&lang=en&Itemid=416

The problem is with VM vendor communication contact.php
which is located elsewhere, specificaly under templates/templatename/html/com_virtuemart/vendor.
Please see the URL link below:
http://arvecon3.wisdomsoftware.gr/index.php?option=com_virtuemart&view=vendor&layout=contact&virtuemart_vendor_id=1&lang=en

Please note that I have replaced contact.php in folder templates/templatename/html/com_virtuemart/vendor
with the default one from folder components/com_virtuemart/views/vendor/tmpl/contact.php
but the ReCaptcha is still not displayed.

Thank you all for your support.

Panos.
Panayiotis Fafakos
Electronics & Software Engineer

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9909
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #5 on: September 03, 2018, 22:47:02 pm »
There is no captcha coded for the contact vendor view

you would need to add to  components\com_virtuemart\views\vendor\view.html.php

$this->captcha = shopFunctionsF::renderCaptcha('ask_captcha');

probably in the elseif ($layoutName=='contact') { block

and in contact.php add

<?php // captcha addition
      echo $this->captcha;
   // end of captcha addition
   ?>
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10076
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Google ReCaptcha does not display in Vendor Contact form
« Reply #6 on: September 06, 2018, 23:48:44 pm »
Thank you for buying a membership, is added. The version will be released tomorrow.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/