Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("MostViewedItems", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css");
                IncludeJs("MostViewedItems", "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js",
                          "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js",
                          "/js/AjaxFileUploader/ajaxupload.js", "/js/PopUp/custom.js", "/js/ExportToCSV/table2CSV.js",
                          "/Modules/AspxCommerce/AspxItemsManagement/js/MostViewedItems.js", "/js/CurrencyFormat/jquery.formatCurrency-1.4.0.js", "/js/CurrencyFormat/jquery.formatCurrency.all.js");

                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                Username    = GetUsername;
                CultureName = GetCurrentCultureName;
                StoreSettingConfig ssc = new StoreSettingConfig();
                CurrencyCode   = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, CultureName);
                CurrencySymbol = StoreSetting.GetSymbolFromCurrencyCode(CurrencyCode, GetStoreID, GetPortalID);

                string modulePath = this.AppRelativeTemplateSourceDirectory;
                hst = AppLocalized.getLocale(modulePath);
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #2
0
    private void BindBillingAddress(AddressInfo billingAddress)
    {
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        StringBuilder billingAdr = new StringBuilder();

        billingAdr.Append("<table><tr>");
        billingAdr.Append("<td>" + getLocale("Customer Name:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.FirstName + " " + billingAddress.LastName + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("Address:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.Address1 + "</td></tr><tr>");
        if (!string.IsNullOrEmpty(billingAddress.Address2))
        {
            billingAdr.Append("<td>" + getLocale("Address2:") + "</td>");
            billingAdr.Append("<td>" + billingAddress.Address2 + "</td></tr><tr>");
        }
        billingAdr.Append("<td>" + getLocale("Country:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.Country + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("City:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.City + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("State:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.State + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("ZipCode:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.Zip + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("Email Address:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.Email + "</td></tr><tr>");
        billingAdr.Append("<td>" + getLocale("Phone No:") + "</td>");
        billingAdr.Append("<td>" + billingAddress.Phone + "</td></tr>");
        billingAdr.Append("</table>");

        ltBillingAddress.Text   = billingAdr.ToString();
        Session["sl_frAddress"] = billingAddress;
    }
Пример #3
0
    public void GetAllBrandForSlider()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string aspxRootPath = ResolveUrl("~/");

        hst = AppLocalized.getLocale(BrandModulePath);
        string pageExtension             = SageFrameSettingKeys.PageExtension;
        AspxBrandViewController objBrand = new AspxBrandViewController();
        List <BrandViewInfo>    lstBrand = objBrand.GetAllBrandForSlider(aspxCommonObj, BrandCount);
        StringBuilder           element  = new StringBuilder();

        if (lstBrand != null && lstBrand.Count > 0)
        {
            element.Append("<ul id=\"brandSlider\">");
            foreach (BrandViewInfo value in lstBrand)
            {
                var       imagepath = aspxRootPath + value.BrandImageUrl;
                string [] imageFile = value.BrandImageUrl.ToString().Split('/');
                if (value.BrandImageUrl != "")
                {
                    //Resize Image Dynamically
                    InterceptImageController.ImageBuilder(imageFile[imageFile.Length - 1], ImageType.Small, ImageCategoryType.Brand, aspxCommonObj);
                }
                element.Append("<li><a href=\"");
                element.Append(aspxRedirectPath);
                element.Append("brand/");
                element.Append(AspxUtility.fixedEncodeURIComponent(value.BrandName));
                element.Append(pageExtension);
                element.Append("\"><img brandId=\"");
                element.Append(value.BrandID);
                element.Append("\" src=\"");
                element.Append(imagepath.Replace("uploads", "uploads/Small"));
                element.Append("\" alt=\"");
                element.Append(value.BrandName);
                element.Append("\" title=\"");

                element.Append(value.BrandName);
                element.Append("\"  /></a></li>");
            }
            element.Append("</ul>");
            element.Append("<span class=\"cssClassViewMore\"><a href=\"");
            element.Append(aspxRedirectPath);
            element.Append(BrandAllPage);
            element.Append(pageExtension);
            element.Append("\">" + getLocale("View All Brands") + "</a></span>");
        }

        else
        {
            element.Append("<span class='cssClassNotFound'>");
            element.Append(getLocale("The store has no brand!"));
            element.Append("</span>");
        }
        litSlide.Text = element.ToString();
    }
    public void GetAllSubCategoryForFilter()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string aspxTemplateFolderPath         = ResolveUrl("~/") + "Templates/" + TemplateName;
        List <CategoryDetailFilter> lstCatDet = AspxFilterController.GetAllSubCategoryForFilter(Categorykey, aspxCommonObj);
        StringBuilder elem = new StringBuilder();

        elem.Append("<div class=\"filter\">");
        if (lstCatDet != null && lstCatDet.Count > 0)
        {
            elem.Append("<div id=\"divCat\" value=\"b01\" class=\"cssClasscategorgy\">");
            elem.Append("<div class=\"divTitle\"><b><label style=\"color:#006699\">" + getLocale("Categories") + "</label></b><img align=\"right\" src=\"" + aspxTemplateFolderPath + "/images/arrow_up.png\"/></div> <div id=\"scrollbar1\" class=\"cssClassScroll\"> <div class=\"scrollbar\"> <div class=\"track\"><div class=\"thumb\" style=\"display:none\"> <div class=\"end\">  </div> </div>  </div>  </div><div class=\"viewport\"><div class=\"overview\" id=\"catOverview\"><div class=\"divContentb01\"><ul id=\"cat\">");
            foreach (CategoryDetailFilter value in lstCatDet)
            {
                elem.Append("<li><label><input class=\"chkCategory\" type=\"checkbox\" name=\"" + value.CategoryName + "\" ids=\"" + value.CategoryID + "\" value=\"" + value.CategoryName + "\"/> " + value.CategoryName + "<span> (" + value.ItemCount + ")</span></label></li>");
            }
            elem.Append("</ul></div></div></div></div></div>");
        }
        string brandFilter = GetAllBrandForCategory();

        elem.Append(brandFilter);
        elem.Append("</div>");
        ltrFilter.Text = elem.ToString();
    }
Пример #5
0
    private void GetUserRecentActivity()
    {
        string SessionCode = string.Empty;
        string myCartLink  = string.Empty;

        if (HttpContext.Current.Session.SessionID != null)
        {
            SessionCode = HttpContext.Current.Session.SessionID.ToString();
        }
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = GetStoreID;
        aspxCommonObj.PortalID    = GetPortalID;
        aspxCommonObj.UserName    = GetUsername;
        aspxCommonObj.CultureName = GetCurrentCultureName;
        aspxCommonObj.CustomerID  = GetCustomerID;
        aspxCommonObj.SessionCode = SessionCode;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string             pageExtension     = SageFrameSettingKeys.PageExtension;
        StringBuilder      cartHeader        = new StringBuilder();
        StringBuilder      scriptExecute     = new StringBuilder();
        int                cartCount         = AspxHeaderController.GetCartItemsCount(aspxCommonObj);
        StoreSettingConfig ssc               = new StoreSettingConfig();
        string             ShoppingCartURL   = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName);
        string             AllowAddToCart    = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, GetStoreID, GetPortalID, GetCurrentCultureName);
        SageFrameConfig    pagebase          = new SageFrameConfig();
        bool               IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
        StringBuilder      recentActivity    = new StringBuilder();

        recentActivity.Append("<h2>");
        recentActivity.Append(getLocale("Recent Activities"));
        recentActivity.Append("</h2>");
        recentActivity.Append("<li>");
        recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />");
        recentActivity.Append("</li>");
        if (AllowAddToCart.ToLower() == "true")
        {
            if (IsUseFriendlyUrls)
            {
                myCartLink = ShoppingCartURL + pageExtension;
            }
            else
            {
                myCartLink = ShoppingCartURL;
            }
            recentActivity.Append("<li>");
            recentActivity.Append(getLocale("Your Carts Contains:"));
            recentActivity.Append("<a href=\"");
            recentActivity.Append(myCartLink);
            recentActivity.Append("\">");
            recentActivity.Append(cartCount);
            recentActivity.Append(" ");
            recentActivity.Append("items");
            recentActivity.Append("</a>");
            recentActivity.Append("</li>");
        }
        ltrRecentActivity.Text = recentActivity.ToString();
    }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);
         if (!IsPostBack)
         {
             modulePath  = this.AppRelativeTemplateSourceDirectory;
             ServicePath = ResolveUrl(modulePath);
             hst         = AppLocalized.getLocale(modulePath);
             IncludeJs("ItemsCompare", "/js/jquery.cookie.js",
                       "/Modules/AspxCommerce/AspxCompareItems/js/ItemsCompare.js");
             IncludeCss("ItemsCompare", "/Modules/AspxCommerce/AspxCompareItems/css/module.css");
             StoreSettingConfig ssc = new StoreSettingConfig();
             DefaultImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
         }
         IncludeLanguageJS();
         CompareItems(aspxCommonObj);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Пример #7
0
    private void BindAllServices()
    {
        string serviceModulePath      = this.AppRelativeTemplateSourceDirectory;
        string aspxTemplateFolderPath = ResolveUrl("~/") + "Templates/" + TemplateName;
        string aspxRootPath           = ResolveUrl("~/");

        hst = AppLocalized.getLocale(serviceModulePath);
        string pageExtension = SageFrameSettingKeys.PageExtension;
        ServiceItemController         objService        = new ServiceItemController();
        List <ServiceItemSettingInfo> lstServiceSetting = objService.GetServiceItemSetting(aspxCommonObj);

        if (lstServiceSetting != null && lstServiceSetting.Count > 0)
        {
            foreach (var serviceSetting in lstServiceSetting)
            {
                isEnableService       = serviceSetting.IsEnableService.ToString();
                serviceCategoryInARow = serviceSetting.ServiceCategoryInARow.ToString();
                serviceCategoryCount  = serviceSetting.ServiceCategoryCount.ToString();
                isEnableServiceRss    = serviceSetting.IsEnableServiceRss.ToString();
                serviceRssCount       = serviceSetting.ServiceRssCount.ToString();
                serviceDetailsPage    = serviceSetting.ServiceDetailsPage;
                serviceRssPage        = serviceSetting.ServiceRssPage;
            }
        }
        List <ServiceCategoryInfo> lstAllService = objService.GetAllServices(aspxCommonObj);
        StringBuilder allServiceViewBld          = new StringBuilder();

        allServiceViewBld.Append("<div id=\"divBindAllServices\" class=\"cssClassAllService\">");
        if (lstAllService != null && lstAllService.Count > 0)
        {
            foreach (var allserviceInfo in lstAllService)
            {
                string serviceName = allserviceInfo.ServiceName;
                string imagePath   = "Modules/AspxCommerce/AspxCategoryManagement/uploads/" + allserviceInfo.ServiceImagePath;
                if (allserviceInfo.ServiceImagePath == "")
                {
                    imagePath = NoImageService;
                }
                else
                {
                    //Resize Image Dynamically
                    InterceptImageController.ImageBuilder(allserviceInfo.ServiceImagePath, ImageType.Medium, ImageCategoryType.Category, aspxCommonObj);
                }
                var hrefServices = aspxRedirectPath + serviceDetailsPage + "/" + AspxUtility.fixedEncodeURIComponent(serviceName) + pageExtension;
                allServiceViewBld.Append("<li><h3><a href=\"" + hrefServices + "\">");
                allServiceViewBld.Append("<div class=\"cssClassImgWrapper\">");
                allServiceViewBld.Append("<img src=\"" + aspxRootPath +
                                         imagePath.Replace("uploads", "uploads/Medium") +
                                         "\"/>");
                allServiceViewBld.Append("</div>" + serviceName + "</a></h3></li>");
            }
        }
        else
        {
            allServiceViewBld.Append("<span class=\"cssClassNotFound\">" + getLocale("There are no services available!") +
                                     "</span>");
        }
        allServiceViewBld.Append("</div>");
        ltrBindAllServices.Text = allServiceViewBld.ToString();
    }
Пример #8
0
    public void LoadAllCategoryForSearch()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;
        int    rowCount   = 0;

        hst = AppLocalized.getLocale(modulePath);
        AdvanceSearchController asc             = new AdvanceSearchController();
        List <CategoryInfo>     catList         = asc.GetAllCategoryForSearch("---", true, aspxCommonObj);
        StringBuilder           categoryContent = new StringBuilder();

        categoryContent.Append("<select id=\"ddlCategory\" class=\"\">");
        if (catList != null && catList.Count > 0)
        {
            categoryContent.Append("<option value='0'>" + getLocale("--All Category--") + "</option>");
            categoryContent.Append("<optgroup label=\"");
            categoryContent.Append(getLocale("General Categories"));
            categoryContent.Append("\">");

            foreach (CategoryInfo item in catList)
            {
                if (item.IsChecked == false)
                {
                    categoryContent.Append("<option value=" + item.CategoryID + " isGiftCard=" + item.IsChecked + ">" + item.LevelCategoryName + "</option>");
                }
                else
                {
                    rowCount += 1;
                    if (rowCount == 1)
                    {
                        categoryContent.Append("</optgroup>");
                        categoryContent.Append("<optgroup label=\"");
                        categoryContent.Append(getLocale("Gift Card Categories"));
                        categoryContent.Append("\">");
                    }
                    categoryContent.Append("<option value=" + item.CategoryID + " isGiftCard=" + item.IsChecked + ">" + item.LevelCategoryName + "</option>");
                }
            }
            if (rowCount > 0)
            {
                categoryContent.Append("</optgroup>");
            }
        }
        else
        {
            categoryContent.Append("<option value=\"-1\">No Category Listed!</option>");
        }
        categoryContent.Append("</select>");
        ltrCategories.Text = categoryContent.ToString();
    }
Пример #9
0
    private void GetSearchTerms(AspxCommonInfo aspxCommonObj)
    {
        int    TotalRows     = 0;
        string modulePath    = this.AppRelativeTemplateSourceDirectory;
        string pageExtension = SageFrameSettingKeys.PageExtension;

        GetAllCategoryForSearch(aspxCommonObj, modulePath, pageExtension);
        hst = AppLocalized.getLocale(modulePath);
        DataSet dsGeneralSearch = AspxSearchController.GetGeneralSearchDataSet(aspxCommonObj);

        if (dsGeneralSearch != null && dsGeneralSearch.Tables.Count == 2)
        {
            #region Search Terms
            DataTable dtSearchTerms = dsGeneralSearch.Tables[0];
            TotalRows = dtSearchTerms.Rows.Count;
            if (TotalRows > 0)
            {
                Elements = new StringBuilder();
                Elements.Append("<div id=\"topSearch\" class=\"cssClassTopSearch\" style=\"display: none\">");
                Elements.Append("<span>");
                Elements.Append(getLocale("Popular:"));
                Elements.Append("</span>");
                Elements.Append("<ul id=\"topSearchNew\">");
                string searchTerms = string.Empty;
                for (int i = 0; i < TotalRows; i++)
                {
                    searchTerms = dtSearchTerms.Rows[i]["SearchTerm"].ToString();
                    Elements.Append("<li><a href=\"");
                    Elements.Append(aspxRedirectPath);
                    Elements.Append("search/simplesearch");
                    Elements.Append(pageExtension);
                    Elements.Append("?cid=0&amp;isgiftcard=false&amp;q=");
                    Elements.Append(searchTerms);
                    Elements.Append("\">");
                    Elements.Append(searchTerms);
                    Elements.Append("</a></li>");
                }
                Elements.Append("</ul>");
                Elements.Append("</div>");
                litTopSearch.Text = Elements.ToString();
            }
            #endregion
            #region Search Setting
            DataTable dsSearchSetting = dsGeneralSearch.Tables[1];
            TotalRows = dsSearchSetting.Rows.Count;
            if (TotalRows == 1)
            {
                ShowCategoryForSearch = dsSearchSetting.Rows[0]["ShowCategoryForSearch"].ToString();
                EnableAdvanceSearch   = dsSearchSetting.Rows[0]["EnableAdvanceSearch"].ToString();
                ShowSearchKeyWords    = dsSearchSetting.Rows[0]["ShowSearchKeyWord"].ToString();
                AdvanceSearchPageName = dsSearchSetting.Rows[0]["AdvanceSearchPageName"].ToString();
            }
            #endregion
        }
    }
Пример #10
0
    public void GetAllBrandForSlider()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string aspxRootPath = ResolveUrl("~/");
        string modulePath   = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string           pageExtension = SageFrameSettingKeys.PageExtension;
        List <BrandInfo> lstBrand      = AspxBrandController.GetAllBrandForSlider(aspxCommonObj);
        StringBuilder    element       = new StringBuilder();
        int rowTotal = 0;

        if (lstBrand != null && lstBrand.Count > 0)
        {
            element.Append("<ul id=\"brandSlider\">");
            foreach (BrandInfo value in lstBrand)
            {
                rowTotal = value.RowTotal;
                var imagepath = aspxRootPath + value.BrandImageUrl;
                element.Append("<li><a href=\"");
                element.Append(aspxRedirectPath);
                element.Append("brand/");
                element.Append(value.BrandName);
                element.Append(pageExtension);
                element.Append("\"><img brandId=\"");
                element.Append(value.BrandID);
                element.Append("\" src=\"");
                element.Append(imagepath.Replace("uploads", "uploads/Small"));
                element.Append("\" alt=\"");
                element.Append(value.BrandName);
                element.Append("\" title=\"");
                element.Append(value.BrandName);
                element.Append("\"  /></a></li>");
            }
            element.Append("</ul>");
            element.Append("<span class=\"cssClassViewMore\"><a href=\"");
            element.Append(aspxRedirectPath);
            element.Append("Shop-By-Brand");
            element.Append(pageExtension);
            element.Append("\">" + getLocale("View All Brands") + "</a></span>");
        }

        if (rowTotal == 0)
        {
            element.Append("<span class='cssClassNotFound'>");
            element.Append(getLocale("The store has no brand!"));
            element.Append("</span>");
        }
        litSlide.Text = element.ToString();
    }
Пример #11
0
        private static string getLocale(string messageKey)
        {
            PopularTagsController.hst = AppLocalized.getLocale("~/Modules/AspxCommerce/AspxPopularTags/");
            string str = messageKey;

            if ((PopularTagsController.hst == null ? false : PopularTagsController.hst[messageKey] != null))
            {
                str = PopularTagsController.hst[messageKey].ToString();
            }
            return(str);
        }
    public void GetAllBrand()
    {
        hst = AppLocalized.getLocale(modulePath);
        List<BrandItemsInfo> lstBrand = AspxShopOptionController.ShoppingOptionsByBrand(aspxCommonObj);
        BrandCount = lstBrand.Count;
        StringBuilder brandContent = new StringBuilder();
        if (lstBrand != null && lstBrand.Count > 0)
        {
            StringBuilder brandHeader = new StringBuilder();
            brandHeader.Append("<div class=\"divTitle\"><b><label class=\"cssClassShoppingOptionByPrice\" style=\"color:#006699\">");
            brandHeader.Append(getLocale("By Brand"));
            brandHeader.Append("</label></b><img align=\"right\" alt=\"\" title=\"\" src=\"");
            brandHeader.Append(aspxTemplateFolderPath);
            brandHeader.Append("/images/arrow_up.png\"/></div>");
            ltrBrandHeader.Text = brandHeader.ToString();
            brandContent.Append("<ul class=\"cssShoppingBrand\">");
            foreach (BrandItemsInfo item in lstBrand)
            {
                brandContent.Append("<li><label><input type=\"checkbox\" class=\"chkShopByBrand\" name=\"");
                brandContent.Append(item.BrandName);
                brandContent.Append("\" value=\"");
                brandContent.Append(item.BrandID);
                brandContent.Append("\"/><span>");
                brandContent.Append(item.BrandName);
                brandContent.Append("&nbsp;(" + item.ItemCount + ")");
                brandContent.Append("</span></label></li>");
            }
            brandContent.Append("</ul>");
            if (lstBrand.Count > 7)
            {
                ltrBrandScroll.Text = brandContent.ToString();
            }
            else if (lstBrand.Count <= 7)
            {
                ltrBrandList.Text = brandContent.ToString();
            }
        }
        else
        {
            StringBuilder noBrandItems = new StringBuilder();
            noBrandItems.Append("<div class=\"divTitle\"><b><label class=\"cssClassShoppingOptionByPrice\" style=\"color:#006699\">");
            noBrandItems.Append(getLocale("By Brand"));
            noBrandItems.Append("</label></b><img align=\"right\" src=\"");
            noBrandItems.Append(aspxTemplateFolderPath);
            noBrandItems.Append("/images/arrow_up.png\"/></div>");
            noBrandItems.Append("<div id=\"divBrandNotFound\"><span class=\"cssClassNotFound\">");
            noBrandItems.Append(getLocale("There is no any Brand!"));
            noBrandItems.Append("</span></div>");
            ltrBrandList.Text = noBrandItems.ToString();
        }

    }
Пример #13
0
        private static string getLocale(string messageKey)
        {
            string modulePath = "~/Modules/AspxCommerce/AspxPopularTags/";

            hst = AppLocalized.getLocale(modulePath);
            string retStr = messageKey;

            if (hst != null && hst[messageKey] != null)
            {
                retStr = hst[messageKey].ToString();
            }
            return(retStr);
        }
Пример #14
0
    public string getLocale(string messageKey)
    {
        string modulePath = ResolveUrl((this.AppRelativeTemplateSourceDirectory));

        hst = AppLocalized.getLocale(modulePath);
        string retStr = messageKey;

        if (hst != null && hst[messageKey] != null)
        {
            retStr = hst[messageKey].ToString();
        }
        return(retStr);
    }
Пример #15
0
    private void GetUserRecentActivity(AspxCommonInfo aspxCommonObj)
    {
        string ShoppingCartURL = string.Empty;

        string myCartLink = string.Empty;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string        pageExtension = SageFrameSettingKeys.PageExtension;
        StringBuilder cartHeader    = new StringBuilder();
        StringBuilder scriptExecute = new StringBuilder();
        int           cartCount     = AspxHeaderController.GetCartItemsCount(aspxCommonObj);
        int           wishCount     = AspxHeaderController.CountWishItems(aspxCommonObj);

        StoreSettingConfig ssc = new StoreSettingConfig();

        ShoppingCartURL = ssc.GetStoreSettingsByKey(StoreSetting.ShoppingCartURL, GetStoreID, GetPortalID, GetCurrentCultureName);
        string          WishlistURL       = "/My-WishList.aspx";
        SageFrameConfig pagebase          = new SageFrameConfig();
        bool            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
        StringBuilder   recentActivity    = new StringBuilder();

        recentActivity.Append("<h2>");
        recentActivity.Append(getLocale("Recent Activities"));
        recentActivity.Append("</h2>");
        recentActivity.Append("<li>");
        recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />");
        recentActivity.Append("<li id='dashMyWishlist'>Your Wishlist Contains:<a href='");
        recentActivity.Append(WishlistURL);
        recentActivity.Append("'> <span class='cssClassTotalCount'>");
        recentActivity.Append(wishCount);
        recentActivity.Append(" items</span></a></li>");
        recentActivity.Append("</li>");

        if (AllowAddToCart.ToLower() == "true")
        {
            myCartLink = ShoppingCartURL + pageExtension;
            recentActivity.Append("<li>");
            recentActivity.Append(getLocale("Your Carts Contains:"));
            recentActivity.Append("<a href=\"");
            recentActivity.Append(myCartLink);
            recentActivity.Append("\"> ");
            recentActivity.Append(cartCount);
            recentActivity.Append(" ");
            recentActivity.Append("items");
            recentActivity.Append("</a>");
            recentActivity.Append("</li>");
        }

        ltrRecentActivity.Text = recentActivity.ToString();
    }
