function retrieveUserFavorites(userEmail){
        var favorites_list = [];
        user_cart_ref = firebase.firestore().collection("Favorites").doc(userEmail);
        user_cart_ref.get().then(function(doc){
            if(doc.exists){
                favorites_list = Object.keys(doc.data());
                buildFavorites(favorites_list);
            }
            else{
                $('.items_container').remove();
            }
        })
    }
// retrieves the number of products in the user's cart
retrieves the number of products in the user's cart
retrieves the number of products in the user ' s cart
function retrieveUserFavorites(userEmail){
        var favorites_list = [];
        user_cart_ref = firebase.firestore().collection("Favorites").doc(userEmail);
        user_cart_ref.get().then(function(doc){
            if(doc.exists){
                favorites_list = Object.keys(doc.data());
                buildFavorites(favorites_list);
            }
            else{
                $('.items_container').remove();
            }
        })
    }
function retrieveUserFavorites ( userEmail ) { var favorites_list = [ ] ; user_cart_ref = firebase . firestore ( ) . collection ( "Favorites" ) . doc ( userEmail ) ; user_cart_ref . get ( ) . then ( function ( doc ) { if ( doc . exists ) { favorites_list = Object . keys ( doc . data ( ) ) ; buildFavorites ( favorites_list ) ; } else { $ ( '.items_container' ) . remove ( ) ; } } ) }
retrieves the number of products in the user's cart
retrieves the number of products in the user ' s cart