Scenario
There are scenarios where users need to allow only existing customers to be able to do a Checkout from the Web Store. The option to do so can be found under (Administrator) Commerce > Websites > Website List > Edit > Shopping Tab > Type of Customer Registration = existing customers only. However, this is not available if the user has no Site Builder module provisioned. This option also disappears if the ADVANCED SITE CUSTOMIZATION feature is not enabled Setup > Company > Enable Features > Web Presence > Web Site.
Solution
- Navigate to Commerce > Websites > Website List.
- Edit the website record.
- Go to Analytics tab and add the code in the field Addition to <HEAD>.
<script>
(function() {
var jq = document.createElement(‘script’); jq.type = ‘text/javascript’;
jq.src = (‘https:’ == document.location.protocol ? ‘https://’ : ‘http://’) + ‘code.jquery.com/jquery-1.9.1.min.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(jq, s);
})();
</script>
<script>
$( document ).ready(function()
{
$(“a:contains(‘Register’)”)[0].style.display = ‘none’;
});
</script>