using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace myShoppingCartIntegration.Helper
    {
    // This is just random variable to hold the session key
   
    public static class Cart
        {
        // This is just random variable to hold the session key
        private const string CartSessionKey = "INSERT_ANY_KEY_HERE";
        public static string GetCartId(HttpContextBase context)
            {
            if (context.Session[CartSessionKey] == null)
                {
                // Lets use GUID as the key
                Guid tempCartId = Guid.NewGuid();
                // Send tempCartId back to client as a cookie
                context.Session[CartSessionKey] = tempCartId.ToString();
                //context.Session[CartSessionKey] = "a481a1f2-b0b6-4055-a6de-fc2cb844bf8b";
                //}
                }
            return context.Session[CartSessionKey].ToString();
            }
        }
    }