Jump to content

Ajouter un re-captcha à ajouter au panier


Recommended Posts

Bonjour à tous, je souhaiterai ajouter un captcha afin de valider l'action d'ajouter au panier. J'ai pensé à cette solution pour empêcher les robots de crawl de remplir des paniers.

Dans product.tpl, j'ai ajouté cette ligne :

 

<p id="add_to_cart" class="buttons_bottom_block no-print">
                                <div class="g-recaptcha" data-sitekey="6LcQaiMUAAAAAJZT-sgEieuOZa_nhGdyLQz3Wcsu"></div>
                                    <button type="submit" name="Submit" class="exclusive">
                                       <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}
                                        </span>
                                    </button>
                            </p>

 

Et pourtant, mon captcha, même s'il apparait ne sert à rien.. Je n'ai pas besoin de le valider avant d'ajouter au panier.

Quelqu'un pourrait il m'aider?

Et avec des explication pas à pas si on rentre dans le PHP? Car ce langage n'est vraiment pas mon fort..

 

Merci!

Edited by benjamin-M (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...