From 02ac0a796d5c469fd1a778d6b14da635ff2b788d Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Thu, 25 Feb 2016 19:54:20 +0100 Subject: [PATCH 001/357] Minor refactoring, #482 related --- .../Orders/OrderTotalCalculationService.cs | 16 +++++++++++--- .../Payments/PaymentExtentions.cs | 21 +------------------ .../Payments/PaymentService.cs | 8 ++++++- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/Libraries/SmartStore.Services/Orders/OrderTotalCalculationService.cs b/src/Libraries/SmartStore.Services/Orders/OrderTotalCalculationService.cs index 2fa180e938..e154dd519d 100644 --- a/src/Libraries/SmartStore.Services/Orders/OrderTotalCalculationService.cs +++ b/src/Libraries/SmartStore.Services/Orders/OrderTotalCalculationService.cs @@ -810,7 +810,12 @@ public virtual decimal GetTaxTotal(IList cart, out So decimal taxRate = decimal.Zero; var provider = _providerManager.GetProvider(paymentMethodSystemName); - decimal paymentMethodAdditionalFee = provider.GetAdditionalHandlingFee(cart, _shoppingCartSettings.RoundPricesDuringCalculation); + var paymentMethodAdditionalFee = (provider != null ? provider.Value.GetAdditionalHandlingFee(cart) : decimal.Zero); + + if (_shoppingCartSettings.RoundPricesDuringCalculation) + { + paymentMethodAdditionalFee = Math.Round(paymentMethodAdditionalFee, 2); + } decimal paymentMethodAdditionalFeeExclTax = _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, false, customer, out taxRate); decimal paymentMethodAdditionalFeeInclTax = _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, true, customer, out taxRate); @@ -917,9 +922,14 @@ public virtual decimal GetTaxTotal(IList cart, out So if (usePaymentMethodAdditionalFee && !String.IsNullOrEmpty(paymentMethodSystemName)) { var provider = _providerManager.GetProvider(paymentMethodSystemName); - decimal paymentMethodAdditionalFee = provider.GetAdditionalHandlingFee(cart, _shoppingCartSettings.RoundPricesDuringCalculation); + var paymentMethodAdditionalFee = (provider != null ? provider.Value.GetAdditionalHandlingFee(cart) : decimal.Zero); + + if (_shoppingCartSettings.RoundPricesDuringCalculation) + { + paymentMethodAdditionalFee = Math.Round(paymentMethodAdditionalFee, 2); + } - paymentMethodAdditionalFeeWithoutTax = _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, false, customer); + paymentMethodAdditionalFeeWithoutTax = _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, false, customer); } //tax diff --git a/src/Libraries/SmartStore.Services/Payments/PaymentExtentions.cs b/src/Libraries/SmartStore.Services/Payments/PaymentExtentions.cs index 3ba3d4c3d3..d9cd258259 100644 --- a/src/Libraries/SmartStore.Services/Payments/PaymentExtentions.cs +++ b/src/Libraries/SmartStore.Services/Payments/PaymentExtentions.cs @@ -9,7 +9,7 @@ namespace SmartStore.Services.Payments { - public static class PaymentExtentions + public static class PaymentExtentions { /// /// Is payment method active? @@ -34,25 +34,6 @@ public static bool IsPaymentMethodActive(this Provider paymentMe return paymentSettings.ActivePaymentMethodSystemNames.Contains(paymentMethod.Metadata.SystemName, StringComparer.OrdinalIgnoreCase); } - /// - /// Gets an additional handling fee of a payment method - /// - /// Shoping cart - /// Whether to round the fee - /// Additional handling fee - public static decimal GetAdditionalHandlingFee(this Provider paymentMethod, IList cart, bool round) - { - var result = decimal.Zero; - if (paymentMethod != null) - { - result = paymentMethod.Value.GetAdditionalHandlingFee(cart); - - if (round) - result = Math.Round(result, 2); - } - return result; - } - /// /// Calculate payment method fee /// diff --git a/src/Libraries/SmartStore.Services/Payments/PaymentService.cs b/src/Libraries/SmartStore.Services/Payments/PaymentService.cs index 5d82085595..0bce57bb5e 100644 --- a/src/Libraries/SmartStore.Services/Payments/PaymentService.cs +++ b/src/Libraries/SmartStore.Services/Payments/PaymentService.cs @@ -357,8 +357,14 @@ public virtual bool CanRePostProcessPayment(Order order) public virtual decimal GetAdditionalHandlingFee(IList cart, string paymentMethodSystemName) { var paymentMethod = LoadPaymentMethodBySystemName(paymentMethodSystemName); + var paymentMethodAdditionalFee = (paymentMethod != null ? paymentMethod.Value.GetAdditionalHandlingFee(cart) : decimal.Zero); - return paymentMethod.GetAdditionalHandlingFee(cart, _shoppingCartSettings.RoundPricesDuringCalculation); + if (_shoppingCartSettings.RoundPricesDuringCalculation) + { + paymentMethodAdditionalFee = Math.Round(paymentMethodAdditionalFee, 2); + } + + return paymentMethodAdditionalFee; } From 6ec37426eac94c5bd3d03e28f3ff8635df7ee2af Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Thu, 25 Feb 2016 21:48:05 +0100 Subject: [PATCH 002/357] Resolves #713 Display gift card remaining amount in frontend order details and order messages --- changelog.md | 1 + .../Messages/MessageTokenProvider.cs | 22 ++++++++++++++----- .../Controllers/OrderController.cs | 16 +++++++++----- .../Models/Order/OrderDetailsModel.cs | 3 ++- .../Views/Order/Details.Mobile.cshtml | 5 +++-- .../SmartStore.Web/Views/Order/Details.cshtml | 9 ++++---- 6 files changed, 38 insertions(+), 18 deletions(-) diff --git a/changelog.md b/changelog.md index 9683e94137..9cfc13f194 100644 --- a/changelog.md +++ b/changelog.md @@ -91,6 +91,7 @@ * Product filter: Specification attributes are sorted by display order rather than alphabetically by name * #856 Don't route topics which are excluded from sitemap * #851 Replace reCAPTCHA with "I'm not a robot" CAPTCHA +* #713 Display gift card remaining amount in frontend order details and order messages ### Bugfixes * #523 Redirecting to payment provider performed by core instead of plugin diff --git a/src/Libraries/SmartStore.Services/Messages/MessageTokenProvider.cs b/src/Libraries/SmartStore.Services/Messages/MessageTokenProvider.cs index 7b0e2c6f8d..6cb58a46e2 100644 --- a/src/Libraries/SmartStore.Services/Messages/MessageTokenProvider.cs +++ b/src/Libraries/SmartStore.Services/Messages/MessageTokenProvider.cs @@ -507,7 +507,12 @@ protected virtual string ProductListToHtmlTable(Order order, Language language) string giftCardText = String.Format(_localizationService.GetResource("Messages.Order.GiftCardInfo", language.Id), HttpUtility.HtmlEncode(gcuh.GiftCard.GiftCardCouponCode)); string giftCardAmount = _priceFormatter.FormatPrice(-(_currencyService.ConvertCurrency(gcuh.UsedValue, order.CurrencyRate)), true, order.CustomerCurrencyCode, false, language); - sb.AppendLine(string.Format(" {0} {1}", giftCardText, giftCardAmount)); + var remaining = _currencyService.ConvertCurrency(gcuh.GiftCard.GetGiftCardRemainingAmount(), order.CurrencyRate); + var remainingFormatted = _priceFormatter.FormatPrice(remaining, true, false); + var remainingText = _localizationService.GetResource("ShoppingCart.Totals.GiftCardInfo.Remaining", language.Id).FormatInvariant(remainingFormatted); + + sb.AppendLine(string.Format(" {0}
{1} {2}", + giftCardText, remainingText, giftCardAmount)); } //reward points @@ -914,14 +919,18 @@ public virtual void AddReturnRequestTokens(IList tokens, ReturnRequest re public virtual void AddGiftCardTokens(IList tokens, GiftCard giftCard) { - tokens.Add(new Token("GiftCard.SenderName", giftCard.SenderName)); + var order = giftCard.PurchasedWithOrderItem.Order; + var remainingAmount = _currencyService.ConvertCurrency(giftCard.GetGiftCardRemainingAmount(), order.CurrencyRate); + + tokens.Add(new Token("GiftCard.SenderName", giftCard.SenderName)); tokens.Add(new Token("GiftCard.SenderEmail", giftCard.SenderEmail)); tokens.Add(new Token("GiftCard.RecipientName", giftCard.RecipientName)); tokens.Add(new Token("GiftCard.RecipientEmail", giftCard.RecipientEmail)); tokens.Add(new Token("GiftCard.Amount", _priceFormatter.FormatPrice(giftCard.Amount, true, false))); - tokens.Add(new Token("GiftCard.CouponCode", giftCard.GiftCardCouponCode)); + tokens.Add(new Token("GiftCard.RemainingAmount", _priceFormatter.FormatPrice(remainingAmount, true, false))); + tokens.Add(new Token("GiftCard.CouponCode", giftCard.GiftCardCouponCode)); - var giftCardMesage = !String.IsNullOrWhiteSpace(giftCard.Message) ? + var giftCardMesage = !String.IsNullOrWhiteSpace(giftCard.Message) ? HtmlUtils.FormatText(giftCard.Message, false, true, false, false, false, false) : ""; tokens.Add(new Token("GiftCard.Message", giftCardMesage, true)); @@ -1177,8 +1186,9 @@ public virtual string[] GetListOfAllowedTokens() "%GiftCard.SenderEmail%", "%GiftCard.RecipientName%", "%GiftCard.RecipientEmail%", - "%GiftCard.Amount%", - "%GiftCard.CouponCode%", + "%GiftCard.Amount%", + "%GiftCard.RemainingAmount%", + "%GiftCard.CouponCode%", "%GiftCard.Message%", "%Customer.Email%", "%Customer.Username%", diff --git a/src/Presentation/SmartStore.Web/Controllers/OrderController.cs b/src/Presentation/SmartStore.Web/Controllers/OrderController.cs index b3acce902b..bf9e11078e 100644 --- a/src/Presentation/SmartStore.Web/Controllers/OrderController.cs +++ b/src/Presentation/SmartStore.Web/Controllers/OrderController.cs @@ -291,12 +291,18 @@ protected OrderDetailsModel PrepareOrderDetailsModel(Order order) //gift cards foreach (var gcuh in order.GiftCardUsageHistory) { - model.GiftCards.Add(new OrderDetailsModel.GiftCard - { - CouponCode = gcuh.GiftCard.GiftCardCouponCode, + var remainingAmountBase = gcuh.GiftCard.GetGiftCardRemainingAmount(); + var remainingAmount = _currencyService.ConvertCurrency(remainingAmountBase, order.CurrencyRate); + + var gcModel = new OrderDetailsModel.GiftCard + { + CouponCode = gcuh.GiftCard.GiftCardCouponCode, Amount = _priceFormatter.FormatPrice(-(_currencyService.ConvertCurrency(gcuh.UsedValue, order.CurrencyRate)), true, order.CustomerCurrencyCode, false, language), - }); - } + Remaining = _priceFormatter.FormatPrice(remainingAmount, true, false) + }; + + model.GiftCards.Add(gcModel); + } //reward points if (order.RedeemedRewardPointsEntry != null) diff --git a/src/Presentation/SmartStore.Web/Models/Order/OrderDetailsModel.cs b/src/Presentation/SmartStore.Web/Models/Order/OrderDetailsModel.cs index a5738aa264..c4b4773f3a 100644 --- a/src/Presentation/SmartStore.Web/Models/Order/OrderDetailsModel.cs +++ b/src/Presentation/SmartStore.Web/Models/Order/OrderDetailsModel.cs @@ -126,7 +126,8 @@ public partial class GiftCard : ModelBase { public string CouponCode { get; set; } public string Amount { get; set; } - } + public string Remaining { get; set; } + } public partial class OrderNote : ModelBase { diff --git a/src/Presentation/SmartStore.Web/Views/Order/Details.Mobile.cshtml b/src/Presentation/SmartStore.Web/Views/Order/Details.Mobile.cshtml index 80249d7776..289fb9fc47 100644 --- a/src/Presentation/SmartStore.Web/Views/Order/Details.Mobile.cshtml +++ b/src/Presentation/SmartStore.Web/Views/Order/Details.Mobile.cshtml @@ -439,8 +439,9 @@ { - - @string.Format(T("Order.GiftCardInfo").Text, gc.CouponCode): + @string.Format(T("Order.GiftCardInfo").Text, gc.CouponCode): +
+ @string.Format(T("ShoppingCart.Totals.GiftCardInfo.Remaining").Text, gc.Remaining) diff --git a/src/Presentation/SmartStore.Web/Views/Order/Details.cshtml b/src/Presentation/SmartStore.Web/Views/Order/Details.cshtml index 8e56cfc5a6..5a4fbfb5c6 100644 --- a/src/Presentation/SmartStore.Web/Views/Order/Details.cshtml +++ b/src/Presentation/SmartStore.Web/Views/Order/Details.cshtml @@ -532,8 +532,9 @@ { - - @string.Format(T("Order.GiftCardInfo").Text, gc.CouponCode): + @string.Format(T("Order.GiftCardInfo").Text, gc.CouponCode): +
+ @string.Format(T("ShoppingCart.Totals.GiftCardInfo.Remaining").Text, gc.Remaining) @@ -541,8 +542,8 @@ - } - } + } + } @if (Model.RedeemedRewardPoints > 0) { From 2c9cd0cece81cbffe0bb487e55c39b588fd2def4 Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Fri, 26 Feb 2016 14:51:21 +0100 Subject: [PATCH 003/357] Resolves #695 Implement checkbox in checkout to let customers subscribe to newsletters --- changelog.md | 1 + .../Orders/CheckoutNewsLetterSubscription.cs | 23 ++++ .../Domain/Orders/ShoppingCartSettings.cs | 5 + .../SmartStore.Core/SmartStore.Core.csproj | 1 + .../201601262000441_ImportFramework1.cs | 28 +++++ .../INewsLetterSubscriptionService.cs | 21 +++- .../Messages/NewsLetterSubscriptionService.cs | 53 +++++++-- .../Orders/OrderProcessingService.cs | 108 +++++++++++------- .../Controllers/SettingController.cs | 5 +- .../Infrastructure/AutoMapperStartupTask.cs | 3 +- .../Settings/ShoppingCartSettingsModel.cs | 18 ++- .../Views/Setting/ShoppingCart.cshtml | 12 +- .../Controllers/CheckoutController.cs | 3 +- .../Controllers/CustomerController.cs | 40 ++----- .../Controllers/ShoppingCartController.cs | 1 + .../Models/ShoppingCart/ShoppingCartModel.cs | 4 + .../Views/Checkout/Confirm.cshtml | 6 +- .../Views/ShoppingCart/OrderSummary.cshtml | 21 +++- .../Orders/OrderProcessingServiceTests.cs | 7 +- 19 files changed, 254 insertions(+), 106 deletions(-) create mode 100644 src/Libraries/SmartStore.Core/Domain/Orders/CheckoutNewsLetterSubscription.cs diff --git a/changelog.md b/changelog.md index 9cfc13f194..4085ebbfc9 100644 --- a/changelog.md +++ b/changelog.md @@ -49,6 +49,7 @@ * #738 Implement download of pictures via URLs in product import * Web-API: Bridge to import framework: uploading import files to import profile directory * Setting to round down calculated reward points +* #695 Implement checkbox in checkout to let customers subscribe to newsletters ### Improvements * (Perf) Implemented static caches for URL aliases and localized properties. Increases app startup and request speed by up to 30%. diff --git a/src/Libraries/SmartStore.Core/Domain/Orders/CheckoutNewsLetterSubscription.cs b/src/Libraries/SmartStore.Core/Domain/Orders/CheckoutNewsLetterSubscription.cs new file mode 100644 index 0000000000..8f96749c9c --- /dev/null +++ b/src/Libraries/SmartStore.Core/Domain/Orders/CheckoutNewsLetterSubscription.cs @@ -0,0 +1,23 @@ +namespace SmartStore.Core.Domain.Orders +{ + /// + /// Setting for newsletter subscription in checkout + /// + public enum CheckoutNewsLetterSubscription + { + /// + /// No newsletter subscription checkbox + /// + None = 0, + + /// + /// Deactivated newsletter subscription checkbox + /// + Deactivated, + + /// + /// Activated newsletter subscription checkbox + /// + Activated + } +} diff --git a/src/Libraries/SmartStore.Core/Domain/Orders/ShoppingCartSettings.cs b/src/Libraries/SmartStore.Core/Domain/Orders/ShoppingCartSettings.cs index e64000ea1b..16a8c367fd 100644 --- a/src/Libraries/SmartStore.Core/Domain/Orders/ShoppingCartSettings.cs +++ b/src/Libraries/SmartStore.Core/Domain/Orders/ShoppingCartSettings.cs @@ -104,6 +104,11 @@ public ShoppingCartSettings() ///
public bool ShowEsdRevocationWaiverBox { get; set; } + /// + /// Gets or sets a value indicating whether to show a checkbox to subscribe to newsletters + /// + public CheckoutNewsLetterSubscription NewsLetterSubscription { get; set; } + /// /// Gets or sets a number of "Cross-sells" on shopping cart page /// diff --git a/src/Libraries/SmartStore.Core/SmartStore.Core.csproj b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj index 200def62df..4fba731067 100644 --- a/src/Libraries/SmartStore.Core/SmartStore.Core.csproj +++ b/src/Libraries/SmartStore.Core/SmartStore.Core.csproj @@ -181,6 +181,7 @@ + diff --git a/src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs b/src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs index 0ebc7a469c..e633a7e487 100644 --- a/src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs +++ b/src/Libraries/SmartStore.Data/Migrations/201601262000441_ImportFramework1.cs @@ -421,6 +421,34 @@ public void MigrateLocaleResources(LocaleResourcesBuilder builder) "Punkte abrunden", "Specifies whether to round down calculated points. Otherwise the bonus points will be rounded up.", "Legt fest, ob bei der Punkteberechnung abgerundet werden soll. Ansonsten werden Bonuspunkte aufgerundet."); + + builder.AddOrUpdate("Admin.Configuration.Settings.Order.GiftCards_Deactivated", + "Gift card deactivation order status", + "Geschenkgutschein wird deaktiviert, wenn Auftragsstatus..."); + + builder.AddOrUpdate("Admin.Configuration.Settings.ShoppingCart.NewsLetterSubscription", + "Subscribe to newsletters", + "Abonnieren von Newslettern", + "Specifies id customers can subscribe to newsletters when ordering and if the checkbox is enabled by default.", + "Legt fest, ob Kunden bei einer Bestellung Newsletter abonnieren knnen und ob die Checkbox standardmig aktiviert ist."); + + builder.AddOrUpdate("Enums.SmartStore.Core.Domain.Orders.CheckoutNewsLetterSubscription.None", "Do not show", "Nicht anzeigen"); + builder.AddOrUpdate("Enums.SmartStore.Core.Domain.Orders.CheckoutNewsLetterSubscription.Deactivated", "Show deactivated", "Deaktiviert anzeigen"); + builder.AddOrUpdate("Enums.SmartStore.Core.Domain.Orders.CheckoutNewsLetterSubscription.Activated", "Show activated", "Aktiviert anzeigen"); + + builder.AddOrUpdate("Common.Options", "Options", "Optionen"); + + builder.AddOrUpdate("Checkout.SubscribeToNewsLetter", + "Subscribed to newsletter", + "Newsletter abonnieren"); + + builder.AddOrUpdate("Admin.OrderNotice.NewsLetterSubscriptionAdded", + "Subscribed to newsletter", + "Newsletter wurde abonniert"); + + builder.AddOrUpdate("Admin.OrderNotice.NewsLetterSubscriptionRemoved", + "Newsletter subscriber has been removed", + "Newsletter-Abonnent wurde entfernt"); } } } diff --git a/src/Libraries/SmartStore.Services/Messages/INewsLetterSubscriptionService.cs b/src/Libraries/SmartStore.Services/Messages/INewsLetterSubscriptionService.cs index 49a6b4d8a8..a579ff6859 100644 --- a/src/Libraries/SmartStore.Services/Messages/INewsLetterSubscriptionService.cs +++ b/src/Libraries/SmartStore.Services/Messages/INewsLetterSubscriptionService.cs @@ -27,12 +27,21 @@ public partial interface INewsLetterSubscriptionService /// if set to true [publish subscription events]. void DeleteNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription, bool publishSubscriptionEvents = true); - /// - /// Gets a newsletter subscription by newsletter subscription identifier - /// - /// The newsletter subscription identifier - /// NewsLetter subscription - NewsLetterSubscription GetNewsLetterSubscriptionById(int newsLetterSubscriptionId); + /// + /// Adds or deletes a newsletter subscription + /// + /// true add subscription, false delete + /// Email address + /// Store identifier + /// true added subscription, false removed subscription, null did nothing + bool? AddNewsLetterSubscriptionFor(bool add, string email, int storeId); + + /// + /// Gets a newsletter subscription by newsletter subscription identifier + /// + /// The newsletter subscription identifier + /// NewsLetter subscription + NewsLetterSubscription GetNewsLetterSubscriptionById(int newsLetterSubscriptionId); /// /// Gets a newsletter subscription by newsletter subscription GUID diff --git a/src/Libraries/SmartStore.Services/Messages/NewsLetterSubscriptionService.cs b/src/Libraries/SmartStore.Services/Messages/NewsLetterSubscriptionService.cs index fe238a9530..dde1d076c9 100644 --- a/src/Libraries/SmartStore.Services/Messages/NewsLetterSubscriptionService.cs +++ b/src/Libraries/SmartStore.Services/Messages/NewsLetterSubscriptionService.cs @@ -7,7 +7,6 @@ namespace SmartStore.Services.Messages { - public class NewsLetterSubscriptionService : INewsLetterSubscriptionService { private readonly IEventPublisher _eventPublisher; @@ -126,12 +125,52 @@ public virtual void DeleteNewsLetterSubscription(NewsLetterSubscription newsLett _eventPublisher.EntityDeleted(newsLetterSubscription); } - /// - /// Gets a newsletter subscription by newsletter subscription identifier - /// - /// The newsletter subscription identifier - /// NewsLetter subscription - public virtual NewsLetterSubscription GetNewsLetterSubscriptionById(int newsLetterSubscriptionId) + public virtual bool? AddNewsLetterSubscriptionFor(bool add, string email, int storeId) + { + bool? result = null; + + if (email.IsEmail()) + { + var newsletter = GetNewsLetterSubscriptionByEmail(email, storeId); + if (newsletter != null) + { + if (add) + { + newsletter.Active = true; + UpdateNewsLetterSubscription(newsletter); + result = true; + } + else + { + DeleteNewsLetterSubscription(newsletter); + result = false; + } + } + else + { + if (add) + { + InsertNewsLetterSubscription(new NewsLetterSubscription + { + NewsLetterSubscriptionGuid = Guid.NewGuid(), + Email = email, + Active = true, + CreatedOnUtc = DateTime.UtcNow, + StoreId = storeId + }); + result = true; + } + } + } + return result; + } + + /// + /// Gets a newsletter subscription by newsletter subscription identifier + /// + /// The newsletter subscription identifier + /// NewsLetter subscription + public virtual NewsLetterSubscription GetNewsLetterSubscriptionById(int newsLetterSubscriptionId) { if (newsLetterSubscriptionId == 0) return null; diff --git a/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs b/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs index e298174d3c..c5cdb7b58a 100644 --- a/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs +++ b/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs @@ -69,8 +69,9 @@ public partial class OrderProcessingService : IOrderProcessingService private readonly IAffiliateService _affiliateService; private readonly IEventPublisher _eventPublisher; private readonly IGenericAttributeService _genericAttributeService; + private readonly INewsLetterSubscriptionService _newsLetterSubscriptionService; - private readonly PaymentSettings _paymentSettings; + private readonly PaymentSettings _paymentSettings; private readonly RewardPointsSettings _rewardPointsSettings; private readonly OrderSettings _orderSettings; private readonly TaxSettings _taxSettings; @@ -78,48 +79,48 @@ public partial class OrderProcessingService : IOrderProcessingService private readonly CurrencySettings _currencySettings; private readonly ShoppingCartSettings _shoppingCartSettings; - #endregion + #endregion - #region Ctor + #region Ctor - /// - /// Ctor - /// - /// Order service - /// Web helper - /// Localization service - /// Language service - /// Product service - /// Payment service - /// Logger - /// Order total calculationservice - /// Price calculation service - /// Price formatter - /// Product attribute parser - /// Product attribute formatter - /// Gift card service - /// Shopping cart service - /// Checkout attribute service - /// Shipping service - /// Shipment service - /// Tax service - /// Customer service - /// Discount service - /// Encryption service - /// Work context + /// + /// Ctor + /// + /// Order service + /// Web helper + /// Localization service + /// Language service + /// Product service + /// Payment service + /// Logger + /// Order total calculationservice + /// Price calculation service + /// Price formatter + /// Product attribute parser + /// Product attribute formatter + /// Gift card service + /// Shopping cart service + /// Checkout attribute service + /// Shipping service + /// Shipment service + /// Tax service + /// Customer service + /// Discount service + /// Encryption service + /// Work context /// Store context - /// Workflow message service - /// Customer activity service - /// Currency service + /// Workflow message service + /// Customer activity service + /// Currency service /// Affiliate service - /// Event published - /// Payment settings - /// Reward points settings - /// Order settings - /// Tax settings - /// Localization settings - /// Currency settings - public OrderProcessingService(IOrderService orderService, + /// Event published + /// Payment settings + /// Reward points settings + /// Order settings + /// Tax settings + /// Localization settings + /// Currency settings + public OrderProcessingService(IOrderService orderService, IWebHelper webHelper, ILocalizationService localizationService, ILanguageService languageService, @@ -148,7 +149,8 @@ public OrderProcessingService(IOrderService orderService, IAffiliateService affiliateService, IEventPublisher eventPublisher, IGenericAttributeService genericAttributeService, - PaymentSettings paymentSettings, + INewsLetterSubscriptionService newsLetterSubscriptionService, + PaymentSettings paymentSettings, RewardPointsSettings rewardPointsSettings, OrderSettings orderSettings, TaxSettings taxSettings, @@ -185,6 +187,7 @@ public OrderProcessingService(IOrderService orderService, this._affiliateService = affiliateService; this._eventPublisher = eventPublisher; this._genericAttributeService = genericAttributeService; + this._newsLetterSubscriptionService = newsLetterSubscriptionService; this._paymentSettings = paymentSettings; this._rewardPointsSettings = rewardPointsSettings; this._orderSettings = orderSettings; @@ -1379,9 +1382,28 @@ public virtual PlaceOrderResult PlaceOrder(ProcessPaymentRequest processPaymentR _eventPublisher.PublishOrderPaid(order); } - #endregion - } - } + #endregion + + #region Newsletter subscription + + if (extraData.ContainsKey("SubscribeToNewsLetter") && _shoppingCartSettings.NewsLetterSubscription != CheckoutNewsLetterSubscription.None) + { + var addSubscription = extraData["SubscribeToNewsLetter"].ToBool(); + + bool? nsResult = _newsLetterSubscriptionService.AddNewsLetterSubscriptionFor(addSubscription, customer.Email, order.StoreId); + + if (nsResult.HasValue) + { + if (nsResult.Value) + _orderService.AddOrderNote(order, T("Admin.OrderNotice.NewsLetterSubscriptionAdded")); + else + _orderService.AddOrderNote(order, T("Admin.OrderNotice.NewsLetterSubscriptionRemoved")); + } + } + + #endregion + } + } else { result.AddError(T("Payment.PayingFailed")); diff --git a/src/Presentation/SmartStore.Web/Administration/Controllers/SettingController.cs b/src/Presentation/SmartStore.Web/Administration/Controllers/SettingController.cs index 990d47495a..44545f4f50 100644 --- a/src/Presentation/SmartStore.Web/Administration/Controllers/SettingController.cs +++ b/src/Presentation/SmartStore.Web/Administration/Controllers/SettingController.cs @@ -796,13 +796,14 @@ public ActionResult ShoppingCart() if (!_services.Permissions.Authorize(StandardPermissionProvider.ManageSettings)) return AccessDeniedView(); - //load settings for a chosen store scope var storeScope = this.GetActiveStoreScopeConfiguration(_services.StoreService, _services.WorkContext); var shoppingCartSettings = _services.Settings.LoadSetting(storeScope); + var model = shoppingCartSettings.ToModel(); - StoreDependingSettings.GetOverrideKeys(shoppingCartSettings, model, storeScope, _services.Settings); + model.AvailableNewsLetterSubscription = shoppingCartSettings.NewsLetterSubscription.ToSelectList(); + StoreDependingSettings.GetOverrideKeys(shoppingCartSettings, model, storeScope, _services.Settings); return View(model); } diff --git a/src/Presentation/SmartStore.Web/Administration/Infrastructure/AutoMapperStartupTask.cs b/src/Presentation/SmartStore.Web/Administration/Infrastructure/AutoMapperStartupTask.cs index 1d1a7130e8..fee7b88343 100644 --- a/src/Presentation/SmartStore.Web/Administration/Infrastructure/AutoMapperStartupTask.cs +++ b/src/Presentation/SmartStore.Web/Administration/Infrastructure/AutoMapperStartupTask.cs @@ -651,7 +651,8 @@ public void Execute() Mapper.CreateMap() .ForMember(dest => dest.MinimumOrderPlacementInterval, mo => mo.Ignore()) .ForMember(dest => dest.Id, mo => mo.Ignore()); - Mapper.CreateMap(); + Mapper.CreateMap() + .ForMember(dest => dest.AvailableNewsLetterSubscription, mo => mo.Ignore()); Mapper.CreateMap() .ForMember(dest => dest.MoveItemsFromWishlistToCart, mo => mo.Ignore()) .ForMember(dest => dest.ShowItemsFromWishlistToCartButton, mo => mo.Ignore()); diff --git a/src/Presentation/SmartStore.Web/Administration/Models/Settings/ShoppingCartSettingsModel.cs b/src/Presentation/SmartStore.Web/Administration/Models/Settings/ShoppingCartSettingsModel.cs index df20029b62..70b9353888 100644 --- a/src/Presentation/SmartStore.Web/Administration/Models/Settings/ShoppingCartSettingsModel.cs +++ b/src/Presentation/SmartStore.Web/Administration/Models/Settings/ShoppingCartSettingsModel.cs @@ -1,4 +1,7 @@ -using SmartStore.Web.Framework; +using System.Collections.Generic; +using System.Web.Mvc; +using SmartStore.Core.Domain.Orders; +using SmartStore.Web.Framework; namespace SmartStore.Admin.Models.Settings { @@ -40,7 +43,10 @@ public class ShoppingCartSettingsModel [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.CrossSellsNumber")] public int CrossSellsNumber { get; set; } - [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.EmailWishlistEnabled")] + [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.RoundPricesDuringCalculation")] + public bool RoundPricesDuringCalculation { get; set; } + + [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.EmailWishlistEnabled")] public bool EmailWishlistEnabled { get; set; } [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.AllowAnonymousUsersToEmailWishlist")] @@ -79,8 +85,8 @@ public class ShoppingCartSettingsModel [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.ShowEsdRevocationWaiverBox")] public bool ShowEsdRevocationWaiverBox { get; set; } - [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.RoundPricesDuringCalculation")] - public bool RoundPricesDuringCalculation { get; set; } - - } + [SmartResourceDisplayName("Admin.Configuration.Settings.ShoppingCart.NewsLetterSubscription")] + public CheckoutNewsLetterSubscription NewsLetterSubscription { get; set; } + public SelectList AvailableNewsLetterSubscription { get; set; } + } } \ No newline at end of file diff --git a/src/Presentation/SmartStore.Web/Administration/Views/Setting/ShoppingCart.cshtml b/src/Presentation/SmartStore.Web/Administration/Views/Setting/ShoppingCart.cshtml index 6ee39a782a..e58201b20e 100644 --- a/src/Presentation/SmartStore.Web/Administration/Views/Setting/ShoppingCart.cshtml +++ b/src/Presentation/SmartStore.Web/Administration/Views/Setting/ShoppingCart.cshtml @@ -51,8 +51,8 @@ @(Html.SmartStore().TabStrip().Name("catalogsettings-edit").Items(x => { x.Add().Text(T("Admin.Configuration.Settings.ShoppingCart.CartSettings").Text).Content(@TabCartSettings()).Selected(true); - x.Add().Text(T("Admin.Configuration.Settings.ShoppingCart.WishlistSettings").Text).Content(@TabWishlistSettings()); x.Add().Text(T("Admin.Configuration.Settings.ShoppingCart.Checkout").Text).Content(@TabCheckoutSettings()); + x.Add().Text(T("Admin.Configuration.Settings.ShoppingCart.WishlistSettings").Text).Content(@TabWishlistSettings()); })) } @@ -308,6 +308,16 @@ @Html.ValidationMessageFor(model => model.ShowCommentBox) + + + @Html.SmartLabelFor(model => model.NewsLetterSubscription) + + + @Html.SettingOverrideCheckbox(model => Model.NewsLetterSubscription) + @Html.DropDownListFor(model => model.NewsLetterSubscription, Model.AvailableNewsLetterSubscription) + @Html.ValidationMessageFor(model => model.NewsLetterSubscription) + + @Html.SmartLabelFor(model => model.ShowConfirmOrderLegalHint) diff --git a/src/Presentation/SmartStore.Web/Controllers/CheckoutController.cs b/src/Presentation/SmartStore.Web/Controllers/CheckoutController.cs index cef4f0de15..1bca0033b8 100644 --- a/src/Presentation/SmartStore.Web/Controllers/CheckoutController.cs +++ b/src/Presentation/SmartStore.Web/Controllers/CheckoutController.cs @@ -831,8 +831,9 @@ public ActionResult ConfirmOrder(FormCollection form) var placeOrderExtraData = new Dictionary(); placeOrderExtraData["CustomerComment"] = form["customercommenthidden"]; + placeOrderExtraData["SubscribeToNewsLetter"] = form["SubscribeToNewsLetterHidden"]; - var placeOrderResult = _orderProcessingService.PlaceOrder(processPaymentRequest, placeOrderExtraData); + var placeOrderResult = _orderProcessingService.PlaceOrder(processPaymentRequest, placeOrderExtraData); if (placeOrderResult.Success) { diff --git a/src/Presentation/SmartStore.Web/Controllers/CustomerController.cs b/src/Presentation/SmartStore.Web/Controllers/CustomerController.cs index 104d5a4393..cd0f271796 100644 --- a/src/Presentation/SmartStore.Web/Controllers/CustomerController.cs +++ b/src/Presentation/SmartStore.Web/Controllers/CustomerController.cs @@ -979,8 +979,7 @@ public ActionResult Info(CustomerInfoModel model) if (ModelState.IsValid) { //username - if (_customerSettings.UsernamesEnabled && - this._customerSettings.AllowUsersToChangeUsernames) + if (_customerSettings.UsernamesEnabled && _customerSettings.AllowUsersToChangeUsernames) { if (!customer.Username.Equals(model.Username.Trim(), StringComparison.InvariantCultureIgnoreCase)) { @@ -1040,7 +1039,7 @@ public ActionResult Info(CustomerInfoModel model) if (model.CustomerNumber != currentCustomerNumber && customerNumbers.Where(x => x.Value == model.CustomerNumber).Any()) { - this.NotifyError("Common.CustomerNumberAlreadyExists"); + NotifyError("Common.CustomerNumberAlreadyExists"); } else { @@ -1083,38 +1082,13 @@ public ActionResult Info(CustomerInfoModel model) //newsletter if (_customerSettings.NewsletterEnabled) { - //save newsletter value - var newsletter = _newsLetterSubscriptionService.GetNewsLetterSubscriptionByEmail(customer.Email, _storeContext.CurrentStore.Id); - if (newsletter != null) - { - if (model.Newsletter) - { - newsletter.Active = true; - _newsLetterSubscriptionService.UpdateNewsLetterSubscription(newsletter); - } - else - { - _newsLetterSubscriptionService.DeleteNewsLetterSubscription(newsletter); - } - } - else - { - if (model.Newsletter) - { - _newsLetterSubscriptionService.InsertNewsLetterSubscription(new NewsLetterSubscription() - { - NewsLetterSubscriptionGuid = Guid.NewGuid(), - Email = customer.Email, - Active = true, - CreatedOnUtc = DateTime.UtcNow, - StoreId = _storeContext.CurrentStore.Id - }); - } - } + _newsLetterSubscriptionService.AddNewsLetterSubscriptionFor(model.Newsletter, customer.Email, _storeContext.CurrentStore.Id); } - if (_forumSettings.ForumsEnabled && _forumSettings.SignaturesEnabled) - _genericAttributeService.SaveAttribute(customer, SystemCustomerAttributeNames.Signature, model.Signature); + if (_forumSettings.ForumsEnabled && _forumSettings.SignaturesEnabled) + { + _genericAttributeService.SaveAttribute(customer, SystemCustomerAttributeNames.Signature, model.Signature); + } return RedirectToAction("Info"); } diff --git a/src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs b/src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs index 17bd2f0a1c..d593c6c742 100644 --- a/src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs +++ b/src/Presentation/SmartStore.Web/Controllers/ShoppingCartController.cs @@ -665,6 +665,7 @@ protected void PrepareShoppingCartModel(ShoppingCartModel model, model.GiftCardBox.Display = _shoppingCartSettings.ShowGiftCardBox; model.DisplayCommentBox = _shoppingCartSettings.ShowCommentBox; + model.NewsLetterSubscription = _shoppingCartSettings.NewsLetterSubscription; model.DisplayEsdRevocationWaiverBox = _shoppingCartSettings.ShowEsdRevocationWaiverBox; //cart warnings diff --git a/src/Presentation/SmartStore.Web/Models/ShoppingCart/ShoppingCartModel.cs b/src/Presentation/SmartStore.Web/Models/ShoppingCart/ShoppingCartModel.cs index 6a38af28ac..48d054e2e0 100644 --- a/src/Presentation/SmartStore.Web/Models/ShoppingCart/ShoppingCartModel.cs +++ b/src/Presentation/SmartStore.Web/Models/ShoppingCart/ShoppingCartModel.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Web.Mvc; using SmartStore.Core.Domain.Catalog; +using SmartStore.Core.Domain.Orders; using SmartStore.Web.Framework.Modelling; using SmartStore.Web.Models.Common; using SmartStore.Web.Models.Media; @@ -51,6 +52,9 @@ public ShoppingCartModel() public bool DisplayCommentBox { get; set; } public string CustomerComment { get; set; } + public CheckoutNewsLetterSubscription NewsLetterSubscription { get; set; } + public bool? SubscribeToNewsLetter { get; set; } + public bool DisplayEsdRevocationWaiverBox { get; set; } #region Nested Classes diff --git a/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml b/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml index 82c4444f62..0f369476d6 100644 --- a/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml +++ b/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml @@ -28,9 +28,10 @@ + - if (Model.TermsOfServiceEnabled) - { + if (Model.TermsOfServiceEnabled) + {
+ + @Html.Widget("order_edit_top") +
diff --git a/src/Presentation/SmartStore.Web/Views/Checkout/BillingAddress.cshtml b/src/Presentation/SmartStore.Web/Views/Checkout/BillingAddress.cshtml index cf32007b54..2e011c985f 100644 --- a/src/Presentation/SmartStore.Web/Views/Checkout/BillingAddress.cshtml +++ b/src/Presentation/SmartStore.Web/Views/Checkout/BillingAddress.cshtml @@ -30,7 +30,7 @@
-
From fe72ee42b569d427c01a2e29acf8c96e0c8f00a1 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Mon, 29 Feb 2016 19:06:21 +0100 Subject: [PATCH 012/357] Eliminated merge conflict generated text --- .../Orders/OrderProcessingService.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs b/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs index 5b068d152f..f86c2ce499 100644 --- a/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs +++ b/src/Libraries/SmartStore.Services/Orders/OrderProcessingService.cs @@ -554,16 +554,11 @@ public virtual PlaceOrderResult PlaceOrder( IList cart = null; if (!processPaymentRequest.IsRecurringPayment) { -<<<<<<< HEAD - // load shopping cart - cart = customer.GetCartItems(ShoppingCartType.ShoppingCart, processPaymentRequest.StoreId); -======= //load shopping cart if (processPaymentRequest.ShoppingCartItems.Count > 0) cart = processPaymentRequest.ShoppingCartItems; else cart = customer.GetCartItems(ShoppingCartType.ShoppingCart, processPaymentRequest.StoreId); ->>>>>>> Minor enhancement if (cart.Count == 0) throw new SmartException(T("ShoppingCart.CartIsEmpty")); @@ -1365,13 +1360,8 @@ public virtual PlaceOrderResult PlaceOrder( // check order status CheckOrderStatus(order); -<<<<<<< HEAD - // reset checkout data - if (!processPaymentRequest.IsRecurringPayment) -======= //reset checkout data if (!processPaymentRequest.IsRecurringPayment && !processPaymentRequest.IsMultiOrder) ->>>>>>> Minor enhancement { _customerService.ResetCheckoutData(customer, processPaymentRequest.StoreId, clearCouponCodes: true, clearCheckoutAttributes: true); } From 76f7dc49667aae48e291eb6a370ba639f56a3391 Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Mon, 29 Feb 2016 21:04:34 +0100 Subject: [PATCH 013/357] Fixed: Attribute with a product linkage throws exception if added to cart ("There is already an open DataReader associated with this Connection which must be closed first") --- changelog.md | 1 + .../SmartStore.Services/Catalog/PriceCalculationService.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 1ac8c1f4d0..bb3b86b4db 100644 --- a/changelog.md +++ b/changelog.md @@ -132,6 +132,7 @@ * PayPal Express: Void and refund out of function ("The transaction id is not valid") * Customer could not delete his avatar * Facebook authentication: Email missing in verification +* Attribute with a product linkage throws exception if added to cart ## SmartStore.NET 2.2.2 diff --git a/src/Libraries/SmartStore.Services/Catalog/PriceCalculationService.cs b/src/Libraries/SmartStore.Services/Catalog/PriceCalculationService.cs index 1ce3b347ce..7a06368334 100644 --- a/src/Libraries/SmartStore.Services/Catalog/PriceCalculationService.cs +++ b/src/Libraries/SmartStore.Services/Catalog/PriceCalculationService.cs @@ -756,9 +756,9 @@ public virtual decimal GetUnitPrice(OrganizedShoppingCartItem shoppingCartItem, { product.MergeWithCombination(shoppingCartItem.Item.AttributesXml, _productAttributeParser); - decimal attributesTotalPrice = decimal.Zero; + var attributesTotalPrice = decimal.Zero; - var pvaValues = _productAttributeParser.ParseProductVariantAttributeValues(shoppingCartItem.Item.AttributesXml); + var pvaValues = _productAttributeParser.ParseProductVariantAttributeValues(shoppingCartItem.Item.AttributesXml).ToList(); if (pvaValues != null) { From fc07a92be7d2f6a39a0356d953c153cae9a71284 Mon Sep 17 00:00:00 2001 From: Murat Cakir Date: Mon, 29 Feb 2016 22:32:54 +0100 Subject: [PATCH 014/357] Increased Version --- SmartStoreNET.Tasks.Targets | 2 +- src/AssemblySharedInfo.cs | 2 +- src/AssemblyVersionInfo.cs | 6 +++--- src/Libraries/SmartStore.Core/SmartStoreVersion.cs | 3 ++- src/Plugins/SmartStore.AmazonPay/Description.txt | 4 ++-- src/Plugins/SmartStore.Clickatell/Description.txt | 4 ++-- src/Plugins/SmartStore.DevTools/Description.txt | 4 ++-- src/Plugins/SmartStore.DiscountRules/Description.txt | 4 ++-- src/Plugins/SmartStore.FacebookAuth/Description.txt | 4 ++-- src/Plugins/SmartStore.GoogleAnalytics/Description.txt | 4 ++-- src/Plugins/SmartStore.GoogleMerchantCenter/Description.txt | 4 ++-- src/Plugins/SmartStore.OfflinePayment/Description.txt | 4 ++-- src/Plugins/SmartStore.PayPal/Description.txt | 4 ++-- src/Plugins/SmartStore.Shipping/Description.txt | 4 ++-- src/Plugins/SmartStore.ShippingByWeight/Description.txt | 4 ++-- src/Plugins/SmartStore.Tax/Description.txt | 4 ++-- src/Plugins/SmartStore.WebApi/Description.txt | 4 ++-- 17 files changed, 33 insertions(+), 32 deletions(-) diff --git a/SmartStoreNET.Tasks.Targets b/SmartStoreNET.Tasks.Targets index f9b7371083..4fb755fcf5 100644 --- a/SmartStoreNET.Tasks.Targets +++ b/SmartStoreNET.Tasks.Targets @@ -44,7 +44,7 @@ x86 $(BUILD_NUMBER) - 2.2.2 + 2.5.0 $(StageFolder) .$(Version) diff --git a/src/AssemblySharedInfo.cs b/src/AssemblySharedInfo.cs index 0d0c359b93..79225de4c7 100644 --- a/src/AssemblySharedInfo.cs +++ b/src/AssemblySharedInfo.cs @@ -7,6 +7,6 @@ [assembly: AssemblyDescription("SmartStore.NET")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("SmartStore AG")] -[assembly: AssemblyCopyright("Copyright © SmartStore AG 2015")] +[assembly: AssemblyCopyright("Copyright © SmartStore AG 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/AssemblyVersionInfo.cs b/src/AssemblyVersionInfo.cs index 0c8dfa2cfb..67335b18c1 100644 --- a/src/AssemblyVersionInfo.cs +++ b/src/AssemblyVersionInfo.cs @@ -9,7 +9,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.2.0.0")] +[assembly: AssemblyVersion("2.5.0.0")] -[assembly: AssemblyFileVersion("2.2.0.0")] -[assembly: AssemblyInformationalVersion("2.2.2.0")] +[assembly: AssemblyFileVersion("2.5.0.0")] +[assembly: AssemblyInformationalVersion("2.5.0.0")] diff --git a/src/Libraries/SmartStore.Core/SmartStoreVersion.cs b/src/Libraries/SmartStore.Core/SmartStoreVersion.cs index 658a37fe4e..df3c302220 100644 --- a/src/Libraries/SmartStore.Core/SmartStoreVersion.cs +++ b/src/Libraries/SmartStore.Core/SmartStoreVersion.cs @@ -19,7 +19,8 @@ public static class SmartStoreVersion new Version("1.2.1"), // MC: had to be :-( new Version("2.0"), new Version("2.1"), - new Version("2.2") + new Version("2.2"), + new Version("2.5") }; private const string HELP_BASEURL = "http://docs.smartstore.com/display/SMNET25/"; diff --git a/src/Plugins/SmartStore.AmazonPay/Description.txt b/src/Plugins/SmartStore.AmazonPay/Description.txt index 383de5f866..3e203915e6 100644 --- a/src/Plugins/SmartStore.AmazonPay/Description.txt +++ b/src/Plugins/SmartStore.AmazonPay/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Pay with Amazon SystemName: SmartStore.AmazonPay -Version: 2.2.0.3 +Version: 2.5.0 Group: Payment -MinAppVersion: 2.2.0 +MinAppVersion: 2.5.0 Author: SmartStore AG DisplayOrder: 1 FileName: SmartStore.AmazonPay.dll diff --git a/src/Plugins/SmartStore.Clickatell/Description.txt b/src/Plugins/SmartStore.Clickatell/Description.txt index 9b5152e1bc..d5e561a2fc 100644 --- a/src/Plugins/SmartStore.Clickatell/Description.txt +++ b/src/Plugins/SmartStore.Clickatell/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Clickatell SMS Provider SystemName: SmartStore.Clickatell Group: Mobile -Version: 2.2.0 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.Clickatell.dll ResourceRootKey: Plugins.Sms.Clickatell \ No newline at end of file diff --git a/src/Plugins/SmartStore.DevTools/Description.txt b/src/Plugins/SmartStore.DevTools/Description.txt index c2fd9f3fd6..fff9df57de 100644 --- a/src/Plugins/SmartStore.DevTools/Description.txt +++ b/src/Plugins/SmartStore.DevTools/Description.txt @@ -1,8 +1,8 @@ FriendlyName: SmartStore.NET Developer Tools (MiniProfiler and other goodies) SystemName: SmartStore.DevTools Group: Developer -Version: 2.2.0 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.DevTools.dll ResourceRootKey: Plugins.Developer.DevTools \ No newline at end of file diff --git a/src/Plugins/SmartStore.DiscountRules/Description.txt b/src/Plugins/SmartStore.DiscountRules/Description.txt index a8f07ab2e8..2a17b4fcd9 100644 --- a/src/Plugins/SmartStore.DiscountRules/Description.txt +++ b/src/Plugins/SmartStore.DiscountRules/Description.txt @@ -2,8 +2,8 @@ Description: Contains common discount requirement rule providers like "Billing country is", "Customer role is", "Had spent amount" etc. Group: Marketing SystemName: SmartStore.DiscountRules -Version: 2.2.0 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 0 FileName: SmartStore.DiscountRules.dll ResourceRootKey: Plugins.SmartStore.DiscountRules diff --git a/src/Plugins/SmartStore.FacebookAuth/Description.txt b/src/Plugins/SmartStore.FacebookAuth/Description.txt index ef5b27035b..6e028c02d4 100644 --- a/src/Plugins/SmartStore.FacebookAuth/Description.txt +++ b/src/Plugins/SmartStore.FacebookAuth/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Facebook SystemName: SmartStore.FacebookAuth Group: Security -Version: 2.2.0.2 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 5 FileName: SmartStore.FacebookAuth.dll ResourceRootKey: Plugins.ExternalAuth.Facebook \ No newline at end of file diff --git a/src/Plugins/SmartStore.GoogleAnalytics/Description.txt b/src/Plugins/SmartStore.GoogleAnalytics/Description.txt index 2e32945c39..908e329118 100644 --- a/src/Plugins/SmartStore.GoogleAnalytics/Description.txt +++ b/src/Plugins/SmartStore.GoogleAnalytics/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Google Analytics SystemName: SmartStore.GoogleAnalytics Group: Analytics -Version: 2.2.2.2 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.GoogleAnalytics.dll ResourceRootKey: Plugins.Widgets.GoogleAnalytics diff --git a/src/Plugins/SmartStore.GoogleMerchantCenter/Description.txt b/src/Plugins/SmartStore.GoogleMerchantCenter/Description.txt index 55dfd4845a..d30ed161f9 100644 --- a/src/Plugins/SmartStore.GoogleMerchantCenter/Description.txt +++ b/src/Plugins/SmartStore.GoogleMerchantCenter/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Google Merchant Center (GMC) feed SystemName: SmartStore.GoogleMerchantCenter Group: Marketing -Version: 2.2.0.5 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 Author: SmartStore AG DisplayOrder: 1 FileName: SmartStore.GoogleMerchantCenter.dll diff --git a/src/Plugins/SmartStore.OfflinePayment/Description.txt b/src/Plugins/SmartStore.OfflinePayment/Description.txt index 33f0f72b71..0b09221978 100644 --- a/src/Plugins/SmartStore.OfflinePayment/Description.txt +++ b/src/Plugins/SmartStore.OfflinePayment/Description.txt @@ -2,8 +2,8 @@ Description: Contains common offline payment methods like Direct Debit, Invoice, Prepayment etc. Group: Payment SystemName: SmartStore.OfflinePayment -Version: 2.2.2.1 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 0 FileName: SmartStore.OfflinePayment.dll ResourceRootKey: Plugins.SmartStore.OfflinePayment diff --git a/src/Plugins/SmartStore.PayPal/Description.txt b/src/Plugins/SmartStore.PayPal/Description.txt index 5aca36a6c0..976b7116dc 100644 --- a/src/Plugins/SmartStore.PayPal/Description.txt +++ b/src/Plugins/SmartStore.PayPal/Description.txt @@ -2,8 +2,8 @@ Description: Provides the PayPal payment methods PayPal Express, PayPal Standard and PayPal Direct. SystemName: SmartStore.PayPal Group: Payment -Version: 2.2.0.4 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.PayPal.dll ResourceRootKey: Plugins.SmartStore.PayPal diff --git a/src/Plugins/SmartStore.Shipping/Description.txt b/src/Plugins/SmartStore.Shipping/Description.txt index 533761599a..5d85eddbb8 100644 --- a/src/Plugins/SmartStore.Shipping/Description.txt +++ b/src/Plugins/SmartStore.Shipping/Description.txt @@ -2,8 +2,8 @@ Description: Provides shipping methods for fixed rate shipping and computation based on weight. SystemName: SmartStore.Shipping Group: Shipping -Version: 2.2.0.1 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.Shipping.dll ResourceRootKey: Plugins.SmartStore.Shipping \ No newline at end of file diff --git a/src/Plugins/SmartStore.ShippingByWeight/Description.txt b/src/Plugins/SmartStore.ShippingByWeight/Description.txt index 65f72e227d..03312a5943 100644 --- a/src/Plugins/SmartStore.ShippingByWeight/Description.txt +++ b/src/Plugins/SmartStore.ShippingByWeight/Description.txt @@ -1,8 +1,8 @@ FriendlyName: Shipping by weight SystemName: SmartStore.ShippingByWeight Group: Shipping -Version: 2.2.0.1 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 1 FileName: SmartStore.ShippingByWeight.dll ResourceRootKey: Plugins.Shipping.ByWeight \ No newline at end of file diff --git a/src/Plugins/SmartStore.Tax/Description.txt b/src/Plugins/SmartStore.Tax/Description.txt index 245ae96884..79d79ec7a8 100644 --- a/src/Plugins/SmartStore.Tax/Description.txt +++ b/src/Plugins/SmartStore.Tax/Description.txt @@ -2,8 +2,8 @@ Description: Contains default tax providers like FixedRate, ByRegion etc. Group: Tax SystemName: SmartStore.Tax -Version: 2.2.0 -MinAppVersion: 2.2.0 +Version: 2.5.0 +MinAppVersion: 2.5.0 DisplayOrder: 0 FileName: SmartStore.Tax.dll ResourceRootKey: Plugins.SmartStore.Tax diff --git a/src/Plugins/SmartStore.WebApi/Description.txt b/src/Plugins/SmartStore.WebApi/Description.txt index 5cd3474d8f..aa73f1d263 100644 --- a/src/Plugins/SmartStore.WebApi/Description.txt +++ b/src/Plugins/SmartStore.WebApi/Description.txt @@ -1,8 +1,8 @@ FriendlyName: SmartStore.NET Web Api SystemName: SmartStore.WebApi -Version: 2.2.0.5 +Version: 2.5.0 Group: Api -MinAppVersion: 2.2.0 +MinAppVersion: 2.5.0 Author: SmartStore AG DisplayOrder: 1 FileName: SmartStore.WebApi.dll From 4f951a9d8286fe7a61b3858902f3fc17a1031cdc Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Tue, 1 Mar 2016 10:28:01 +0100 Subject: [PATCH 015/357] Moving export files into subfolder 'Export' --- .../{ => Export}/DataExportResult.cs | 0 .../{ => Export}/DataExportTask.cs | 0 .../DataExchange/{ => Export}/DataExporter.cs | 0 .../{ => Export}/DynamicEntityHelper.cs | 0 .../{ => Export}/ExportConfigurationInfo.cs | 0 .../{ => Export}/ExportDataSegmenter.cs | 0 .../{ => Export}/ExportExecuteContext.cs | 0 .../{ => Export}/ExportExtensions.cs | 0 .../{ => Export}/ExportFeaturesAttribute.cs | 0 .../{ => Export}/ExportProfileService.cs | 0 .../{ => Export}/ExportProviderBase.cs | 0 .../{ => Export}/ExportXmlHelper.cs | 0 .../{ => Export}/IDataExporter.cs | 0 .../{ => Export}/IExportProfileService.cs | 0 .../{ => Export}/IExportProvider.cs | 0 .../SmartStore.Services.csproj | 30 +++++++++---------- 16 files changed, 15 insertions(+), 15 deletions(-) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/DataExportResult.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/DataExportTask.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/DataExporter.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/DynamicEntityHelper.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportConfigurationInfo.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportDataSegmenter.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportExecuteContext.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportExtensions.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportFeaturesAttribute.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportProfileService.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportProviderBase.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/ExportXmlHelper.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/IDataExporter.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/IExportProfileService.cs (100%) rename src/Libraries/SmartStore.Services/DataExchange/{ => Export}/IExportProvider.cs (100%) diff --git a/src/Libraries/SmartStore.Services/DataExchange/DataExportResult.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/DataExportResult.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/DataExportResult.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/DataExportResult.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/DataExportTask.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/DataExportTask.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/DataExportTask.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/DataExportTask.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/DataExporter.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/DataExporter.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/DataExporter.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/DataExporter.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/DynamicEntityHelper.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/DynamicEntityHelper.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/DynamicEntityHelper.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/DynamicEntityHelper.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportConfigurationInfo.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportConfigurationInfo.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportConfigurationInfo.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportConfigurationInfo.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportDataSegmenter.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportDataSegmenter.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportDataSegmenter.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportDataSegmenter.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportExecuteContext.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportExecuteContext.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportExecuteContext.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportExecuteContext.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportExtensions.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportExtensions.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportExtensions.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportExtensions.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportFeaturesAttribute.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportFeaturesAttribute.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportFeaturesAttribute.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportFeaturesAttribute.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportProfileService.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportProfileService.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportProfileService.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportProfileService.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportProviderBase.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportProviderBase.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportProviderBase.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportProviderBase.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/ExportXmlHelper.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/ExportXmlHelper.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/ExportXmlHelper.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/ExportXmlHelper.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/IDataExporter.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/IDataExporter.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/IDataExporter.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/IDataExporter.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/IExportProfileService.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/IExportProfileService.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/IExportProfileService.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/IExportProfileService.cs diff --git a/src/Libraries/SmartStore.Services/DataExchange/IExportProvider.cs b/src/Libraries/SmartStore.Services/DataExchange/Export/IExportProvider.cs similarity index 100% rename from src/Libraries/SmartStore.Services/DataExchange/IExportProvider.cs rename to src/Libraries/SmartStore.Services/DataExchange/Export/IExportProvider.cs diff --git a/src/Libraries/SmartStore.Services/SmartStore.Services.csproj b/src/Libraries/SmartStore.Services/SmartStore.Services.csproj index f48d08d079..3cd734dd9b 100644 --- a/src/Libraries/SmartStore.Services/SmartStore.Services.csproj +++ b/src/Libraries/SmartStore.Services/SmartStore.Services.csproj @@ -187,7 +187,7 @@ - + @@ -202,31 +202,31 @@ - - + + - + - - - + + + - - - - - + + + + + - - - + + + From 895bc3550a87d8d5dce4cd7fab9e8d48fe0b4a06 Mon Sep 17 00:00:00 2001 From: Marcus Gesing Date: Tue, 1 Mar 2016 11:25:56 +0100 Subject: [PATCH 016/357] EntityImporterBase implements IEntityImporter --- .../Catalog/Importer/CategoryImporter.cs | 4 ++-- .../Catalog/Importer/ProductImporter.cs | 4 ++-- .../Customers/Importer/CustomerImporter.cs | 4 ++-- .../DataExchange/Import/EntityImporterBase.cs | 9 ++++++++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs b/src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs index 1c70a482d7..703c86f735 100644 --- a/src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs +++ b/src/Libraries/SmartStore.Services/Catalog/Importer/CategoryImporter.cs @@ -18,7 +18,7 @@ namespace SmartStore.Services.Catalog.Importer { - public class CategoryImporter : EntityImporterBase, IEntityImporter + public class CategoryImporter : EntityImporterBase { private readonly IRepository _categoryRepository; private readonly IRepository _urlRecordRepository; @@ -416,7 +416,7 @@ public static string[] DefaultKeyFields } } - public void Execute(IImportExecuteContext context) + protected override void Import(IImportExecuteContext context) { var srcToDestId = new Dictionary(); diff --git a/src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs b/src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs index 4dbcf7f271..496e5b54e4 100644 --- a/src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs +++ b/src/Libraries/SmartStore.Services/Catalog/Importer/ProductImporter.cs @@ -18,7 +18,7 @@ namespace SmartStore.Services.Catalog.Importer { - public class ProductImporter : EntityImporterBase, IEntityImporter + public class ProductImporter : EntityImporterBase { private readonly IRepository _productPictureRepository; private readonly IRepository _productManufacturerRepository; @@ -733,7 +733,7 @@ public static string[] DefaultKeyFields } } - public void Execute(IImportExecuteContext context) + protected override void Import(IImportExecuteContext context) { var srcToDestId = new Dictionary(); diff --git a/src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs b/src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs index 5496914771..a056820739 100644 --- a/src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs +++ b/src/Libraries/SmartStore.Services/Customers/Importer/CustomerImporter.cs @@ -20,7 +20,7 @@ namespace SmartStore.Services.Customers.Importer { - public class CustomerImporter : EntityImporterBase, IEntityImporter + public class CustomerImporter : EntityImporterBase { private const string _attributeKeyGroup = "Customer"; @@ -373,7 +373,7 @@ public static string[] DefaultKeyFields } } - public void Execute(IImportExecuteContext context) + protected override void Import(IImportExecuteContext context) { var customer = _services.WorkContext.CurrentCustomer; var allowManagingCustomerRoles = _services.Permissions.Authorize(StandardPermissionProvider.ManageCustomerRoles, customer); diff --git a/src/Libraries/SmartStore.Services/DataExchange/Import/EntityImporterBase.cs b/src/Libraries/SmartStore.Services/DataExchange/Import/EntityImporterBase.cs index d196ed3359..9ef5baf6d5 100644 --- a/src/Libraries/SmartStore.Services/DataExchange/Import/EntityImporterBase.cs +++ b/src/Libraries/SmartStore.Services/DataExchange/Import/EntityImporterBase.cs @@ -8,7 +8,7 @@ namespace SmartStore.Services.DataExchange.Import { - public abstract class EntityImporterBase + public abstract class EntityImporterBase : IEntityImporter { private const string _imageDownloadFolder = @"Content\DownloadedImages"; @@ -22,6 +22,13 @@ public abstract class EntityImporterBase public FileDownloadManagerContext DownloaderContext { get; private set; } + protected abstract void Import(IImportExecuteContext context); + + public void Execute(IImportExecuteContext context) + { + Import(context); + } + public void Init(IImportExecuteContext context, DataExchangeSettings dataExchangeSettings) { UtcNow = DateTime.UtcNow; From 5ddd776ad3e52f86db449ba12f23b9ba03849719 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Wed, 2 Mar 2016 15:05:32 +0100 Subject: [PATCH 017/357] Added modal-flex class to dialogs on checkout confirm page --- .../Themes/Alpha/Content/checkout.less | 14 -------------- .../SmartStore.Web/Views/Checkout/Confirm.cshtml | 8 ++++---- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/Presentation/SmartStore.Web/Themes/Alpha/Content/checkout.less b/src/Presentation/SmartStore.Web/Themes/Alpha/Content/checkout.less index ec8e364519..60e01fb235 100644 --- a/src/Presentation/SmartStore.Web/Themes/Alpha/Content/checkout.less +++ b/src/Presentation/SmartStore.Web/Themes/Alpha/Content/checkout.less @@ -240,22 +240,8 @@ /* Terms of service ================================================ */ - -#terms-of-service-modal { - width: 650px; -} -#terms-of-service-modal .modal-body { - min-height: 300px; - overflow: hidden; -} -#iframe-terms-of-service { - min-height: 400px; - width: 100%; -} - .terms-of-service.alert { padding-bottom: 4px !important; - a.read { font-weight: bold; &:hover { diff --git a/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml b/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml index 0f369476d6..8f7522eb04 100644 --- a/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml +++ b/src/Presentation/SmartStore.Web/Views/Checkout/Confirm.cshtml @@ -37,11 +37,11 @@ $(document).ready(function () { $("#terms-of-service-trigger").click(function (event) { event.preventDefault(); - $("#terms-of-service-modal .modal-body").html('