Пример #16
0
    private void GetProductList()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        int    offset     = 1;
        int    rowTotal   = 0;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        List <ProductListInfo> productListInfo = AspxProductListerController.GetProductLists(aspxCommonObj, count, offset);
        string        pageExtension            = SageFrameSettingKeys.PageExtension;
        StringBuilder ProductListContents      = new StringBuilder();

        if (productListInfo != null && productListInfo.Count > 0)
        {
            ProductListContents.Append("<div class=\"cssClassProductLists\"><ul>");
            foreach (ProductListInfo item in productListInfo)
            {
                string name = item.Name;
                rowTotal = item.RowTotal;
                string hrefItem = aspxRedirectPath + "item/" + fixedEncodeURIComponent(item.SKU) + pageExtension;
                ProductListContents.Append("<li><a href='" + hrefItem + "'>" + name + "</a></li>");
            }
            ProductListContents.Append("</ul>");
            if (rowTotal > count)
            {
                string href = aspxRedirectPath + CategoriesWiseItemUrl + pageExtension;
                ProductListContents.Append("<div id=\"productViewMore\" class=\"cssClassViewMore\">");
                ProductListContents.Append("<a href='" + href + "'>");
                ProductListContents.Append("<span>");
                ProductListContents.Append(getLocale("View More"));
                ProductListContents.Append("</span></a></div>");
            }
            ProductListContents.Append("</div>");
            divProductLists.InnerHtml = ProductListContents.ToString();
        }
        else
        {
            ProductListContents.Append("<span class=\"cssClassNotFound\">");
            ProductListContents.Append(getLocale("There are no products!"));
            ProductListContents.Append("</span>");
            divProductLists.InnerHtml = ProductListContents.ToString();
        }
    }
Пример #17
0
    public void GetTagsByUserName()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = GetStoreID;
        aspxCommonObj.PortalID    = GetPortalID;
        aspxCommonObj.UserName    = GetUsername;
        aspxCommonObj.CultureName = GetCurrentCultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string pageExtension = SageFrameSettingKeys.PageExtension;
        List <TagDetailsInfo> lstTagDetail = AspxTagsController.GetTagsByUserName(aspxCommonObj);
        StringBuilder         MyTags       = new StringBuilder();

        MyTags.Append("<div id=\"divMyTags\">");
        MyTags.Append("<ul>");

        if (lstTagDetail != null && lstTagDetail.Count > 0)
        {
            foreach (TagDetailsInfo value in lstTagDetail)
            {
                MyTags.Append("<li class=\"tag_content\"><a href=\"");
                MyTags.Append(aspxRedirectPath);
                MyTags.Append("tagsitems/tags");
                MyTags.Append(pageExtension);
                MyTags.Append("?tagsId=");
                MyTags.Append(value.ItemTagIDs);
                MyTags.Append("\"><span>");
                MyTags.Append(value.Tag);
                MyTags.Append("</span></a>");
                MyTags.Append("<button type=\"button\" class=\"cssClassCross\" value=");
                MyTags.Append(value.ItemTagIDs);
                MyTags.Append(" onclick =\"Tags.DeleteMyTag(this)\"><span>");
                MyTags.Append(getLocale("x"));
                MyTags.Append("</span></button></li>");
            }
        }
        else
        {
            MyTags.Append("<span class=\"cssClassNotFound\">");
            MyTags.Append(getLocale("Your tag list is empty!"));
            MyTags.Append("</span>");
        }
        MyTags.Append("</ul><div class=\"cssClassclear\"></div>");
        MyTags.Append("</div>");
        ltrMyTags.Text = MyTags.ToString();
    }
Пример #18
0
    public void GetShoppingOptionsByCategory()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        int    categoryId    = 0;
        string pageExtension = SageFrameSettingKeys.PageExtension;
        string modulePath    = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        List <CategoryDetailsInfo> lstCategory = AspxBrowseCategoryController.BindCategoryDetails(categoryId, count, level, aspxCommonObj);
        StringBuilder categoryOptions          = new StringBuilder();

        categoryOptions.Append("<div class=\"cssClassBrowseByCategory\" id=\"divCategoryItemsOptions\">");
        if (lstCategory != null && lstCategory.Count > 0)
        {
            categoryOptions.Append("<h2>");
            categoryOptions.Append(getLocale("Browse by"));
            categoryOptions.Append("</h2><ul>");
            foreach (CategoryDetailsInfo item in lstCategory)
            {
                categoryOptions.Append("<li><a href=\"");
                categoryOptions.Append(aspxRedirectPath);
                categoryOptions.Append("category/");
                categoryOptions.Append(AspxUtility.fixedEncodeURIComponent(item.CategoryName));
                categoryOptions.Append(pageExtension);
                categoryOptions.Append("\" alt=\"");
                categoryOptions.Append(item.CategoryName);
                categoryOptions.Append("\" title=\"");
                categoryOptions.Append(item.CategoryName);
                categoryOptions.Append("\">");
                categoryOptions.Append(item.CategoryName);
                categoryOptions.Append("</a></li>");
            }
            categoryOptions.Append("</ul><div class=\"cssClassclear\"></div>");
        }
        else
        {
            categoryOptions.Append("<span class=\"cssClassNotFound\">");
            categoryOptions.Append(getLocale("No category with item is found!"));
            categoryOptions.Append("</span>");
        }
        categoryOptions.Append("</div>");
        ltrCategoryItemsOptions.Text = categoryOptions.ToString();
    }
