Magento 2: How to Get Guest Email Address in Checkout?

You can get guest and customer other information in your custom js like customerinfo.js in Magento_Checkout/js/model/quote:

function ($,Component,quote,placeOrderAction) {
'use strict';
return Component.extend({
defaults: {
template: 'Company_Module/custompayment/form_template'
getEmail: function () {
if(quote.guestEmail) return quote.guestEmail;
else return;
getLastName: function () {
return quote.billingAddress().lastname;
getFirstName: function () {
return quote.billingAddress().firstname;
getAddress: function () {
return quote.billingAddress().street[0]+", "+quote.billingAddress().postcode+" "+quote.billingAddress().city+", Maroc";
getPhone: function () {
return quote.billingAddress().telephone;
You can get guest's email id without login in checkout page, use avobe code.
Through this process you will able to gather customer's info which is improve your conversions.
Recent Posts

Leave a Comment

quick inquiry in magentoguys

100% Privacy - We Will Never Spam You!

Start typing and press Enter to search

new-magento-2.3-features-releaseMagento 2.3 Brings in Amazing New Features to ExploreTips to Enhance the Speed of your Magento StoreHow to Make Magento eCommerce Store Faster?