Exemple #1
0
        //#region Advance Search

        //public List<ItemTypeInfo> GetItemTypeList()
        //{
        //    try
        //    {
        //        List<ItemTypeInfo> lstItemType = AspxSearchController.GetItemTypeList();
        //        return lstItemType;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}


        //public List<AttributeFormInfo> GetAttributeByItemType(int itemTypeID, int storeID, int portalID, string cultureName)
        //{
        //    try
        //    {
        //        List<AttributeFormInfo> lstAttrForm = AspxSearchController.GetAttributeByItemType(itemTypeID, storeID, portalID, cultureName);
        //        return lstAttrForm;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //#endregion

        //#region More Advanced Search
        ////------------------get dyanamic Attributes for serach-----------------------

        //public List<AttributeShowInAdvanceSearchInfo> GetAttributes(AspxCommonInfo aspxCommonObj)
        //{
        //    try
        //    {
        //        List<AttributeShowInAdvanceSearchInfo> lstAttr = AspxSearchController.GetAttributes(aspxCommonObj);
        //        return lstAttr;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        ////------------------get items by dyanamic Advance serach-----------------------

        //public List<ItemBasicDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, System.Nullable<int> categoryID, bool isGiftCard, string searchText, int brandId,
        //                                                                  System.Nullable<float> priceFrom, System.Nullable<float> priceTo, string attributeIds, int rowTotal, int SortBy)
        //{
        //    try
        //    {
        //        List<ItemBasicDetailsInfo> lstItemBasic = AspxSearchController.GetItemsByDyanamicAdvanceSearch(offset, limit, aspxCommonObj, categoryID, isGiftCard, searchText, brandId, priceFrom, priceTo, attributeIds, rowTotal, SortBy);
        //        return lstItemBasic;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //[WebMethod]
        //public List<Filter> GetDynamicAttributesForAdvanceSearch(AspxCommonInfo aspxCommonObj, int CategoryID, bool IsGiftCard)
        //{
        //    List<Filter> lstFilter = AspxSearchController.GetDynamicAttributesForAdvanceSearch(aspxCommonObj, CategoryID, IsGiftCard);
        //    return lstFilter;
        //}
        //[WebMethod]
        //public List<BrandItemsInfo> GetAllBrandForSearchByCategoryID(AspxCommonInfo aspxCommonObj, int CategoryID, bool IsGiftCard)
        //{
        //    try
        //    {
        //        List<BrandItemsInfo> lstBrandItem = AspxSearchController.GetAllBrandForSearchByCategoryID(aspxCommonObj, CategoryID, IsGiftCard);
        //        return lstBrandItem;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //#endregion

        #endregion

        #region "Header Settings"
        public HeaderSettingInfo GetHeaderSetting(AspxCommonInfo aspxCommonObj)
        {
            try
            {
                return(AspxHeaderController.GetHeaderSetting(aspxCommonObj));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public void SetHeaderSetting(string headerType, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         AspxHeaderController.SetHeaderSetting(headerType, aspxCommonObj);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        //#region Advance Search

        //public List<ItemTypeInfo> GetItemTypeList()
        //{
        //    try
        //    {
        //        List<ItemTypeInfo> lstItemType = AspxSearchController.GetItemTypeList();
        //        return lstItemType;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}


        //public List<AttributeFormInfo> GetAttributeByItemType(int itemTypeID, int storeID, int portalID, string cultureName)
        //{
        //    try
        //    {
        //        List<AttributeFormInfo> lstAttrForm = AspxSearchController.GetAttributeByItemType(itemTypeID, storeID, portalID, cultureName);
        //        return lstAttrForm;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //#endregion

        //#region More Advanced Search
        ////------------------get dyanamic Attributes for serach-----------------------

        //public List<AttributeShowInAdvanceSearchInfo> GetAttributes(AspxCommonInfo aspxCommonObj)
        //{
        //    try
        //    {
        //        List<AttributeShowInAdvanceSearchInfo> lstAttr = AspxSearchController.GetAttributes(aspxCommonObj);
        //        return lstAttr;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}

        ////------------------get items by dyanamic Advance serach-----------------------

        //public List<ItemBasicDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, System.Nullable<int> categoryID, bool isGiftCard, string searchText, int brandId,
        //                                                                  System.Nullable<float> priceFrom, System.Nullable<float> priceTo, string attributeIds, int rowTotal, int SortBy)
        //{
        //    try
        //    {
        //        List<ItemBasicDetailsInfo> lstItemBasic = AspxSearchController.GetItemsByDyanamicAdvanceSearch(offset, limit, aspxCommonObj, categoryID, isGiftCard, searchText, brandId, priceFrom, priceTo, attributeIds, rowTotal, SortBy);
        //        return lstItemBasic;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //[WebMethod]
        //public List<Filter> GetDynamicAttributesForAdvanceSearch(AspxCommonInfo aspxCommonObj, int CategoryID, bool IsGiftCard)
        //{
        //    List<Filter> lstFilter = AspxSearchController.GetDynamicAttributesForAdvanceSearch(aspxCommonObj, CategoryID, IsGiftCard);
        //    return lstFilter;
        //}
        //[WebMethod]
        //public List<BrandItemsInfo> GetAllBrandForSearchByCategoryID(AspxCommonInfo aspxCommonObj, int CategoryID, bool IsGiftCard)
        //{
        //    try
        //    {
        //        List<BrandItemsInfo> lstBrandItem = AspxSearchController.GetAllBrandForSearchByCategoryID(aspxCommonObj, CategoryID, IsGiftCard);
        //        return lstBrandItem;
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //#endregion

        #endregion

        #region "Header Settings"
        public string GetHeaderSetting(AspxCommonInfo aspxCommonObj)
        {
            try
            {
                string headerType = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
                return(headerType);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    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);

            SageFrameConfig sfConfig = new SageFrameConfig();
            LogInURL = sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage);

            HeaderSettingInfo objHeaderSetting = new HeaderSettingInfo();
            objHeaderSetting = AspxHeaderController.GetHeaderSetting(aspxCommonObj);
            HeaderType = objHeaderSetting.HeaderType;

            HeaderItemsCount objHeaderCount = new HeaderItemsCount();
            AspxHeaderController objHeader = new AspxHeaderController();
            objHeaderCount = objHeader.GetHeaderItemsCount(aspxCommonObj);
            WishCount = objHeaderCount.WishCount;
            CartCount = objHeaderCount.CartCount;

            hst = AppLocalized.getLocale(this.AppRelativeTemplateSourceDirectory);//

            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamSeven(StoreSetting.MyAccountURL, StoreSetting.ShoppingCartURL,
                StoreSetting.ShowAddToCartButton, StoreSetting.AllowAnonymousCheckOut, StoreSetting.AllowMultipleShippingAddress,
                StoreSetting.MinimumCartSubTotalAmount, StoreSetting.SingleCheckOutURL, out MyAccountURL, out ShoppingCartURL,
                out AllowAddToCart, out AllowAnonymousCheckOut, out AllowMultipleShipping, out MinCartSubTotalAmount,
                out SingleAddressChkOutURL, StoreID, PortalID, CultureName);

            string templateName = TemplateName;

            if (HttpContext.Current.Session.SessionID != null)
            {
                SessionCode = HttpContext.Current.Session.SessionID.ToString();
            }
            if (!IsPostBack)
            {
                IncludeCss("AspxHeaderControl", "/Templates/" + templateName + "/css/MessageBox/style.css", "/Templates/" + templateName + "/css/PopUp/style.css",
                     "/Modules/AspxCommerce/AspxHeaderControl/css/module.css");
                IncludeJs("AspxHeaderControl", "/js/PopUp/custom.js", "/js/MessageBox/alertbox.js", "/Modules/AspxCommerce/AspxHeaderControl/js/HeaderControl.js");//"/js/jquery.easing.1.3.js",
                if (HttpContext.Current.Request.UrlReferrer != null)
                {
                    string urlContent = HttpContext.Current.Request.UrlReferrer.AbsolutePath;
                    if (urlContent.Contains(LogInURL) && UserName.ToLower() != "anonymoususer")
                    {
                        FrmLogin = true;
                        if (HttpContext.Current.Session["LoginMessageInfo"] == null)
                        {
                            HttpContext.Current.Session["LoginMessageInfo"] = true;
                        }
                        int x = Convert.ToInt32(HttpContext.Current.Session["LoginMessageInfoCount"]);
                        HttpContext.Current.Session["LoginMessageInfoCount"] = x + 1;
                    }
                    else if (HttpContext.Current.Session["LoginMessageInfo"] != null)
                    {
                        HttpContext.Current.Session.Remove("LoginMessageInfo");
                        HttpContext.Current.Session.Remove("LoginMessageInfoCount");
                    }
                }

            }
            IncludeLanguageJS();
            WishListURL = objHeaderSetting.WishListPageName;
            CountWishItems(aspxCommonObj);

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }