예제 #1
0
    private void LoadPaymentGateway()
    {
        string aspxRootPath = ResolveUrl("~/");
        List <PaymentGatewayListInfo> pginfo = AspxCartController.GetPGList(aspxCommonObj);

        StringBuilder paymentGateWay = new StringBuilder();

        foreach (var item in pginfo)
        {
            if (item.LogoUrl != "")
            {
                paymentGateWay.Append(
                    "<label><input id=\"rdb" +
                    item.PaymentGatewayTypeName + "\" name=\"PGLIST\" type=\"radio\" realname=\"" +
                    item.PaymentGatewayTypeName + "\" friendlyname=\"" + item.FriendlyName + "\"  source=\"" +
                    item.ControlSource + "\" value=\"" + item.PaymentGatewayTypeID +
                    "\" class=\"cssClassRadioBtn\" /><img class=\"cssClassImgPGList\" src=\"" + aspxRootPath +
                    item.LogoUrl + "\" alt=\"" + item.PaymentGatewayTypeName + "\" title=\"" +
                    item.PaymentGatewayTypeName + "\" visible=\"true\" /></label>");
            }
            else
            {
                paymentGateWay.Append("<label><input id=\"rdb" + item.PaymentGatewayTypeName +
                                      "\" name=\"PGLIST\" type=\"radio\" realname=\"" + item.PaymentGatewayTypeName +
                                      "\" friendlyname=\"" + item.FriendlyName + "\"  source=\"" + item.ControlSource +
                                      "\" value=\"" + item.PaymentGatewayTypeID + "\" class=\"cssClassRadioBtn\" /><b>" +
                                      item.PaymentGatewayTypeName + "</b></label>");
            }
        }
        ScriptsToRun += "CheckOut.BindPGFunction();";
        ltPgList.Text = paymentGateWay.ToString();
    }
    private List <CartInfo> LoadCartItems()
    {
        List <CartInfo> cartInfos = AspxCartController.GetCartDetails(aspxCommonObj);

        return(cartInfos);
    }
    private string GetDiscount()
    {
        decimal qtyDiscount = AspxCartController.GetDiscountQuantityAmount(aspxCommonObj);

        return("var asdf={};asdf.d=" + qtyDiscount + ";AspxCart.SetDiscountQuantityAmount(asdf);");
    }
예제 #4
0
 private void GetDiscount()
 {
     qtyDiscount = AspxCartController.GetDiscountQuantityAmount(aspxCommonObj);
 }