Пример #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("ItemLists", "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                           "/Templates/" + TemplateName + "/css/ToolTip/tooltip.css", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css");
                IncludeJs("ItemLists", "/js/Templating/tmpl.js", "/js/encoder.js", "/js/Paging/jquery.pagination.js",
                          "/js/Templating/AspxTemplate.js");
                IncludeJs("ItemLists", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js",
                          "/js/jquery.tipsy.js", "/js/FancyDropDown/itemFancyDropdown.js", "/js/SageFrameCorejs/itemTemplateView.js");

                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                CustomerID  = GetCustomerID;
                UserName    = GetUsername;
                CultureName = GetCurrentCultureName;
                if (HttpContext.Current.Session.SessionID != null)
                {
                    SessionCode = HttpContext.Current.Session.SessionID.ToString();
                }

                UserIP = HttpContext.Current.Request.UserHostAddress;
                IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();
                ipToCountry.GetCountry(UserIP, out CountryName);

                CategoryID      = Int32.Parse(Request.QueryString["cid"]);
                SearchText      = Request.QueryString["q"];
                IsGiftCard      = bool.Parse(Request.QueryString["isgiftcard"]);
                hst             = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);
                this.Page.Title = getLocale("Search") + " - " + SearchText;
                StoreSettingConfig ssc = new StoreSettingConfig();
                NoImageItemListPath   = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
                AllowAddToCart        = ssc.GetStoreSettingsByKey(StoreSetting.ShowAddToCartButton, StoreID, PortalID, CultureName);
                AllowOutStockPurchase = ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, StoreID, PortalID, CultureName);
                NoOfItemsInARow       = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.NoOfDisplayItems, StoreID, PortalID, CultureName));
                ItemDisplayMode       = ssc.GetStoreSettingsByKey(StoreSetting.ItemDisplayMode, StoreID, PortalID, CultureName);
            }
            GetAspxTemplates();
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    private void BindPromoItems()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath    = this.AppRelativeTemplateSourceDirectory;
        string aspxRootPath  = ResolveUrl("~/");
        string pageExtension = SageFrameSettingKeys.PageExtension;

        hst = AppLocalized.getLocale(modulePath);
        List <PromoBannerInfo> promoItemInfo =
            AspxPromoBannerController.GetAllPromoBanner(aspxCommonObj);
        StringBuilder promoBanner = new StringBuilder();

        if (promoItemInfo != null && promoItemInfo.Count > 0)
        {
            promoBanner.Append("<h2 class=\"cssClassMiddleHeader\"><span>" + getLocale("Promos") +
                               "</span></h2><ul class=\"classPromoViewAll\">");
            foreach (PromoBannerInfo item in promoItemInfo)
            {
                if (string.IsNullOrEmpty(item.ImagePath))
                {
                    item.ImagePath = NoImagePath;
                }
                string imagePath = "Modules/AspxCommerce/AspxItemsManagement/uploads/" + item.ImagePath;
                promoBanner.Append("<li><a href=\"");
                promoBanner.Append(imagePath + "\"");
                promoBanner.Append(" title=\"" + item.ItemName + "\" rel=\"" + aspxRedirectPath + serviceDetailPath + pageExtension + "?id=" + item.ItemID + "\"><img  title=\"" + item.ItemName + "\" src=\"");
                promoBanner.Append(imagePath.Replace("uploads", "uploads/Large"));
                promoBanner.Append(" \"/></a></li>");
                //  promoBanner.Append("<div class=\"cssPromoBook\"><a href=\"" + aspxRedirectPath + serviceDetailPath + pageExtension + "?id=" + item.ItemID + "\"><span>" + getLocale("Book Now") + "</span></a></div></li>");
            }
            promoBanner.Append("</ul>");
            ltrPromoBanner.Text = promoBanner.ToString();
        }
        else
        {
            promoBanner.Append("<span class=\"cssclassNoBanner sflocale\">" + getLocale("No Promo Uploaded Yet!") +
                               " </span>");
            ltrPromoBanner.Text = promoBanner.ToString();
        }
    }
