Documentation You are here: start » v » 2.0 » snippets » guest_checkout

Guest Checkout

The following functionality allows your customers to checkout without entering an email address. You are required to enter a valid guest email that you would default to.

Add Javascript

Put this javascript in a custom header via the “add code to the header and footer” section in your store admin's Template Configuration Settings.

<script type="text/javascript">
jQuery(function ($) {
	$('#customer_email').val('GUEST@EMAIL.COM').trigger('change');
});
 
 
FC.client.on('customer-email-update', function (params) {
	if (params.customer_email == '') {
		params.customer_email = 'GUEST@EMAIL.COM';
	}
});
 
FC.client.event('customer-email-update.done').prepend(function (params) {
	if (params.customer_email == 'GUEST@EMAIL.COM') {
		FC.json.anonymous_checkout_selected = true;
	}
});
</script>

Site Tools