Exemple #1
0
        public static void AddItem(int portalID, int productID, int quantity)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }
Exemple #2
0
        /*
        public static void AddItem(int portalID, int productID, int quantity, int deliveryMethod)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;
            itemInfo.DeliveryMethod = deliveryMethod;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }
        */
        // canadean changed: added method for the Data Extracts products
        public static void AddItem(int portalID, int productID, int quantity, int deliveryMethod, string modelNumber, string modelName, decimal cost)
        {
            string cartID = getCartID(portalID);

            ItemInfo itemInfo = new ItemInfo();
            itemInfo.CartID = cartID;
            if (productID == -1)
                productID = 15;        // DE product. Only used as a reference
            itemInfo.ProductID = productID;
            itemInfo.Quantity = quantity;
            itemInfo.DeliveryMethod = deliveryMethod;

            itemInfo.ModelNumber = modelNumber;
            itemInfo.ModelName = modelName;
            itemInfo.UnitCost = cost;

            CartController controller = new CartController();
            controller.AddItem(itemInfo);
        }