예제 #5
0
    private void DisplayCartItems()
    {
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string pageExtension          = SageFrameSettingKeys.PageExtension;
        string aspxTemplateFolderPath = ResolveUrl("~/") + "Templates/" + TemplateName;
        string aspxRootPath           = ResolveUrl("~/");

        double arrRewardtotalPrice = 0;
        string arrRewardDetails    = "";
        string arrRewardSub        = "";


        List <CartInfo> itemsList = LoadCartItems();

        if (itemsList.Count > 0)
        {
            CartPRDiscount = AspxCartController.GetDiscountPriceRule(itemsList[0].CartID, aspxCommonObj, 0);
            GetDiscount();
        }
        itemsList = itemsList.Select(e => { e.KitData = Regex.Replace(e.KitData, "[\"\"]+", "'"); return(e); }).ToList();
        Items     = json_serializer.Serialize(itemsList);

        StringBuilder scriptBuilder_root = new StringBuilder();
        StringBuilder cartItemList       = new StringBuilder();

        if (itemsList.Count > 0)
        {
            CartItemCount = itemsList.Count;
            cartItemList.Append(
                GetStringScript(
                    " $('.cssClassSubTotalAmount,.cssClassLeftRightBtn,.cssClassapplycoupon,.cssClassBlueBtnWrapper').show();"));
            cartItemList.Append(
                "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" id=\"tblCartList\" class=\"sfGridTableWrapper\">");
            cartItemList.Append("<thead><tr class=\"cssClassHeadeTitle\" >");
            cartItemList.Append("<th class=\"cssClassSN\">Sn.");
            if (ShowItemImagesOnCart.ToLower() == "true")
            {
                cartItemList.Append("</th><th class=\"cssClassItemImageWidth\">");
                cartItemList.Append(getLocale("Item Description"));
            }
            cartItemList.Append("</th><th>");
            cartItemList.Append(getLocale("Variants"));
            cartItemList.Append("</th>");
            cartItemList.Append("<th class=\"cssClassQTY\">");
            cartItemList.Append(getLocale("Qty"));
            cartItemList.Append("</th>");
            cartItemList.Append("<th class=\"cssClassItemPrice\">");
            cartItemList.Append(getLocale("Unit Price"));
            cartItemList.Append("</th>");
            cartItemList.Append("<th class=\"cssClassSubTotal\">");
            cartItemList.Append(getLocale("Line Total"));
            cartItemList.Append("</th>");
            cartItemList.Append("<th class=\"cssClassAction\">");
            cartItemList.Append(getLocale("Action"));
            cartItemList.Append("</th>");
            cartItemList.Append(" </tr>");
            cartItemList.Append("</thead>");
            cartItemList.Append("<tbody>");
            List <BasketItem> basketItems = new List <BasketItem>();
            int index = 0;

            string bsketItems = "";
            bsketItems += "[";
            foreach (CartInfo item in itemsList)
            {
                if (item.ItemTypeID == 1)
                {
                    string bitems = "{" +
                                    string.Format(
                        "\'Height\':'{0}',\'ItemName\':'{1}',\'Length\':'{2}',\'Quantity\':'{3}',\'WeightValue\':'{4}',\'Width\':'{5}'",
                        item.Height ?? 0, item.ItemName,
                        item.Length ?? 0, item.Quantity.ToString(),
                        decimal.Parse(item.Weight.ToString()), item.Width ?? 0
                        )

                                    + "},";
                    bsketItems += bitems;
                }

                index = index + 1;
                string imagePath = "Modules/AspxCommerce/AspxItemsManagement/uploads/" + item.ImagePath;
                if (item.ImagePath == "")
                {
                    imagePath = NoImageMyCartPath;
                }
                else if (item.AlternateText == "")
                {
                    item.AlternateText = item.ItemName;
                    //Resize Image Dynamically
                    InterceptImageController.ImageBuilder(item.ImagePath, ImageType.Small, ImageCategoryType.Item, aspxCommonObj);
                }
                else if (item.ImagePath != "")
                {
                    //Resize Image Dynamically
                    InterceptImageController.ImageBuilder(item.ImagePath, ImageType.Small, ImageCategoryType.Item, aspxCommonObj);
                }

                if ((itemsList.IndexOf(item)) % 2 == 0)
                {
                    cartItemList.Append("<tr class=\"sfEven\" >");
                }
                else
                {
                    cartItemList.Append("<tr class=\"sfOdd\" >");
                }
                cartItemList.Append("<td>");
                cartItemList.Append("<b>" + index + "." + "</b>");
                ;
                cartItemList.Append("</td>");
                if (item.ItemTypeID == 3)
                {
                    cartItemList.Append("<td>");

                    if (ShowItemImagesOnCart.ToLower() == "true")
                    {
                        cartItemList.Append("<p class=\"cssClassCartPicture\">");
                        cartItemList.Append("<img src='" + aspxRootPath +
                                            imagePath.Replace("uploads", "uploads/Small") + "'  alt=\"" +
                                            item.AlternateText + "\" title=\"" + item.AlternateText + "\" ></p>");
                    }
                    cartItemList.Append("<div class=\"cssClassCartPictureInformation\">");


                    cartItemList.Append("<a href=\"item/" + item.SKU + pageExtension + "\" costvariants=\"" +
                                        item.CostVariants +
                                        "\" onclick=\"AspxCart.SetCostVartSession(this);\" >" + item.ItemName +
                                        "</a>");
                    cartItemList.Append("<ul class='giftcardInfo'>");
                    cartItemList.Append("<li>");
                    cartItemList.Append(item.ShortDescription);
                    cartItemList.Append("</li>");
                    cartItemList.Append("</ul>");
                    cartItemList.Append("</div>");



                    cartItemList.Append("</td>");
                }
                else if (item.ItemTypeID == 6)
                {
                    cartItemList.Append("<td>");

                    if (ShowItemImagesOnCart.ToLower() == "true")
                    {
                        cartItemList.Append("<p class=\"cssClassCartPicture\">");
                        cartItemList.Append("<img src='" + aspxRootPath +
                                            imagePath.Replace("uploads", "uploads/Small") + "'  alt=\"" +
                                            item.AlternateText + "\" title=\"" + item.AlternateText + "\" ></p>");
                    }
                    cartItemList.Append("<div class=\"cssClassCartPictureInformation\">");


                    cartItemList.Append("<a href=\"item/" + item.SKU + pageExtension + "\" costvariants=\"" +
                                        item.CostVariants +
                                        "\" onclick=\"AspxCart.SetCostVartSession(this);\" >" + item.ItemName +
                                        "</a>");
                    string[] lis = Regex.Split(item.ShortDescription, "</br>");
                    cartItemList.Append("<ul class='kitInfo'>");

                    foreach (var li in lis)
                    {
                        cartItemList.Append("<li>" + li + "</li>");
                    }
                    cartItemList.Append("</ul>");
                    cartItemList.Append("</div>");


                    cartItemList.Append("</td>");
                }
                else
                {
                    cartItemList.Append("<td>");
                    if (ShowItemImagesOnCart.ToLower() == "true")
                    {
                        cartItemList.Append("<p class=\"cssClassCartPicture\">");
                        cartItemList.Append("<img src='" + aspxRootPath +
                                            imagePath.Replace("uploads", "uploads/Small") + "'  alt=\"" +
                                            item.AlternateText + "\" title=\"" + item.AlternateText + "\" ></p>");
                    }
                    cartItemList.Append("<div class=\"cssClassCartPictureInformation\">");

                    if (item.CostVariantsValueIDs != "")
                    {
                        cartItemList.Append("<a href=\"item/" + item.SKU + pageExtension + "?varId=" +
                                            item.CostVariantsValueIDs + "\"  costvariants=\"" + item.CostVariants +
                                            "\" onclick=\"AspxCart.SetCostVartSession(this);\" >" + item.ItemName +
                                            "</a>");
                    }
                    else
                    {
                        cartItemList.Append("<a href=\"item/" + item.SKU + pageExtension + "\" costvariants=\"" +
                                            item.CostVariants +
                                            "\" onclick=\"AspxCart.SetCostVartSession(this);\" >" + item.ItemName +
                                            "</a>");
                    }
                    cartItemList.Append("</div>");
                    cartItemList.Append("</td>");
                }
                cartItemList.Append("<td class=\"row-variants\">");
                cartItemList.Append(item.CostVariants);
                cartItemList.Append("</td>");
                cartItemList.Append("<td class=\"cssClassQTYInput\">");
                cartItemList.Append("<input class=\"num-pallets-input\" autocomplete=\"off\" price=\"" +
                                    Math.Round(double.Parse((item.Price).ToString()), 2).ToString() +
                                    "\" id=\"txtQuantity_" + item.CartItemID + "\" type=\"text\" cartID=\"" +
                                    item.CartID +
                                    "\" value=\"" + item.Quantity + "\" sku=\"" + item.SKU + "\"  quantityInCart=\"" + item.Quantity +
                                    "\" actualQty=\"" + item.ItemQuantity + "\" costVariantID=\"" +
                                    item.CostVariantsValueIDs + "\" itemID=\"" + item.ItemID + "\" addedValue=\"" +
                                    item.Quantity + "\" minCartQuantity=\"" + item.MinCartQuantity + "\" maxCartQuantity=\"" + item.MaxCartQuantity + "\">");
                cartItemList.Append("<label class=\"lblNotification\" style=\"color: #FF0000;\"></label></td>");
                cartItemList.Append("<td class=\"price-per-pallet\">");
                cartItemList.Append(
                    "<span class=\"cssClassFormatCurrency\">" +
                    Math.Round(double.Parse((item.Price).ToString()), 2).ToString("N2") + "</span>");
                cartItemList.Append("</td>");
                cartItemList.Append("<td class=\"row-total\">");
                cartItemList.Append("<input class=\"row-total-input cssClassFormatCurrency\" autocomplete=\"off\" id=\"txtRowTotal_" +
                                    item.CartID + "\" value=\"" +
                                    Math.Round(double.Parse((item.TotalItemCost).ToString()), 2).ToString("N2") +
                                    "\"  readonly=\"readonly\" type=\"text\" />");
                cartItemList.Append("</td>");
                cartItemList.Append("<td>");
                cartItemList.Append(" <a class=\"ClassDeleteCartItems\" title=\"Delete\" value=\"" +
                                    item.CartItemID + "\" cartID=\"" + item.CartID + "\"><i class=\"i-delete\"></i></a>");
                cartItemList.Append("</td>");
                cartItemList.Append("</tr>");

                arrRewardtotalPrice += Math.Round(double.Parse((item.Price * item.Quantity).ToString()), 2);

                arrRewardSub += "'<li>'+ " + item.Quantity + "+'X' +eval(" + (item.Price) +
                                "* rewardRate).toFixed(2)+ '</li>'+";
                arrRewardDetails += "'<li><b>'+eval( " + (item.TotalItemCost) +
                                    "* rewardRate).toFixed(2)+ '</b> " + getLocale("Points for Product:") + item.ItemName +
                                    "&nbsp &nbsp</li>'+";

                if (index == itemsList.Count)
                {
                    StringBuilder scriptBuilder = new StringBuilder();

                    scriptBuilder.Append("AspxCart.Vars.CartID =" + item.CartID + ";");
                    scriptBuilder.Append(" var rewardRate = parseFloat($('#hdnRewardRate').val());");
                    scriptBuilder.Append("var arrRewardDetails =" +
                                         arrRewardDetails.Substring(0, arrRewardDetails.Length - 1) + ";");
                    scriptBuilder.Append("var  arrRewardSub =" + arrRewardSub.Substring(0, arrRewardSub.Length - 1) +
                                         ";");
                    scriptBuilder.Append("if (isPurchaseActive == true){");
                    scriptBuilder.Append("$('#dvPointsTotal').empty(); $('#ulRewardDetails').html(arrRewardDetails);");
                    scriptBuilder.Append("$('#ulRewardSub').html(arrRewardSub);");
                    scriptBuilder.Append("$('#dvPointsTotal').append(eval(" + arrRewardtotalPrice + " * rewardRate).toFixed(2));");

                    scriptBuilder.Append("} ");
                    scriptBuilder.Append("AspxCart.GetDiscountCartPriceRule(AspxCart.Vars.CartID, 0);");
                    scriptBuilder.Append("$('#tblCartList tr:even ').addClass('sfEven');");
                    scriptBuilder.Append("$('#tblCartList tr:odd ').addClass('sfOdd');");
                    scriptBuilder.Append("$('.cssClassCartPicture img[title]').tipsy({ gravity: 'n' });");
                    scriptBuilder.Append("AspxCart.BindCartFunctions();");
                    bsketItems  = bsketItems.Substring(0, bsketItems.Length - 1);
                    bsketItems += "]";
                    scriptBuilder.Append(" AspxCart.SetBasketItems(eval(\"" + bsketItems + "\"));");
                }
            }
            cartItemList.Append("</table>");


            string rewardScript = LoadRewardPoints();
            scriptBuilder_root.Append(rewardScript);
            scriptBuilder_root.Append("if (isPurchaseActive == true){");
            scriptBuilder_root.Append(" var rewardRate = parseFloat($('#hdnRewardRate').val());");
            scriptBuilder_root.Append("var arrRewardDetails =" +
                                      arrRewardDetails.Substring(0, arrRewardDetails.Length - 1) + ";");
            scriptBuilder_root.Append("var  arrRewardSub =" + arrRewardSub.Substring(0, arrRewardSub.Length - 1) +
                                      ";");
            scriptBuilder_root.Append("$('#dvPointsTotal').empty(); $('#ulRewardDetails').html(arrRewardDetails);");
            scriptBuilder_root.Append("$('#ulRewardSub').html(arrRewardSub);");
            scriptBuilder_root.Append("$('#dvPointsTotal').append(eval(" + arrRewardtotalPrice + " * rewardRate).toFixed(2));");

            scriptBuilder_root.Append("} ");
            ltCartItems.Text = cartItemList.ToString();
        }
        else
        {
            StringBuilder scriptBuilder = new StringBuilder();

            scriptBuilder.Append("$('.cssClassCartInformation').html('<span class=\"cssClassNotFound\">" +
                                 getLocale("Your cart is empty!") + "</span>');");
            string script = GetStringScript(scriptBuilder.ToString());
            ltCartItems.Text = script;
        }
    }