Пример #21
0
    public void GetCartItemsCount()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        aspxCommonObj.CustomerID  = GetCustomerID;
        aspxCommonObj.SessionCode = SessionCode;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string        pageExtension = SageFrameSettingKeys.PageExtension;
        StringBuilder cartHeader    = new StringBuilder();
        StringBuilder scriptExecute = new StringBuilder();

        Count = AspxHeaderController.GetCartItemsCount(aspxCommonObj);
        string myCartLink = "";

        if (AllowAddToCart.ToLower() == "true")
        {
            if (IsUseFriendlyUrls)
            {
                myCartLink = ShoppingCartURL + pageExtension;
            }
            else
            {
                myCartLink = ShoppingCartURL;
            }
            cartHeader.Append("<a id=\"lnkMyCart\"");
            cartHeader.Append(" href=\"");
            cartHeader.Append(aspxRedirectPath);
            cartHeader.Append(myCartLink);
            cartHeader.Append("\"><i class='i-mycart'></i>");
            cartHeader.Append(getLocale("My Cart") + " <span class=\"cssClassTotalCount\"> [" + Count + "]</span>");
            cartHeader.Append("</a>");
            litCartHead.Text = cartHeader.ToString();
            if (Count == 0)
            {
                FrmLogin = false;
            }
        }
    }
    private void GetUserRecentActivity(AspxCommonInfo aspxCommonObj)
    {
        string myCartLink = string.Empty;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string        pageExtension = SageFrameSettingKeys.PageExtension;
        StringBuilder cartHeader    = new StringBuilder();
        StringBuilder scriptExecute = new StringBuilder();
        int           cartCount     = AspxHeaderController.GetCartItemsCount(aspxCommonObj);

        SageFrameConfig pagebase          = new SageFrameConfig();
        bool            IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
        StringBuilder   recentActivity    = new StringBuilder();

        recentActivity.Append("<h2>");
        recentActivity.Append(getLocale("Recent Activities"));
        recentActivity.Append("</h2>");
        recentActivity.Append("<li>");
        recentActivity.Append("<input type=\"hidden\" name=\"dashitemwishmenu\" />");
        recentActivity.Append("</li>");
        if (AllowAddToCart.ToLower() == "true")
        {
            if (IsUseFriendlyUrls)
            {
                myCartLink = ShoppingCartURL + pageExtension;
            }
            else
            {
                myCartLink = ShoppingCartURL;
            }
            recentActivity.Append("<li>");
            recentActivity.Append(getLocale("Your Carts Contains:"));
            recentActivity.Append("<a href=\"");
            recentActivity.Append(myCartLink);
            recentActivity.Append("\">");
            recentActivity.Append(cartCount);
            recentActivity.Append(" ");
            recentActivity.Append("items");
            recentActivity.Append("</a>");
            recentActivity.Append("</li>");
        }
        ltrRecentActivity.Text = recentActivity.ToString();
    }
Пример #23
0
    public void GetAllCategoryForSearch()
    {
        bool           isActive      = true;
        string         prefix        = "---";
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        string pageExtension            = SageFrameSettingKeys.PageExtension;
        List <CategoryInfo> lstCategory = AspxSearchController.GetAllCategoryForSearch(prefix, isActive, aspxCommonObj);

        if (lstCategory != null && lstCategory.Count > 0)
        {
            StringBuilder Elements = new StringBuilder();
            Elements.Append("<select id=\"sfSimpleSearchCategory\">");
            Elements.Append("<option value=\"0\" ><a href=\"#\"><span class=\"value\" category=\"--All Category--\">");
            Elements.Append(getLocale("--All Category--"));
            Elements.Append("</span></a></option>");
            foreach (CategoryInfo item in lstCategory)
            {
                Elements.Append("<option value=\"");
                Elements.Append(item.CategoryID);
                Elements.Append("\" isGiftCard=\"");
                Elements.Append(item.IsChecked);
                Elements.Append("\"><a href=\"#\"><span class=\"value\" category=\"");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("\">");
                Elements.Append(item.LevelCategoryName);
                Elements.Append("</span></a></option>");
            }

            Elements.Append("</select>");
            litSSCat.Text = Elements.ToString();
        }
    }
    private void BindAllServices()
    {
        string modulePath             = this.AppRelativeTemplateSourceDirectory;
        string aspxTemplateFolderPath = ResolveUrl("~/") + "Templates/" + TemplateName;
        string aspxRootPath           = ResolveUrl("~/");

        hst = AppLocalized.getLocale(modulePath);
        string             pageExtension     = SageFrameSettingKeys.PageExtension;
        List <ServiceInfo> lstAllService     = AspxServiceController.GetAllServices(aspxCommonObj);
        StringBuilder      allServiceViewBld = new StringBuilder();

        allServiceViewBld.Append("<div id=\"divBindAllServices\" class=\"cssClassAllService\">");
        if (lstAllService != null && lstAllService.Count > 0)
        {
            foreach (var allserviceInfo in lstAllService)
            {
                string serviceName = allserviceInfo.ServiceName;
                string imagePath   = "Modules/AspxCommerce/AspxCategoryManagement/uploads/" + allserviceInfo.ServiceImagePath;
                if (allserviceInfo.ServiceImagePath == "")
                {
                    imagePath = NoImageService;
                }
                var hrefServices = aspxRedirectPath + "service/" + fixedEncodeURIComponent(serviceName) + pageExtension;
                allServiceViewBld.Append("<li><a href=\"" + hrefServices + "\">");
                allServiceViewBld.Append("<div class=\"cssClassImgWrapper\">");
                allServiceViewBld.Append("<img src=\"" + aspxRootPath +
                                         imagePath.Replace("uploads", "uploads/Medium") +
                                         "\"/>");
                allServiceViewBld.Append("</div><h3>" + serviceName + "</h3></a></li>");
            }
        }
        else
        {
            allServiceViewBld.Append("<span class=\"cssClassNotFound\">" + getLocale("There are no services available!") +
                                     "</span>");
        }
        allServiceViewBld.Append("</div>");
        ltrBindAllServices.Text = allServiceViewBld.ToString();
    }
