Exemple #1
0
        public CashOnDelivery(Traffic traffic,
                              LandingPage landingPage,
                              SalesPage salesPage,
                              UpSell upSell,
                              CallCenter callCenter,
                              Shipping shipping)
            : base(traffic, landingPage, salesPage, upSell)
        {
            (CallCenter, Shipping) = (callCenter, shipping);

            double actions = Traffic.Amount * LandingPage.CTR * CallCenter.CR;

            Costs = new Number
            {
                Name  = "Total Costs",
                Total = Traffic.TotalCost
                        + (actions * SalesPage.CR * SalesPage.Cost)
                        + (actions * UpSell.CR * UpSell.Cost)
                        + (actions * Shipping.Cost)
                        + (Traffic.Amount * LandingPage.CTR * CallCenter.Cost)
            };

            Profits = new Number
            {
                Name  = "Total Profits",
                Total =
                    (
                        (Traffic.Amount * LandingPage.CTR * CallCenter.CR * SalesPage.TotalProfitPerAction * SalesPage.TotalProfitPerAction) +
                        (Traffic.Amount * LandingPage.CTR * CallCenter.CR * UpSell.TotalProfitPerAction * UpSell.TotalProfitPerAction)
                    )
                    * Shipping.Deliverability
            };

            Balance = new Number
            {
                Name  = "Balance",
                Total = Profits.Total - Costs.Total
            };
        }
Exemple #2
0
        public ECommerce(Traffic traffic, LandingPage landingPage, SalesPage salesPage, UpSell upSell)
        {
            (Traffic, LandingPage, SalesPage, UpSell) = (traffic, landingPage, salesPage, upSell);
            double actions = Traffic.Amount * LandingPage.CTR * SalesPage.CR;

            Costs = new Number
            {
                Name  = "Total Costs",
                Total = Traffic.TotalCost
                        + (actions * SalesPage.Cost)
                        + (actions * UpSell.CR * UpSell.Cost)
            };

            Profits = new Number
            {
                Name  = "Total Profits",
                Total = (actions * SalesPage.Price)
                        + (actions * UpSell.CR * UpSell.Price)
            };

            Balance = new Number
            {
                Name  = "Balance",
                Total = Profits.Total - Costs.Total
            };
        }