public string GetRecurringCartsUrl(GetRecurringCartsUrlParam param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }

            var url = PageService.GetPageUrl(RecurringOrdersSettings.RecurringCartsPageId, param.CultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl));
        }
Example #2
0
        public virtual string GetCheckoutUpdateAddressBaseUrl(BaseUrlParameter param)
        {
            if (param == null)
            {
                throw new ArgumentNullException("param");
            }

            var pagesConfiguration = SiteConfiguration.GetPagesConfiguration(param.CultureInfo, WebsiteContext.WebsiteId);
            var url = PageService.GetPageUrl(pagesConfiguration.CheckoutUpdateAddressPageId, param.CultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl));
        }
Example #3
0
        /// <summary>
        /// Url to the Terms and conditions page
        /// </summary>
        /// <returns>localized url</returns>
        public virtual string GetTermsAndConditionsUrl(BaseUrlParameter param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }

            var pagesConfiguration = SiteConfiguration.GetPagesConfiguration(param.CultureInfo, WebsiteContext.WebsiteId);
            var url = PageService.GetPageUrl(pagesConfiguration.TermsAndConditionsPageId, param.CultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl));
        }
        public string GetHomepageUrl(BaseUrlParameter param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }

            var url = PageService.GetPageUrl(WebsiteContext.WebsiteId, param.CultureInfo);

            ///TODO - fix this
            if (string.IsNullOrWhiteSpace(url))
            {
                return(url);
            }

            return(UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl));
        }
        public string GetFindMyOrderUrl(CultureInfo cultureInfo)
        {
            if (cultureInfo == null)
            {
                throw new ArgumentNullException(nameof(cultureInfo));
            }

            var pagesConfiguration = SiteConfiguration.GetPagesConfiguration(cultureInfo, WebsiteContext.WebsiteId);

            if (pagesConfiguration == null)
            {
                return(null);
            }

            var url = PageService.GetPageUrl(pagesConfiguration.FindMyOrderPageId, cultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, null));
        }
        public string GetOrderHistoryUrl(GetOrderUrlParameter param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }

            var pagesConfiguration = SiteConfiguration.GetPagesConfiguration(param.CultureInfo, WebsiteContext.WebsiteId);

            if (pagesConfiguration == null)
            {
                return(null);
            }

            var url = PageService.GetPageUrl(pagesConfiguration.OrderHistoryPageId, param.CultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, null));
        }
Example #7
0
        /// <summary>
        /// Url to the Change Password page
        /// </summary>
        /// <returns>localized url</returns>
        public string GetChangePasswordUrl(BaseUrlParameter param)
        {
            if (param == null)
            {
                throw new ArgumentNullException("param");
            }

            var pagesConfiguration = SiteConfiguration.GetPagesConfiguration(param.CultureInfo, WebsiteContext.WebsiteId);

            if (pagesConfiguration == null)
            {
                return(null);
            }

            var url = PageService.GetPageUrl(pagesConfiguration.ChangePasswordPageId, param.CultureInfo);

            return(UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl));
        }
        public string GetRecurringCartDetailsUrl(GetRecurringCartDetailsUrlParam param)
        {
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }
            if (param.RecurringCartName == null)
            {
                throw new ArgumentNullException(nameof(param.RecurringCartName));
            }

            var url           = PageService.GetPageUrl(RecurringOrdersSettings.RecurringCartDetailsPageId, param.CultureInfo);
            var UrlWithReturn = UrlProviderHelper.BuildUrlWithParams(url, param.ReturnUrl);

            return(UrlFormatter.AppendQueryString(UrlWithReturn, new NameValueCollection
            {
                { "name", param.RecurringCartName }
            }));
        }