Atomia.Web.Plugin.PublicOrder.Controllers.PublicOrderController.RecalculateCart C# (CSharp) Method

RecalculateCart() public method

Recalculates the cart.
public RecalculateCart ( string arrayOfProducts, string arrayOfProductNames, string arrayOfProductQuantities, string arrayOfRenewalPeriods, bool displayProductName, bool displayProductPeriod, bool displayProductNumberOfItems, bool displayProductPrice, bool displayProductDiscount, bool displayProductTotalPrice, bool displayOrderSubAmount, bool displayOrderTaxes, bool displayOrderTotal, string chosenCountry, int globalCounter, string campaignCode, bool pricesIncludingVAT, string orderCustomAttributes, string orderAddress ) : System.Web.Mvc.ActionResult
arrayOfProducts string The array of products.
arrayOfProductNames string The array of product names.
arrayOfProductQuantities string The array of product quantities.
arrayOfRenewalPeriods string The array of product renewal periods.
displayProductName bool if set to true [display product name].
displayProductPeriod bool if set to true [display product period].
displayProductNumberOfItems bool if set to true [display product number of items].
displayProductPrice bool if set to true [display product price].
displayProductDiscount bool if set to true [display product discount].
displayProductTotalPrice bool if set to true [display product total price].
displayOrderSubAmount bool if set to true [display order sub amount].
displayOrderTaxes bool if set to true [display order taxes].
displayOrderTotal bool if set to true [display order total].
chosenCountry string The chosen country.
globalCounter int The global counter.
campaignCode string The campaign code.
pricesIncludingVAT bool if set to true [prices including VAT].
orderCustomAttributes string The order custom attributes.
orderAddress string The order address.
return System.Web.Mvc.ActionResult
        public ActionResult RecalculateCart(string arrayOfProducts, string arrayOfProductNames, string arrayOfProductQuantities, string arrayOfRenewalPeriods, bool displayProductName, bool displayProductPeriod, bool displayProductNumberOfItems, bool displayProductPrice, bool displayProductDiscount, bool displayProductTotalPrice, bool displayOrderSubAmount, bool displayOrderTaxes, bool displayOrderTotal, string chosenCountry, int globalCounter, string campaignCode, bool pricesIncludingVAT, string orderCustomAttributes, string orderAddress)
        {
            ShoppingCart result;

            string currencyFromCookie = null;
            if (System.Web.HttpContext.Current.Session["OrderCurrencyCode"] != null && !string.IsNullOrEmpty((string)System.Web.HttpContext.Current.Session["OrderCurrencyCode"]))
            {
                currencyFromCookie = (string)System.Web.HttpContext.Current.Session["OrderCurrencyCode"];
            }

            var service = GeneralHelper.GetPublicOrderService(this.HttpContext.ApplicationInstance.Context);
                bool resellerTos = Session != null && Session["resellerAccountData"] != null;
                result = CartHelper.RecalculateCart(
                    this,
                    arrayOfProducts,
                    arrayOfProductNames,
                    arrayOfProductQuantities,
                    arrayOfRenewalPeriods,
                    displayProductName,
                    displayProductPeriod,
                    displayProductNumberOfItems,
                    displayProductPrice,
                    displayProductDiscount,
                    displayProductTotalPrice,
                    displayOrderSubAmount,
                    displayOrderTaxes,
                    displayOrderTotal,
                    chosenCountry,
                    globalCounter,
                    service,
                    Guid.Empty,
                    currencyFromCookie,
                    ResellerHelper.GetResellerId(),
                    null,
                    campaignCode,
                    pricesIncludingVAT,
                    orderCustomAttributes,
                    orderAddress,
                    null,
                    resellerTos);

            return Json(result);
        }