{"_id":"596839fc456d69001568a848","project":"55a6e72e8cc73e0d00096635","version":{"_id":"55a6e72f8cc73e0d00096638","project":"55a6e72e8cc73e0d00096635","hasReference":false,"__v":29,"hasDoc":true,"createdAt":"2015-07-15T23:05:19.125Z","releaseDate":"2015-07-15T23:05:19.125Z","categories":["55a6e7308cc73e0d00096639","55b7ed07aea7c8190058badb","5604567c0c78b00d0039b191","5605e6f23a93940d002b3e4a","5605f2bba4574a0d00811365","5605f309a4574a0d00811366","5608e3b98aedf50d0004cf8f","5608e4318aedf50d0004cf90","5608e6b5a7cc2f0d00d9754d","5608e6d331beb60d001b6560","5608f879a7cc2f0d00d97580","560b097887b71d0d000d3bd9","560b13cbafa0990d00979545","560b5cbec341310d00de2a01","560b5cd0c341310d00de2a02","566a35b81e08750d00a0c49b","566a3e8503b4b20d00d02a4a","567889d307bf6a0d0083edc8","569c8b7c15bb390d00db6f9d","56b254dc65ddf50d0076ba8f","57a8ebc4cdeea20e001d2a63","57e48a4000c8680e00fae6e7","5808216773557d0f00a1e428","58105ad54a8aa50f00aa4cba","58105bf298aea40f00afa3ba","58105f548a4aed0f00d67536","581061b898aea40f00afa3be","584b3de7e5f3a42300df6ef7","596839a75965d400155bb750"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"596839a75965d400155bb750","project":"55a6e72e8cc73e0d00096635","version":"55a6e72f8cc73e0d00096638","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-07-14T03:25:27.396Z","from_sync":false,"order":1,"slug":"whats-new","title":"What's New"},"user":"55a6caa022cfa321008e01d6","__v":1,"parentDoc":null,"updates":["599f28493383d1003bc7225b"],"next":{"pages":[],"description":""},"createdAt":"2017-07-14T03:26:52.562Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"This page covers:\n\n* [Better Spam Deterrence](#why)\n* [Preloaded Themes](#ok)\n* [How to Upgrade](#up)\n\n## <a name=\"why\"></a> Better Spam Deterrence\n\nTo deter spam submission through storefront forms, BigCommerce now supports Google [reCAPTCHA v2](https://support.google.com/recaptcha/?hl=en#6080933) challenges, to distinguish human customers/visitors from automated bots. We recommend that all storefront themes take advantage of this upgraded bot detection.\n\n## <a name=\"ok\"></a> Preloaded Themes\n\nIf you have based your theme on a theme/version that already incorporates reCAPTCHA v2, you do not need to take any further action. Compliant themes/versions currently include:\n\n* [Cornerstone 1.6.1](https://stencil.bigcommerce.com/docs/cornerstone-16x-theme-release-notes) or higher\n* 22 Savile Row (all versions)\n* Arcade 1.13.0 or higher\n* Atelier 1.10.1 or higher\n* Bazaar 1.0.1 or higher\n* Capacity 1.12.0 or higher\n* Chelsea 1.12.0 or higher\n* Diamond 1.0.5 or higher\n* Exhibit 1.10.4 or higher\n* Flagship 1.10.6 or higher\n* Fortune 1.12.1 or higher\n* Foundry 1.10.1 or higher\n* Geneva 1.10.1 or higher\n* Hero 1.11.1 or higher\n* Lookbook 1.10.3 or higher\n* Merchant 1.12.0 or higher\n* Parts Warehouse (all versions)\n* Peak 1.11.4 or higher\n* Prosper 1.10.2 or higher\n* Queen 1.0.3 or higher\n* Runway 1.11.2 or higher\n* Scales 1.0.2 or higher\n* Showroom 1.12.0 or higher\n* Soho 1.11.1 or higher\n* Solo 1.10.3 or higher\n* Spotlight 1.11.0 or higher\n* Supermarket (all versions)\n* Touch 1.0.1 or higher\n* Venture 1.11.4 or higher\n[block:html]\n{\n  \"html\": \"<!-- REMOVED, because reCAPTCHA v1 lang strings are removed for v2: \\nreCAPTCHA and Localization\\n\\nYou can the complete set of updates in a diff view starting [here](https://github.com/bigcommerce/cornerstone/pull/951/files). This pull request also shows you how to update reCAPTCHA-challenge language strings in your theme's `<theme-name>/lang/en.json` file. You can use the English string values as a model to populate optional translation files for other languages.\\n-->\"\n}\n[/block]\nHowever, if your theme is built on an earlier version of these themes, or on a different base theme, please follow the updating instructions in [How to Upgrade](#up) below.\n\n\n## <a name=\"up\"></a> How to Upgrade\n\nTo add reCAPTCHA v2 support to a theme, you will need to update script references in three template files:\n\n* [Create-Account Template](#signup)\n* [Write-Review Template](#review)\n* [Contact-Us Template](#contact)\n\nAccording to the subsections below, replace&#160;each \"before\" code block with the corresponding \"after\" code.\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"You can the complete set of updates in a diff view starting [here](https://github.com/bigcommerce/cornerstone/pull/951/files).\",\n  \"title\": \"View All Changes\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"Please back up each template file before making any changes.\\n\\nThe instructions below are based on Stencil's default Cornerstone theme. Therefore, the HTML markup will vary, based on customizations you have already made to this theme, or to other Marketplace themes.\",\n  \"title\": \"Updating Safely\"\n}\n[/block]\n### <a name=\"signup\"></a> Create-Account Template\n\nIn your theme's `templates/pages/auth/create-account.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-ecbae6e2b7d5bbf5c950d68878e79d99):\n\n#### Replace this (before):\n\n```handlebars\n{{#if forms.create_account.recaptcha.enabled }}\n\n<div class=\"panel\">\t\n<header class=\"panel-header\">\t\n<h3 class=\"panel-title\">{{lang 'create_account.captcha_heading' }}</h3>\n</header>\t\n\n<div class=\"panel-body\">\t\n<script type=\"text/javascript\"\t\nsrc=\"https://www.google.com/recaptcha/api/challenge?k={{forms.create_account.recaptcha.public_key}}\">\t\n</script>\t\n\n<noscript>\t\n<iframe src=\"https://www.google.com/recaptcha/api/noscript?k={{forms.create_account.recaptcha.public_key}}\" height=\"300\" width=\"500\" frameborder=\"0\"></iframe>\t\n<br>\t\n<textarea name=\"recaptcha_challenge_field\" rows=\"3\" cols=\"40\">\t\n</textarea>\t\n<input type=\"hidden\" name=\"recaptcha_response_field\" value=\"manual_challenge\">\t\n</noscript>\t\n</div>\t\n\n</div>\t\n{{/if}}\n```\n\n#### ...with this (after):\n\n```handlebars\n{{{ forms.create_account.recaptcha.markup}}}\n```\n\n### <a name=\"review\"></a> Write-Review Template\n\nIn your theme's `templates/components/products/modals/writeReview.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-945a5d7f1563068188ae39df568cfd43):\n\n#### Replace this (before):\n\n```handlebars\n{{#if product.reviews.captcha}}\n<header class=\"panel-header\">\t\n<h3 class=\"panel-title\">{{lang 'products.reviews.captcha_heading' }}</h3>\t\n</header>\t\n<div class=\"panel-body\">\t\n<script type=\"text/javascript\"\t\nsrc=\"https://www.google.com/recaptcha/api/challenge?k={{product.reviews.captcha}}\">\n</script>\t\n\n<noscript>\t\n<iframe src=\"https://www.google.com/recaptcha/api/noscript?k={{product.reviews.captcha}}\"\t\nheight=\"300\" width=\"500\" frameborder=\"0\"></iframe>\t\n<br>\t\n<textarea name=\"recaptcha_challenge_field\" rows=\"3\" cols=\"40\">\t\n</textarea>\t\n<input type=\"hidden\" name=\"recaptcha_response_field\" value=\"manual_challenge\">\t\n</noscript>\t\n\n</div>\t\n{{/if}}\n```\n\n#### ...with this (after):\n\n```handlebars\n{{{product.reviews.recaptcha.markup}}}\n```\n \n### <a name=\"contact\"></a> Contact-Us Template\n\nIn your theme's `templates/components/page/contact-us-form.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-5351402159301e1c225752f03d9f1f8e):\n\n#### Replace this (before):\n\n```handlebars\n{{#if forms.contact.recaptcha.enabled}}\t\n\n<div class=\"panel\">\t\n<header class=\"panel-header\">\t\n<h3 class=\"panel-title\">{{lang 'forms.contact_us.captcha'}}</h3>\t\n</header>\t\n\n<div class=\"panel-body\">\t\n<script type=\"text/javascript\"\t\nsrc=\"https://www.google.com/recaptcha/api/challenge?k={{forms.contact.recaptcha.public_key}}\">\n</script>\t\n\n<noscript>\t\n<iframe src=\"https://www.google.com/recaptcha/api/noscript?k={{forms.contact.recaptcha.public_key}}\" height=\"300\" width=\"500\" frameborder=\"0\"></iframe>\t\n<br>\t\n<textarea name=\"recaptcha_challenge_field\" rows=\"3\" cols=\"40\">\t\n</textarea>\t\n<input type=\"hidden\" name=\"recaptcha_response_field\" value=\"manual_challenge\">\t\n</noscript>\t\n</div>\t\n\n</div>\t\n{{/if}}\n```\n\n#### ...with this (after):\n\n```handlebars\n{{{forms.contact.recaptcha.markup}}} \n```","excerpt":"","slug":"recaptcha-2","type":"basic","title":"Please Add reCAPTCHA v2"}

Please Add reCAPTCHA v2


This page covers: * [Better Spam Deterrence](#why) * [Preloaded Themes](#ok) * [How to Upgrade](#up) ## <a name="why"></a> Better Spam Deterrence To deter spam submission through storefront forms, BigCommerce now supports Google [reCAPTCHA v2](https://support.google.com/recaptcha/?hl=en#6080933) challenges, to distinguish human customers/visitors from automated bots. We recommend that all storefront themes take advantage of this upgraded bot detection. ## <a name="ok"></a> Preloaded Themes If you have based your theme on a theme/version that already incorporates reCAPTCHA v2, you do not need to take any further action. Compliant themes/versions currently include: * [Cornerstone 1.6.1](https://stencil.bigcommerce.com/docs/cornerstone-16x-theme-release-notes) or higher * 22 Savile Row (all versions) * Arcade 1.13.0 or higher * Atelier 1.10.1 or higher * Bazaar 1.0.1 or higher * Capacity 1.12.0 or higher * Chelsea 1.12.0 or higher * Diamond 1.0.5 or higher * Exhibit 1.10.4 or higher * Flagship 1.10.6 or higher * Fortune 1.12.1 or higher * Foundry 1.10.1 or higher * Geneva 1.10.1 or higher * Hero 1.11.1 or higher * Lookbook 1.10.3 or higher * Merchant 1.12.0 or higher * Parts Warehouse (all versions) * Peak 1.11.4 or higher * Prosper 1.10.2 or higher * Queen 1.0.3 or higher * Runway 1.11.2 or higher * Scales 1.0.2 or higher * Showroom 1.12.0 or higher * Soho 1.11.1 or higher * Solo 1.10.3 or higher * Spotlight 1.11.0 or higher * Supermarket (all versions) * Touch 1.0.1 or higher * Venture 1.11.4 or higher [block:html] { "html": "<!-- REMOVED, because reCAPTCHA v1 lang strings are removed for v2: \nreCAPTCHA and Localization\n\nYou can the complete set of updates in a diff view starting [here](https://github.com/bigcommerce/cornerstone/pull/951/files). This pull request also shows you how to update reCAPTCHA-challenge language strings in your theme's `<theme-name>/lang/en.json` file. You can use the English string values as a model to populate optional translation files for other languages.\n-->" } [/block] However, if your theme is built on an earlier version of these themes, or on a different base theme, please follow the updating instructions in [How to Upgrade](#up) below. ## <a name="up"></a> How to Upgrade To add reCAPTCHA v2 support to a theme, you will need to update script references in three template files: * [Create-Account Template](#signup) * [Write-Review Template](#review) * [Contact-Us Template](#contact) According to the subsections below, replace&#160;each "before" code block with the corresponding "after" code. [block:callout] { "type": "success", "body": "You can the complete set of updates in a diff view starting [here](https://github.com/bigcommerce/cornerstone/pull/951/files).", "title": "View All Changes" } [/block] [block:callout] { "type": "danger", "body": "Please back up each template file before making any changes.\n\nThe instructions below are based on Stencil's default Cornerstone theme. Therefore, the HTML markup will vary, based on customizations you have already made to this theme, or to other Marketplace themes.", "title": "Updating Safely" } [/block] ### <a name="signup"></a> Create-Account Template In your theme's `templates/pages/auth/create-account.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-ecbae6e2b7d5bbf5c950d68878e79d99): #### Replace this (before): ```handlebars {{#if forms.create_account.recaptcha.enabled }} <div class="panel"> <header class="panel-header"> <h3 class="panel-title">{{lang 'create_account.captcha_heading' }}</h3> </header> <div class="panel-body"> <script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k={{forms.create_account.recaptcha.public_key}}"> </script> <noscript> <iframe src="https://www.google.com/recaptcha/api/noscript?k={{forms.create_account.recaptcha.public_key}}" height="300" width="500" frameborder="0"></iframe> <br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> </div> </div> {{/if}} ``` #### ...with this (after): ```handlebars {{{ forms.create_account.recaptcha.markup}}} ``` ### <a name="review"></a> Write-Review Template In your theme's `templates/components/products/modals/writeReview.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-945a5d7f1563068188ae39df568cfd43): #### Replace this (before): ```handlebars {{#if product.reviews.captcha}} <header class="panel-header"> <h3 class="panel-title">{{lang 'products.reviews.captcha_heading' }}</h3> </header> <div class="panel-body"> <script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k={{product.reviews.captcha}}"> </script> <noscript> <iframe src="https://www.google.com/recaptcha/api/noscript?k={{product.reviews.captcha}}" height="300" width="500" frameborder="0"></iframe> <br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> </div> {{/if}} ``` #### ...with this (after): ```handlebars {{{product.reviews.recaptcha.markup}}} ``` ### <a name="contact"></a> Contact-Us Template In your theme's `templates/components/page/contact-us-form.html` template, make the changes shown below, based on [this Cornerstone model](https://github.com/bigcommerce/cornerstone/pull/951/files#diff-5351402159301e1c225752f03d9f1f8e): #### Replace this (before): ```handlebars {{#if forms.contact.recaptcha.enabled}} <div class="panel"> <header class="panel-header"> <h3 class="panel-title">{{lang 'forms.contact_us.captcha'}}</h3> </header> <div class="panel-body"> <script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k={{forms.contact.recaptcha.public_key}}"> </script> <noscript> <iframe src="https://www.google.com/recaptcha/api/noscript?k={{forms.contact.recaptcha.public_key}}" height="300" width="500" frameborder="0"></iframe> <br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> </div> </div> {{/if}} ``` #### ...with this (after): ```handlebars {{{forms.contact.recaptcha.markup}}} ```