예제 #6
0
    private void LoadCartDetails(AspxCommonInfo aspxCommonObj)
    {
        string resolvedUrl = ResolveUrl("~/");
        string modulePath  = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string pageExtension          = SageFrameSettingKeys.PageExtension;
        string aspxTemplateFolderPath = resolvedUrl + "Templates/" + TemplateName;
        string aspxRootPath           = resolvedUrl;


        StringBuilder cartDetails   = new StringBuilder();
        StringBuilder scriptBuilder = new StringBuilder();

        List <CartInfo> lstCart = AspxCartController.GetCartCheckOutDetails(aspxCommonObj);

        cartCount = lstCart.Count;
        lstCart   = lstCart.Select(e => { e.KitData = Regex.Replace(e.KitData, "[\"\"]+", "'"); return(e); }).ToList();
        Items     = json_serializer.Serialize(lstCart);
        cartDetails.Append("<table class=\"sfGridTableWrapper\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" id=\"tblCartList\">");
        cartDetails.Append("<thead><tr class=\"cssClassHeadeTitle\">");
        cartDetails.Append("<th class=\"cssClassSN\"> Sn.");
        cartDetails.Append(" </th><th class=\"cssClassProductImageWidth\">");
        cartDetails.Append(getLocale("Item Image"));
        cartDetails.Append("</th>");
        cartDetails.Append("<th>");
        cartDetails.Append(getLocale("Variants"));
        cartDetails.Append("</th>");
        cartDetails.Append("<th class=\"cssClassQTY\">");
        cartDetails.Append(getLocale("Qty"));
        cartDetails.Append("</th>");
        cartDetails.Append("<th class=\"cssClassProductPrice\">");
        cartDetails.Append(getLocale("Unit Price"));
        cartDetails.Append("</th>");
        cartDetails.Append("<th class=\"cssClassSubTotal\">");
        cartDetails.Append(getLocale("Line Total"));
        cartDetails.Append("</th>");
        cartDetails.Append("<th class=\"cssClassTaxRate\">");
        cartDetails.Append(getLocale("Unit Tax"));
        cartDetails.Append("</th>");
        cartDetails.Append("</tr>");
        cartDetails.Append("</thead");
        cartDetails.Append("<tbody>");

        int    giftcardCount = 0;
        int    index = 0;
        string itemids = "";
        bool   IsDownloadItemInCart = false, ShowShippingAdd = false;
        int    CartID     = 0;//int CountDownloadableItem = 0, CountAllItem = 0,
        string bsketItems = "";

        bsketItems += "[";
        foreach (CartInfo item in lstCart)
        {
            if (item.ItemTypeID == 1 || item.ItemTypeID == 6)
            {
                string bitems = "{" +
                                string.Format(
                    "Height:{0},ItemName:\\'{1}\\',Length:{2},Quantity:{3},WeightValue:{4},Width:{5}",
                    item.Height ?? 0, HttpUtility.HtmlEncode(item.ItemName),
                    item.Length ?? 0, item.Quantity.ToString(), decimal.Parse(item.Weight.ToString()), item.Width ?? 0
                    )

                                + "},";
                bsketItems += bitems;
            }


            itemids += item.ItemID + "#" + item.CostVariantsValueIDs + ",";

            index++;
            string imagePath = "Modules/AspxCommerce/AspxItemsManagement/uploads/" + item.ImagePath;
            if (item.ImagePath == "")
            {
                imagePath = noImageCheckOutInfoPath;
            }
            else if (item.AlternateText == string.Empty)
            {
                item.AlternateText = item.ItemName;
            }
            if (item.ItemTypeID == 2)
            {
                IsDownloadItemInCart = true;
                CountDownloadableItem++;
            }
            var isVirtual = false;
            if (item.ItemTypeID == 3)
            {
                int typ = AspxGiftCardController.GetGiftCardType(aspxCommonObj, item.CartItemID);

                if (typ > 0)
                {
                    if (typ == 2)
                    {
                        ShowShippingAdd = false;
                        isVirtual       = false;
                    }
                    else
                    {
                        ShowShippingAdd = true;
                        isVirtual       = true;
                    }
                }

                giftcardCount++;
                if (lstCart.Count != giftcardCount)
                {
                    ShowShippingAdd = false;
                }
            }

            CountAllItem++;
            cartDetails.Append("<tr >");
            cartDetails.Append("<td><input type=\"hidden\" name=\"cartItemId\" value=\"");
            cartDetails.Append(item.CartItemID);
            cartDetails.Append("\" />");
            cartDetails.Append("<b>");
            cartDetails.Append(index);
            cartDetails.Append(".</b>");
            cartDetails.Append("</td>");
            cartDetails.Append("<td>");
            cartDetails.Append("<p class=\"cssClassCartPicture\">");
            cartDetails.Append("<img title=\"");
            cartDetails.Append(item.AlternateText);
            cartDetails.Append("\" src=\"");
            cartDetails.Append(aspxRedirectPath);
            cartDetails.Append(imagePath.Replace("uploads", "uploads/Small"));
            cartDetails.Append("\" ></p>");
            cartDetails.Append("<div class=\"cssClassCartPictureInformation\">");
            cartDetails.Append("<h3>");
            if (item.CostVariantsValueIDs != string.Empty)
            {
                cartDetails.Append("<a class=\"cssClassLink\" id=\"item_");
                cartDetails.Append(item.ItemID);
                cartDetails.Append(" itemType=\"");
                cartDetails.Append(item.ItemTypeID);
                cartDetails.Append("\"  href=\"");
                cartDetails.Append(aspxRedirectPath);
                cartDetails.Append("item/");
                cartDetails.Append(item.SKU);
                cartDetails.Append(pageExtension);
                cartDetails.Append("?varId=");
                cartDetails.Append(item.CostVariantsValueIDs);
                cartDetails.Append("\">");
                cartDetails.Append(item.ItemName);
                cartDetails.Append("\" </a></h3>");
            }
            else
            {
                if (item.ItemTypeID == 3)
                {
                    cartDetails.Append("<a class=\"cssClassLink\" id=\"item_");
                    cartDetails.Append(item.ItemID);
                    cartDetails.Append("_");
                    cartDetails.Append(index);
                    cartDetails.Append("\" isvirtual=\"");

                    cartDetails.Append(isVirtual);
                    cartDetails.Append("\" itemType=\"");
                    cartDetails.Append(item.ItemTypeID);
                    cartDetails.Append("\"  href=\"");
                    cartDetails.Append(aspxRedirectPath);
                    cartDetails.Append("item/");
                    cartDetails.Append(item.SKU);
                    cartDetails.Append(pageExtension);
                    cartDetails.Append("\">");
                    cartDetails.Append(item.ItemName);
                    cartDetails.Append("</a></h3>");
                }
                else
                {
                    cartDetails.Append("<a class=\"cssClassLink\" id=\"item_");
                    cartDetails.Append(item.ItemID);
                    cartDetails.Append("_");
                    cartDetails.Append(index);
                    cartDetails.Append("\"  itemType=\"");

                    cartDetails.Append(item.ItemTypeID);
                    cartDetails.Append("\"  href=\"");
                    cartDetails.Append(aspxRedirectPath);
                    cartDetails.Append("item/");
                    cartDetails.Append(item.SKU);
                    cartDetails.Append(pageExtension);
                    cartDetails.Append("\">");
                    cartDetails.Append(item.ItemName);
                    cartDetails.Append("</a></h3>");
                }
            }
            cartDetails.Append("</div>");
            cartDetails.Append("</td>");
            cartDetails.Append("<td class=\"row-variants\" varIDs=\"");
            cartDetails.Append(item.CostVariantsValueIDs);
            cartDetails.Append("\">");
            cartDetails.Append(item.CostVariants);
            cartDetails.Append("</td>");
            cartDetails.Append("<td class=\"cssClassPreviewQTY\">");
            cartDetails.Append("<input class=\"num-pallets-input\" taxrate=\"0\" price=\"");
            cartDetails.Append(item.Price);
            cartDetails.Append("\" id=\"txtQuantity_");
            cartDetails.Append(item.CartID);
            cartDetails.Append("\" type=\"text\" readonly=\"readonly\" disabled=\"disabled\" value=\"");
            cartDetails.Append(item.Quantity);
            cartDetails.Append("\">");
            cartDetails.Append("</td>");
            cartDetails.Append("<td class=\"price-per-pallet\">");
            cartDetails.Append("<span id=\"");
            cartDetails.Append(item.Weight);
            cartDetails.Append("\" class=\"cssClassFormatCurrency\">");
            cartDetails.Append(Convert.ToDecimal(item.Price).ToString("N2") + "</span>");
            cartDetails.Append("</td>");
            cartDetails.Append("<td class=\"row-total\">");
            cartDetails.Append("<input class=\"row-total-input cssClassFormatCurrency\" id=\"txtRowTotal_");
            cartDetails.Append(item.CartID);
            cartDetails.Append("\"  value=\"");
            cartDetails.Append(Convert.ToDecimal(item.TotalItemCost).ToString("N2"));
            cartDetails.Append("\" baseValue=\"");
            cartDetails.Append(Convert.ToDecimal(item.TotalItemCost).ToString("N2"));
            cartDetails.Append("\"  readonly=\"readonly\" type=\"text\" />");
            cartDetails.Append("</td>");
            cartDetails.Append("<td class=\"row-taxRate\">");
            cartDetails.Append("<span class=\"cssClassFormatCurrency\">0.00</span>");
            cartDetails.Append("</td>");
            cartDetails.Append("</tr>");
            CartID = item.CartID;
        }
        cartDetails.Append("</table>");
        if (bsketItems.Length > 1)
        {
            bsketItems = bsketItems.Substring(0, bsketItems.Length - 1);
        }
        bsketItems += "]";
        scriptBuilder.Append("  CheckOut.SetBasketItems(eval(\"");
        scriptBuilder.Append(bsketItems);
        scriptBuilder.Append("\")); CheckOut.Vars.ItemIDs=\"");
        scriptBuilder.Append(itemids);
        scriptBuilder.Append("\";");
        scriptBuilder.Append("CheckOut.UserCart.CartID=");
        scriptBuilder.Append(CartID);
        scriptBuilder.Append(";");
        scriptBuilder.Append(" CheckOut.UserCart.ShowShippingAdd=");
        scriptBuilder.Append(ShowShippingAdd.ToString().ToLower());
        scriptBuilder.Append(";");
        scriptBuilder.Append(" CheckOut.UserCart.IsDownloadItemInCart=");
        scriptBuilder.Append(IsDownloadItemInCart.ToString().ToLower());
        scriptBuilder.Append(";");
        scriptBuilder.Append(" CheckOut.UserCart.CountDownloadableItem=");
        scriptBuilder.Append(CountDownloadableItem);
        scriptBuilder.Append(";");
        scriptBuilder.Append(" CheckOut.UserCart.CountAllItem=");
        scriptBuilder.Append(CountAllItem);
        scriptBuilder.Append("; ");//CheckOut.BindFunction();
        scriptBuilder.Append("$(\"#tblCartList tr:even\").addClass(\"sfEven\");$(\"#tblCartList tr:odd\").addClass(\"sfOdd\");");
        ScriptsToRun  += scriptBuilder.ToString();
        ltTblCart.Text = cartDetails.ToString();
    }
    public void GetCartItemListDetails()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        aspxCommonObj.CustomerID  = CustomerID;
        aspxCommonObj.SessionCode = SessionCode;
        string modulePath             = this.AppRelativeTemplateSourceDirectory;
        string aspxTemplateFolderPath = ResolveUrl("~/") + "Templates/" + TemplateName;
        string aspxRootPath           = ResolveUrl("~/");

        hst = AppLocalized.getLocale(modulePath);
        string          pageExtension   = SageFrameSettingKeys.PageExtension;
        List <CartInfo> lstCart         = AspxCartController.GetCartDetails(aspxCommonObj);
        StringBuilder   cartItemContent = new StringBuilder();

        if (lstCart != null && lstCart.Count > 0)
        {
            for (int index = 0; index < lstCart.Count; index++)
            {
                TotalPrice += (decimal)lstCart[index].TotalItemCost;
                if (lstCart[index].CostVariants != "")
                {
                    cartItemContent.Append("<tr id=\"productID_");
                    cartItemContent.Append(lstCart[index].ItemID);
                    cartItemContent.Append("\"><td class=\"cssClassName\"><a costvariants=\"");
                    cartItemContent.Append(lstCart[index].CostVariants);
                    cartItemContent.Append("\" href=\"");
                    cartItemContent.Append(aspxRedirectPath);
                    cartItemContent.Append("item/");
                    cartItemContent.Append(lstCart[index].SKU + pageExtension);
                    cartItemContent.Append("\">");
                    cartItemContent.Append(lstCart[index].ItemName);
                    cartItemContent.Append(" (" + lstCart[index].CostVariants + ")");
                    cartItemContent.Append("</a></td><td class=\"cssClassQty\">");
                    cartItemContent.Append(lstCart[index].Quantity);
                    cartItemContent.Append("</td><td>");
                    cartItemContent.Append("<span class=\"cssClassFormatCurrency\">");
                    cartItemContent.Append(lstCart[index].TotalItemCost * Rate);
                    cartItemContent.Append("</span></td><td class=\"cssClassDelete\"><img class=\"imgCartItemListDelete\" name=\"");
                    cartItemContent.Append(lstCart[index].CartItemID);
                    cartItemContent.Append("\" id=\"");
                    cartItemContent.Append(lstCart[index].CartID);
                    cartItemContent.Append("\" src=\"");
                    cartItemContent.Append(aspxTemplateFolderPath);
                    cartItemContent.Append("/images/admin/btndelete.png\"/></td></tr>");
                }
                else
                {
                    cartItemContent.Append("<tr id=\"productID_");
                    cartItemContent.Append(lstCart[index].ItemID);
                    cartItemContent.Append("\"><td class=\"cssClassName\"><a href=\"");
                    cartItemContent.Append(aspxRedirectPath);
                    cartItemContent.Append("item/");
                    cartItemContent.Append(lstCart[index].SKU + pageExtension);
                    cartItemContent.Append("\">");
                    cartItemContent.Append(lstCart[index].ItemName);
                    cartItemContent.Append("</a></td><td class=\"cssClassQty\">");
                    cartItemContent.Append(lstCart[index].Quantity);
                    cartItemContent.Append("</td><td><span class=\"cssClassFormatCurrency\">");
                    cartItemContent.Append(lstCart[index].TotalItemCost * Rate);
                    cartItemContent.Append("</span></td><td class=\"cssClassDelete\"><img class=\"imgCartItemListDelete\" name=\"");
                    cartItemContent.Append(lstCart[index].CartItemID);
                    cartItemContent.Append("\" id=\"");
                    cartItemContent.Append(lstCart[index].CartID);
                    cartItemContent.Append("\" src=\"");
                    cartItemContent.Append(aspxTemplateFolderPath);
                    cartItemContent.Append("/images/admin/btndelete.png\"/></td></tr>");
                }
            }
            cartItemContent.Append("<tr id=\"Product_total\"><td colspan=\"4\">");
            cartItemContent.Append("<span class=\"cssClassTotalPrice\">" + getLocale("Total :") +
                                   " </span><span class=\"cssClassFormatCurrency\">");
            cartItemContent.Append(TotalPrice * Rate);
            cartItemContent.Append("</span></td></tr>");
        }
        else
        {
            cartItemContent.Append("<tr><td></td></tr>");
        }
        ltrShoppingBagMini.Text = cartItemContent.ToString();
    }