Пример #25
0
    public void GetStoreQuickStatics()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        StoreQuickStaticsInfo lstStockInfo = AspxAdminDashController.GetStoreQuickStatics(aspxCommonObj);

        if (lstStockInfo != null)
        {
            StringBuilder strStoreQuickStat = new StringBuilder();
            strStoreQuickStat.Append("<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr>");
            strStoreQuickStat.Append("<td><div class='cssTotalSales'><i class='icon-totalsales'></i><p><span class='cssClassFormatCurrency'>");
            strStoreQuickStat.Append(lstStockInfo.TotalSales);
            strStoreQuickStat.Append("</span>");
            strStoreQuickStat.Append(getLocale("Total Sales"));
            strStoreQuickStat.Append("</p></div></td>");
            strStoreQuickStat.Append("<td><div class='cssTotalCustomerOrder'><i class='icon-totalcustomerorder'></i><p><span>");
            strStoreQuickStat.Append((Convert.ToDecimal(lstStockInfo.TotalCustomerOrdered) / Convert.ToDecimal(lstStockInfo.TotalCustomers) * 100).ToString("N2"));
            strStoreQuickStat.Append("%</span>");
            strStoreQuickStat.Append(getLocale("Conversion Rate"));
            strStoreQuickStat.Append("</p></div></td>");
            strStoreQuickStat.Append("<td><div class='cssAverageOrder'><i class='icon-averageorder'></i><p><span>");
            strStoreQuickStat.Append(lstStockInfo.TotalSales / lstStockInfo.TotalCustomers);
            strStoreQuickStat.Append("</span>");
            strStoreQuickStat.Append(getLocale("Average Orders"));
            strStoreQuickStat.Append("</p></div></td>");
            strStoreQuickStat.Append("<td><div class='cssTotalCustomers'><i class='icon-totalcustomers'></i><p><span>");
            strStoreQuickStat.Append(lstStockInfo.TotalCustomers);
            strStoreQuickStat.Append("</span>");
            strStoreQuickStat.Append(getLocale("Total Customers"));
            strStoreQuickStat.Append("</p></div></td></tr></table>");
            ltrStoreQuickStatics.Text = strStoreQuickStat.ToString();
        }
    }
    public void GetShoppingOptionForSlider()
    {
        hst = AppLocalized.getLocale(modulePath);
        List<ShoppingOptionInfoForSlider> lstShopOpt = AspxShopOptionController.ShoppingOptionForSlider(aspxCommonObj);
        StringBuilder brandContent = new StringBuilder();
        ArrayList arrPrice = new ArrayList();
        List<string> priceList = new List<string>();
        if (lstShopOpt != null && lstShopOpt.Count > 0)
        {
            foreach (ShoppingOptionInfoForSlider item in lstShopOpt)
            {
                arrPrice.Add(item);
                priceList.Add(item.Price.ToString());
                if (item.Price > maxPrice)
                {
                    maxPrice = item.Price;
                }
                if (item.Price < minPrice || minPrice == 0)
                {
                    minPrice = item.Price;
                }

            }
            foreach (ShoppingOptionInfoForSlider value in arrPrice)
            {
                if (value.Price >= minPrice && value.Price <= maxPrice)
                {
                    IdsByPrice += value.ItemID + ",";
                }

            }
            IdsByPrice = IdsByPrice.Substring(0, IdsByPrice.LastIndexOf(","));
            ArryPrice = string.Join(",", priceList.ToArray());
        }
        else
        {

        }
    }
Пример #27
0
    private void GetCategoryWiseItemSetting()
    {
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        List <CategoryWiseitemSettings> catWiseSettingInfo =
            AspxCatWiseItemController.GetCategoryWiseItemSettings(aspxCommonObj);

        if (catWiseSettingInfo != null && catWiseSettingInfo.Count > 0)
        {
            foreach (CategoryWiseitemSettings item in catWiseSettingInfo)
            {
                noOfItemsInCategory = item.NumberOfItemsInCategory;
            }
            GetCategoryWiseItemList();
        }
    }
Пример #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("CategoryBreadCrumb", "/Templates/" + TemplateName + "/css/BreadCrumb/BreadCrumb.css");
                GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
                aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);

                string pageName = Request.Url.ToString();
                pageName   = Path.GetFileNameWithoutExtension(pageName);
                Breadcrumb = new JavaScriptSerializer().Serialize(AspxBreadCrumbController.GetBreadCrumb(pageName, aspxCommonObj));
                AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);
            }
            IncludeLanguageJS();
            BreadCrumb();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Пример #29
0
 public void GetNLSetting(int UserModuleID, int PortalID)
 {
     try
     {
         string modulePath = this.AppRelativeTemplateSourceDirectory;
         hst = AppLocalized.getLocale(modulePath);
         NL_Controller         cont           = new NL_Controller();
         List <NL_SettingInfo> objSettingList = cont.GetNLSetting(UserModuleID, PortalID);
         string href   = string.Empty;
         string header = string.Empty;
         foreach (NL_SettingInfo objInfo in objSettingList)
         {
             header = "<h2>" + getLocale("Subscribe") + "</h2><h4>" + getLocale("Our Newsletter") + "</h4>";
             href   = objInfo.UnSubscribePageName + PageExt;
         }
         moduleHeader.Text = header;
         UnSubscribe.Text  = "<a id='btnUnsubscibe' href='" + href + "' class='sfUnSubscribeButton'>" + getLocale("Click here to UnSubscribe") + "</a>";
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Пример #30
0
    public void GetAllBrandForItem(int categoryID, bool isGiftCard)
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();

        aspxCommonObj.StoreID     = StoreID;
        aspxCommonObj.PortalID    = PortalID;
        aspxCommonObj.UserName    = UserName;
        aspxCommonObj.CultureName = CultureName;
        string modulePath = this.AppRelativeTemplateSourceDirectory;

        hst = AppLocalized.getLocale(modulePath);

        AdvanceSearchController asc          = new AdvanceSearchController();
        List <BrandItemsInfo>   lstBrandItem = asc.GetAllBrandForSearchByCategoryID(aspxCommonObj, categoryID, isGiftCard);
        StringBuilder           brandContent = new StringBuilder();

        brandContent.Append("<select id=\"lstBrands\">");

        if (lstBrandItem != null && lstBrandItem.Count > 0)
        {
            brandContent.Append("<option value='0'>" + getLocale("All Brands") + "</option>");
            if (lstBrandItem != null && lstBrandItem.Count > 0)
            {
                foreach (BrandItemsInfo item in lstBrandItem)
                {
                    brandContent.Append("<option value=" + item.BrandID + ">" + item.BrandName + "</option>");
                }
                brandContent.Append("</select>");
            }
        }
        else
        {
            brandContent.Append("<option value='0'>" + getLocale("No Brands") + "</option>");
        }
        ltrBrands.Text = brandContent.ToString();
    }