diff --git a/Sources/AssemblyVersionAuto.cs b/Sources/AssemblyVersionAuto.cs index accf071a..51158d04 100644 --- a/Sources/AssemblyVersionAuto.cs +++ b/Sources/AssemblyVersionAuto.cs @@ -2,7 +2,7 @@ -[assembly: AssemblyCopyright("Copyright © 2017 Episerver")] -[assembly: AssemblyVersion("11.2.6.0")] -[assembly: AssemblyInformationalVersion("11.2.6")] -[assembly: AssemblyFileVersion("11.2.6.2664")] +[assembly: AssemblyCopyright("Copyright � 2017 Episerver")] +[assembly: AssemblyVersion("11.3.0.0")] +[assembly: AssemblyInformationalVersion("11.3.0")] +[assembly: AssemblyFileVersion("11.3.0.2737")] diff --git a/Sources/EPiServer.Reference.Commerce.Manager/EPiServer.Reference.Commerce.Manager.csproj b/Sources/EPiServer.Reference.Commerce.Manager/EPiServer.Reference.Commerce.Manager.csproj index cd6f2c49..d5110699 100644 --- a/Sources/EPiServer.Reference.Commerce.Manager/EPiServer.Reference.Commerce.Manager.csproj +++ b/Sources/EPiServer.Reference.Commerce.Manager/EPiServer.Reference.Commerce.Manager.csproj @@ -378,105 +378,105 @@ - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Business.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Business.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Commerce.Internal.Migration.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Commerce.Internal.Migration.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.Data.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.Data.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Marketing.Validators.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Marketing.Validators.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Payment.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Payment.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Website.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Website.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Workflow.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Workflow.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.DataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.DataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.FileUploader.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.FileUploader.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.MetaDataPlus.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.MetaDataPlus.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.Extensions.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.Extensions.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.LuceneSearchProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.LuceneSearchProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.SqlDataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.SqlDataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.WebConsoleLib.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.WebConsoleLib.dll True - ..\..\packages\EPiServer.CommerceManager.11.2.6\lib\net452\Mediachase.ConsoleManager.dll + ..\..\packages\EPiServer.CommerceManager.11.3.0\lib\net452\Mediachase.ConsoleManager.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\AjaxControlToolkit.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\AjaxControlToolkit.dll True - ..\..\packages\EPiServer.CommerceManager.11.2.6\lib\net452\ComponentArt.Web.UI.dll + ..\..\packages\EPiServer.CommerceManager.11.3.0\lib\net452\ComponentArt.Web.UI.dll True - ..\..\packages\EPiServer.CommerceManager.11.2.6\lib\net452\RssToolkit.dll + ..\..\packages\EPiServer.CommerceManager.11.3.0\lib\net452\RssToolkit.dll True - ..\..\packages\EPiServer.CommerceManager.11.2.6\lib\net452\Validators.dll + ..\..\packages\EPiServer.CommerceManager.11.3.0\lib\net452\Validators.dll True - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/Sources/EPiServer.Reference.Commerce.Manager/packages.config b/Sources/EPiServer.Reference.Commerce.Manager/packages.config index e110a7b7..0431b885 100644 --- a/Sources/EPiServer.Reference.Commerce.Manager/packages.config +++ b/Sources/EPiServer.Reference.Commerce.Manager/packages.config @@ -32,6 +32,6 @@ - - + + diff --git a/Sources/EPiServer.Reference.Commerce.Manager/web.config b/Sources/EPiServer.Reference.Commerce.Manager/web.config index bf240c24..64b0eccf 100644 --- a/Sources/EPiServer.Reference.Commerce.Manager/web.config +++ b/Sources/EPiServer.Reference.Commerce.Manager/web.config @@ -65,6 +65,7 @@ + @@ -522,75 +523,75 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Sources/EPiServer.Reference.Commerce.Shared/EPiServer.Reference.Commerce.Shared.csproj b/Sources/EPiServer.Reference.Commerce.Shared/EPiServer.Reference.Commerce.Shared.csproj index d85afd0c..9d2b44f9 100644 --- a/Sources/EPiServer.Reference.Commerce.Shared/EPiServer.Reference.Commerce.Shared.csproj +++ b/Sources/EPiServer.Reference.Commerce.Shared/EPiServer.Reference.Commerce.Shared.csproj @@ -242,79 +242,79 @@ --> - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Business.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Business.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Commerce.Internal.Migration.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Commerce.Internal.Migration.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.Data.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.Data.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Marketing.Validators.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Marketing.Validators.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Payment.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Payment.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Website.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Website.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Workflow.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Workflow.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.DataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.DataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.FileUploader.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.FileUploader.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.MetaDataPlus.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.MetaDataPlus.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.Extensions.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.Extensions.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.LuceneSearchProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.LuceneSearchProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.SqlDataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.SqlDataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.WebConsoleLib.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.WebConsoleLib.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\AjaxControlToolkit.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\AjaxControlToolkit.dll True diff --git a/Sources/EPiServer.Reference.Commerce.Shared/packages.config b/Sources/EPiServer.Reference.Commerce.Shared/packages.config index 15309b3a..eed32754 100644 --- a/Sources/EPiServer.Reference.Commerce.Shared/packages.config +++ b/Sources/EPiServer.Reference.Commerce.Shared/packages.config @@ -30,5 +30,5 @@ - + diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/EPiServer.Reference.Commerce.Site.Tests.csproj b/Sources/EPiServer.Reference.Commerce.Site.Tests/EPiServer.Reference.Commerce.Site.Tests.csproj index 1472deef..24966de6 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/EPiServer.Reference.Commerce.Site.Tests.csproj +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/EPiServer.Reference.Commerce.Site.Tests.csproj @@ -110,12 +110,18 @@ ..\..\packages\EPiServer.Logging.Log4Net.2.1.0\lib\net45\EPiServer.Logging.Log4Net.dll + + ..\..\packages\EPiServer.Personalization.Common.1.0.0\lib\net45\EPiServer.Personalization.Common.dll + ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.Shell.dll ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.Shell.UI.dll + + ..\..\packages\EPiServer.Tracking.Core.1.1.0\lib\net452\EPiServer.Tracking.Core.dll + ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.UI.dll @@ -187,6 +193,7 @@ + @@ -262,8 +269,6 @@ - - @@ -357,87 +362,87 @@ --> - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Business.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Business.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Commerce.Internal.Migration.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Commerce.Internal.Migration.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.Data.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.Data.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Marketing.Validators.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Marketing.Validators.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Payment.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Payment.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Website.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Website.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Workflow.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Workflow.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.DataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.DataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.FileUploader.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.FileUploader.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.MetaDataPlus.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.MetaDataPlus.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.Extensions.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.Extensions.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.LuceneSearchProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.LuceneSearchProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.SqlDataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.SqlDataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.WebConsoleLib.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.WebConsoleLib.dll True - - ..\..\packages\EPiServer.Recommendations.1.3.16\lib\net452\EPiServer.Recommendations.dll + + ..\..\packages\EPiServer.Tracking.Commerce.1.0.0\lib\net452\EPiServer.Tracking.Commerce.dll True - - ..\..\packages\EPiServer.Recommendations.Commerce.11.2.6\lib\net452\EPiServer.Recommendations.Commerce.dll + + ..\..\packages\EPiServer.Personalization.Commerce.1.0.0\lib\net452\EPiServer.Personalization.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\AjaxControlToolkit.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\AjaxControlToolkit.dll True diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/BundleControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/BundleControllerTests.cs index 360ead09..d6f8d6ef 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/BundleControllerTests.cs +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/BundleControllerTests.cs @@ -1,13 +1,13 @@ -using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; -using EPiServer.Commerce.Catalog.ContentTypes; +using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Reference.Commerce.Site.Features.Product.Controllers; using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModels; using Moq; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; using Xunit; namespace EPiServer.Reference.Commerce.Site.Tests.Features.Product.Controllers diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/PackageControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/PackageControllerTests.cs index f7f1552f..229f7b50 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/PackageControllerTests.cs +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/PackageControllerTests.cs @@ -1,13 +1,13 @@ -using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; -using EPiServer.Commerce.Catalog.ContentTypes; +using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Reference.Commerce.Site.Features.Product.Controllers; using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModels; using Moq; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; using Xunit; namespace EPiServer.Reference.Commerce.Site.Tests.Features.Product.Controllers diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/ProductControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/ProductControllerTests.cs index 8174b162..52865419 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/ProductControllerTests.cs +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Product/Controllers/ProductControllerTests.cs @@ -1,5 +1,4 @@ using EPiServer.Core; -using EPiServer.Recommendations.Tracking; using EPiServer.Reference.Commerce.Site.Features.Product.Controllers; using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; @@ -11,6 +10,7 @@ using System.Web; using System.Web.Mvc; using System.Web.Routing; +using EPiServer.Tracking.Commerce.Data; using Xunit; namespace EPiServer.Reference.Commerce.Site.Tests.Features.Product.Controllers @@ -18,19 +18,19 @@ namespace EPiServer.Reference.Commerce.Site.Tests.Features.Product.Controllers public class ProductControllerTests : IDisposable { [Fact] - public void Index_ShouldReturnCorrectTypes() + public async void Index_ShouldReturnCorrectTypes() { _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = new FashionVariant() }); - var result = CreateController().Index(new FashionProduct(), "code"); + var result = await CreateController().Index(new FashionProduct(), "code"); Assert.IsAssignableFrom(typeof(ViewResultBase), result); Assert.IsType(typeof(FashionProductViewModel), (result as ViewResultBase).Model); } [Fact] - public void Index_WhenIsInEditModeAndHasNoVariation_ShouldReturnProductWithoutVariationView() + public async void Index_WhenIsInEditModeAndHasNoVariation_ShouldReturnProductWithoutVariationView() { _isInEditMode = true; var fashionProduct = new FashionProduct(); @@ -38,7 +38,7 @@ public void Index_WhenIsInEditModeAndHasNoVariation_ShouldReturnProductWithoutVa _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = null, Product = fashionProduct }); - var actionResult = CreateController().Index(fashionProduct, "notexist"); + var actionResult = await CreateController().Index(fashionProduct, "notexist"); var viewModel = (FashionProductViewModel)((ViewResultBase)actionResult).Model; @@ -47,63 +47,55 @@ public void Index_WhenIsInEditModeAndHasNoVariation_ShouldReturnProductWithoutVa } [Fact] - public void Index_WhenSkipTrackingIsTrue_ShouldNotSendTracking() + public async void Index_WhenSkipTrackingIsTrue_ShouldNotSendTracking() { var fashionProduct = new FashionProduct(); _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = new FashionVariant(), Product = fashionProduct }); - _recommendationServiceMock.Setup(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny())).Verifiable(); + await CreateController().Index(fashionProduct, "notexist", false, true); - CreateController().Index(fashionProduct, "notexist", false, true); - - _recommendationServiceMock.Verify(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny()), Times.Never); + _recommendationServiceMock.Verify(x => x.TrackProduct(It.IsAny(), It.IsAny(), It.IsAny()), Times.Never); } [Fact] - public void Index_WhenQuickViewIsTrue_And_SkipTrackingIsFalse_ShouldSendTrackingWithoutRetrieveRecommendations() + public async void Index_WhenQuickViewIsTrue_And_SkipTrackingIsFalse_ShouldSendTrackingWithoutRetrieveRecommendations() { var fashionProduct = new FashionProduct(); _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = new FashionVariant(), Product = fashionProduct }); - _recommendationServiceMock.Setup(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny())).Verifiable(); - - CreateController().Index(fashionProduct, "notexist", true, false); + await CreateController().Index(fashionProduct, "notexist", true, false); - _recommendationServiceMock.Verify(x => x.SendProductTracking(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Disabled), Times.Once); + _recommendationServiceMock.Verify(x => x.TrackProduct(It.IsAny(), It.IsAny(), true), Times.Once); } [Fact] - public void Index_WhenQuickViewIsTrue_And_SkipTrackingIsTrue_ShouldNotSendTracking() + public async void Index_WhenQuickViewIsTrue_And_SkipTrackingIsTrue_ShouldNotSendTracking() { var fashionProduct = new FashionProduct(); _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = new FashionVariant(), Product = fashionProduct }); - _recommendationServiceMock.Setup(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny())).Verifiable(); + await CreateController().Index(fashionProduct, "notexist", true, true); - CreateController().Index(fashionProduct, "notexist", true, true); - - _recommendationServiceMock.Verify(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny()), Times.Never); + _recommendationServiceMock.Verify(x => x.TrackProduct(It.IsAny(), It.IsAny(), It.IsAny()), Times.Never); } [Fact] - public void Index_WhenQuickViewIsFalse_ShouldSendTrackingWithRetrieveRecommendations() + public async void Index_WhenQuickViewIsFalse_ShouldSendTrackingWithRetrieveRecommendations() { var fashionProduct = new FashionProduct(); _viewModelFactoryMock.Setup(x => x.Create(It.IsAny(), It.IsAny())) .Returns(new FashionProductViewModel { Variant = new FashionVariant(), Product = fashionProduct }); - _recommendationServiceMock.Setup(x => x.SendProductTracking(It.IsAny(), It.IsAny(), It.IsAny())).Verifiable(); - - CreateController().Index(fashionProduct, "notexist", false, false); + await CreateController().Index(fashionProduct, "notexist", false, false); - _recommendationServiceMock.Verify(x => x.SendProductTracking(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Once); + _recommendationServiceMock.Verify(x => x.TrackProduct(It.IsAny(), It.IsAny(), false), Times.Once); } [Fact] @@ -162,6 +154,9 @@ public ProductControllerTests() _viewModelFactoryMock = new Mock(null, null, null, null); _recommendationServiceMock = new Mock(); + _recommendationServiceMock + .Setup(m => m.TrackProduct(It.IsAny(), It.IsAny(), It.IsAny())) + .ReturnsAsync((TrackingResponseData) null); _referenceConverterMock = new Mock(null, null); _referenceConverterMock.Setup(x => x.GetContentLink(It.IsAny())) diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Controllers/RecommendationsControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Controllers/RecommendationsControllerTests.cs deleted file mode 100644 index 649209d6..00000000 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Controllers/RecommendationsControllerTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Reference.Commerce.Site.Features.Product.ViewModels; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.Controllers; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels; -using Moq; -using System.Collections.Generic; -using System.Linq; -using System.Web.Mvc; -using Xunit; - -namespace EPiServer.Reference.Commerce.Site.Tests.Features.Recommendations.Controllers -{ - public class RecommendationsControllerTests - { - [Fact] - public void Index_WhenThereAreNoEntryLinks_ShouldReturnEmptyResult() - { - var result = _subject.Index(Enumerable.Empty()); - - Assert.Equal(typeof(EmptyResult), result.GetType()); - } - - [Fact] - public void Index_WhenThereAreMultipleEntryLinks_ShouldCreateProductViewModelForEach() - { - var recommendations = new Recommendation[] { - new Recommendation(123, new ContentReference(1337)), - new Recommendation(456, new ContentReference(1338)) - }; - - _recommendationServiceMock - .Setup(mock => mock.GetRecommendedProductTileViewModels(It.IsAny>())) - .Returns(recommendations.Select(item => new RecommendedProductTileViewModel(item.RecommendationId, new ProductTileViewModel()))); - - var result = (PartialViewResult)_subject.Index(recommendations); - - Assert.Equal(recommendations.Length, ((RecommendationsViewModel)result.Model).Products.Count()); - } - - private readonly Mock _recommendationServiceMock; - private readonly RecommendationsController _subject; - - public RecommendationsControllerTests() - { - _recommendationServiceMock = new Mock(); - _subject = new RecommendationsController(_recommendationServiceMock.Object); - } - } -} \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Services/RecommendationServiceTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Services/RecommendationServiceTests.cs deleted file mode 100644 index d1ea54f2..00000000 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Recommendations/Services/RecommendationServiceTests.cs +++ /dev/null @@ -1,105 +0,0 @@ -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; -using EPiServer.Recommendations.Tracking.Data; -using EPiServer.Reference.Commerce.Site.Features.Product.Services; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; -using EPiServer.Web; -using Moq; -using System.Linq; -using System.Web; -using Xunit; - -namespace EPiServer.Reference.Commerce.Site.Tests.Features.Recommendations.Services -{ - public class RecommendationServiceTests - { - [Fact] - public void SendProductTracking_WhenInViewMode_ShouldCallTrackingService() - { - _subject.SendProductTracking(Mock.Of(), "productcode", RetrieveRecommendationMode.Enabled); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Once); - } - - [Fact] - public void SendProductTracking_WhenInEditMode_ShouldNotCallTrackingService() - { - _contextModeResolverMock.SetupGet(x => x.CurrentMode).Returns(ContextMode.Edit); - _subject.SendProductTracking(Mock.Of(), "productcode", RetrieveRecommendationMode.Enabled); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Never); - } - - [Fact] - public void SendSearchTracking_WhenSearchQueryInViewMode_ShouldCallTrackingService() - { - _subject.SendSearchTracking(Mock.Of(), "test", Enumerable.Empty()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Once); - } - - [Fact] - public void SendSearchTracking_WhenSearchQueryInEditMode_ShouldNotCallTrackingService() - { - _contextModeResolverMock.SetupGet(x => x.CurrentMode).Returns(ContextMode.Edit); - _subject.SendSearchTracking(Mock.Of(), "test", Enumerable.Empty()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Never); - } - - [Fact] - public void SendSearchTracking_WhenNoSearchQuery_ShouldNotCallTrackingService() - { - _subject.SendSearchTracking(Mock.Of(), "", Enumerable.Empty()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Never); - } - - [Fact] - public void SendCheckoutTrackingData_WhenInViewMode_ShouldCallTrackingService() - { - _subject.SendCheckoutTrackingData(Mock.Of()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Once); - } - - [Fact] - public void SendCheckoutTrackingData_WhenInEditMode_ShouldNotCallTrackingService() - { - _contextModeResolverMock.SetupGet(x => x.CurrentMode).Returns(ContextMode.Edit); - _subject.SendCheckoutTrackingData(Mock.Of()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Enabled), Times.Never); - } - - [Fact] - public void SendCartTrackingData_WhenInViewMode_ShouldCallTrackingServiceWithoutRetrieveRecommendations() - { - _subject.SendCartTrackingData(Mock.Of()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Disabled), Times.Once); - } - - [Fact] - public void SendCartTrackingData_WhenInEditMode_ShouldNotCallTrackingService() - { - _contextModeResolverMock.SetupGet(x => x.CurrentMode).Returns(ContextMode.Edit); - _subject.SendCartTrackingData(Mock.Of()); - _trackingServiceMock.Verify(x => x.Send(It.IsAny(), It.IsAny(), RetrieveRecommendationMode.Disabled), Times.Never); - } - - private readonly RecommendationService _subject; - - private readonly Mock _trackingServiceMock; - private readonly Mock _trackingDataFactoryMock; - private readonly Mock _productServiceMock; - private readonly Mock _contextModeResolverMock; - - public RecommendationServiceTests() - { - _trackingServiceMock = new Mock(); - _trackingDataFactoryMock = new Mock(null, null, null, null, null, null, null, null, null, null); - _productServiceMock = new Mock(); - _contextModeResolverMock = new Mock(); - _contextModeResolverMock.SetupGet(x => x.CurrentMode).Returns(ContextMode.Default); - - _subject = new RecommendationService( - _trackingServiceMock.Object, - _trackingDataFactoryMock.Object, - _productServiceMock.Object, - _contextModeResolverMock.Object); - } - } -} diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/CategoryControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/CategoryControllerTests.cs index 6ebf415d..0e20e32d 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/CategoryControllerTests.cs +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/CategoryControllerTests.cs @@ -16,10 +16,10 @@ namespace EPiServer.Reference.Commerce.Site.Tests.Features.Search.Controllers public class CategoryControllerTests { [Fact] - public void Index_ShouldReturnViewResult() + public async void Index_ShouldReturnViewResult() { // Act - var result = _subject.Index(null, null); + var result = await _subject.Index(null, null); // Assert Assert.IsType(typeof(ViewResult), result); @@ -36,26 +36,26 @@ public void Facet_ShouldReturnPartialView() } [Fact] - public void Index_WhenPassingFashionNode_ShouldPassItOnToFactory() + public async void Index_WhenPassingFashionNode_ShouldPassItOnToFactory() { // Arrange var fashionNode = new FashionNode(); // Act - _subject.Index(fashionNode, null); + await _subject.Index(fashionNode, null); // Assert _viewModelFactoryMock.Verify(v => v.Create(fashionNode, It.IsAny())); } [Fact] - public void Index_WhenPassingFormModel_ShouldPassItOnToFactory() + public async void Index_WhenPassingFormModel_ShouldPassItOnToFactory() { // Arrange var formModel = new FilterOptionViewModel(); // Act - _subject.Index(null, formModel); + await _subject.Index(null, formModel); // Assert _viewModelFactoryMock.Verify(v => v.Create(It.IsAny(), formModel)); diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/SearchControllerTests.cs b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/SearchControllerTests.cs index 01312806..10199086 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/SearchControllerTests.cs +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/Features/Search/Controllers/SearchControllerTests.cs @@ -1,5 +1,5 @@ using EPiServer.Core; -using EPiServer.Recommendations.Tracking.Data; +using EPiServer.Tracking.Commerce.Data; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModels; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Features.Search.Controllers; @@ -23,18 +23,18 @@ namespace EPiServer.Reference.Commerce.Site.Tests.Features.Search.Controllers public class SearchControllerTests { [Fact] - public void Index_ShouldReturnViewModel() + public async void Index_ShouldReturnViewModel() { - var result = ((ViewResult)_subject.Index(new SearchPage(), new FilterOptionViewModel())).Model as SearchViewModel; + var result = ((ViewResult) await _subject.Index(new SearchPage(), new FilterOptionViewModel())).Model as SearchViewModel; result.ShouldBeEquivalentTo(_searchViewModel); } [Fact] - public void Index_WhenBrowsingFirstResultPage_ShouldSendSearchTracking() + public async void Index_WhenBrowsingFirstResultPage_ShouldSendSearchTracking() { - _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); + await _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); _recommendationServiceMock.Verify( - x => x.SendSearchTracking( + x => x.TrackSearch( It.IsAny(), It.IsAny(), It.Is>(y => y.Single() == _searchViewModel.ProductViewModels.Single().Code) @@ -43,19 +43,19 @@ public void Index_WhenBrowsingFirstResultPage_ShouldSendSearchTracking() } [Fact] - public void Index_WhenBrowsingFirstResultPage_ShouldSetHttpContextVariable() + public async void Index_WhenBrowsingFirstResultPage_ShouldSetHttpContextVariable() { - _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); + await _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); Assert.Equal(1, _httpContextMock.Object.Items.Count); Assert.True(_httpContextMock.Object.Items.Contains(SearchTrackingData.TotalSearchResultsKey)); } [Fact] - public void Index_WhenBrowsingNextResultPage_ShouldNotSendSearchTracking() + public async void Index_WhenBrowsingNextResultPage_ShouldNotSendSearchTracking() { - _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 2 }); + await _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 2 }); _recommendationServiceMock.Verify( - x => x.SendSearchTracking( + x => x.TrackSearch( It.IsAny(), It.IsAny(), It.IsAny>() @@ -64,13 +64,13 @@ public void Index_WhenBrowsingNextResultPage_ShouldNotSendSearchTracking() } [Fact] - public void Index_WhenUsingFacetFiltersInFirstResultPage_ShouldNotSendSearchTracking() + public async void Index_WhenUsingFacetFiltersInFirstResultPage_ShouldNotSendSearchTracking() { _httpRequestMock.SetupGet(x => x.HttpMethod).Returns("POST"); - _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); + await _subject.Index(new SearchPage(), new FilterOptionViewModel() { Page = 1 }); _recommendationServiceMock.Verify( - x => x.SendSearchTracking( + x => x.TrackSearch( It.IsAny(), It.IsAny(), It.IsAny>() @@ -99,7 +99,7 @@ public void QuickSearch_WhenSearch_ShouldNotSendSearchTracking() { var result = ((ViewResult)_subject.QuickSearch("test")).Model as ProductTileViewModel[]; _recommendationServiceMock.Verify( - x => x.SendSearchTracking( + x => x.TrackSearch( It.IsAny(), It.IsAny(), It.IsAny>()), @@ -146,10 +146,6 @@ public SearchControllerTests() } }); - _recommendationServiceMock - .Setup(x => x.SendSearchTracking(It.IsAny(), It.IsAny(), It.IsAny>())) - .Returns(() => GetTestResponseData()); - _referenceConverterMock .Setup(x => x.GetContentLink(It.IsAny())) .Returns(contentLink); diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/app.config b/Sources/EPiServer.Reference.Commerce.Site.Tests/app.config index 85f2ee31..c7cb5835 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/app.config +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/app.config @@ -142,6 +142,10 @@ + + + + diff --git a/Sources/EPiServer.Reference.Commerce.Site.Tests/packages.config b/Sources/EPiServer.Reference.Commerce.Site.Tests/packages.config index b8c12073..9f5facce 100644 --- a/Sources/EPiServer.Reference.Commerce.Site.Tests/packages.config +++ b/Sources/EPiServer.Reference.Commerce.Site.Tests/packages.config @@ -9,6 +9,8 @@ + + @@ -41,7 +43,7 @@ - - - + + + diff --git a/Sources/EPiServer.Reference.Commerce.Site/App_Code/Functions.cshtml b/Sources/EPiServer.Reference.Commerce.Site/App_Code/Functions.cshtml new file mode 100644 index 00000000..4a7c6a23 --- /dev/null +++ b/Sources/EPiServer.Reference.Commerce.Site/App_Code/Functions.cshtml @@ -0,0 +1,13 @@ +@using EPiServer.ServiceLocation +@using EPiServer.Personalization.Commerce +@functions +{ + + private static readonly Injected _personalizationClientConfiguration = + default(Injected); + + public static bool UseClientSideTracking() + { + return _personalizationClientConfiguration.Service.TrackingMode == TrackingMode.ClientSide; + } +} \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/App_Code/Helpers.cshtml b/Sources/EPiServer.Reference.Commerce.Site/App_Code/Helpers.cshtml index eb665960..664a9696 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/App_Code/Helpers.cshtml +++ b/Sources/EPiServer.Reference.Commerce.Site/App_Code/Helpers.cshtml @@ -7,10 +7,13 @@ @using Mediachase.Commerce @using EPiServer.ServiceLocation @using Mediachase.Commerce.Markets +@using EPiServer.Reference.Commerce.Site.Features.Market.Services @using EPiServer.Reference.Commerce.Site.Features.Shared.Extensions -@using EPiServer.Core; +@using EPiServer.Core +@using EPiServer.Shell.Web.Mvc.Html @using EPiServer.Web.Routing - +@using Newtonsoft.Json +@using Newtonsoft.Json.Serialization @functions { private static WebViewPage page { get { return PageContext.Page as WebViewPage; } } @@ -36,6 +39,45 @@ var languages = allMarkets.SelectMany(x => x.Languages).Distinct(); return languages.Select(l => l.Name); } + + private static string GetLocaleSettings() + { + var currencyService = ServiceLocator.Current.GetInstance(); + var currencyCultureMappings = new Dictionary(); + currencyCultureMappings.Add("AUD", "en-AU"); + currencyCultureMappings.Add("BRL", "pt-BR"); + currencyCultureMappings.Add("CAD", "en-CA"); + currencyCultureMappings.Add("CLP", "arn-CL"); + currencyCultureMappings.Add("EUR", "de-DE"); + currencyCultureMappings.Add("JPY", "ja-JP"); + currencyCultureMappings.Add("NOK", "se-NO"); + currencyCultureMappings.Add("SAR", "ar-SA"); + currencyCultureMappings.Add("SEK", "sv-SE"); + currencyCultureMappings.Add("GBP", "en-GB"); + currencyCultureMappings.Add("USD", "en-US"); + + var currency = currencyService.GetCurrentCurrency(); + var localeSettings = new + { + culture = currencyCultureMappings[currency.CurrencyCode], + currencyCode = currency.CurrencyCode, + currencyDigits = currency.Format.CurrencyDecimalDigits, + currencySymbol = currency.Format.CurrencySymbol, + notAvailable = page.Html.Translate("/Product/NotAvailable") + }; + + return "localeSettings: " + Serialize(localeSettings); + } + + private static string Serialize(object obj) + { + return JsonConvert.SerializeObject(obj, SerializerSettings); + } + + private static readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + ContractResolver = new CamelCasePropertyNamesContractResolver() + }; } @helper RenderHrefLangs(ContentReference requestContentLink, string defaultLanguage) @@ -52,6 +94,14 @@ @page.Html.Raw(CreateAlternateLinkWithHrefLang(GetAbsoluteUrl(requestContentLink, defaultLanguage), "x-default")); } +@helper RenderContextSettings() +{ + var contextSettingsSection = page.RenderSection("RecommendationsContextSettings", false); + var settings = contextSettingsSection == null ? null : contextSettingsSection.ToString().Trim(); + var contextSettings = "{" + string.Join(",", (new[] { settings, GetLocaleSettings() }).Where(x => !string.IsNullOrEmpty(x))) + "}"; + @page.Html.Raw(contextSettings) +} + @helper RenderMoney(decimal amount, Currency currency) { Money money = new Money(amount, currency); @@ -60,9 +110,9 @@ @helper RenderMoney(Money money) { - - @page.Html.Raw(money.ToString().Replace(money.Currency.Format.CurrencySymbol, @"" + money.Currency.Format.CurrencySymbol + "")) - + + @page.Html.Raw(money.ToString().Replace(money.Currency.Format.CurrencySymbol, @"" + money.Currency.Format.CurrencySymbol + "")) + } @helper RenderSize(EntryContentBase content) @@ -80,9 +130,9 @@ var variant = cartItem.Entry as FashionVariant; if (variant != null) { - - @page.Html.Hidden("size", variant.Size.Trim()) - @page.Html.DropDownList("newSize", new SelectList(cartItem.AvailableSizes, variant.Size), new { @class = "form-control cart-control jsChangeCartItem" }) - + + @page.Html.Hidden("size", variant.Size.Trim()) + @page.Html.DropDownList("newSize", new SelectList(cartItem.AvailableSizes, variant.Size), new { @class = "form-control cart-control jsChangeCartItem" }) + } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj b/Sources/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj index 8b7156cc..5fc434bb 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj +++ b/Sources/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj @@ -112,12 +112,18 @@ ..\..\packages\EPiServer.Packaging.UI.3.3.0\lib\net45\EPiServer.Packaging.UI.dll + + ..\..\packages\EPiServer.Personalization.Common.1.0.0\lib\net45\EPiServer.Personalization.Common.dll + ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.Shell.dll ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.Shell.UI.dll + + ..\..\packages\EPiServer.Tracking.Core.1.1.0\lib\net452\EPiServer.Tracking.Core.dll + ..\..\packages\EPiServer.CMS.UI.Core.10.10.6\lib\net45\EPiServer.UI.dll @@ -187,6 +193,7 @@ ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + True ..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll @@ -291,6 +298,7 @@ + @@ -357,14 +365,14 @@ + + + - - - + - @@ -716,7 +724,6 @@ - @@ -733,6 +740,9 @@ + + + Web.config @@ -943,103 +953,99 @@ - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Business.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Business.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\EPiServer.Commerce.Internal.Migration.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\EPiServer.Commerce.Internal.Migration.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.BusinessFoundation.Data.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.BusinessFoundation.Data.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Marketing.Validators.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Marketing.Validators.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Payment.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Payment.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Plugins.Shipping.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Website.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Website.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Commerce.Workflow.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Commerce.Workflow.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.DataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.DataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.FileUploader.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.FileUploader.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.MetaDataPlus.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.MetaDataPlus.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.Extensions.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.Extensions.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.Search.LuceneSearchProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.Search.LuceneSearchProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.SqlDataProvider.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.SqlDataProvider.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\Mediachase.WebConsoleLib.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\Mediachase.WebConsoleLib.dll True - ..\..\packages\EPiServer.Commerce.UI.11.2.6\lib\net452\EPiServer.Commerce.Shell.dll + ..\..\packages\EPiServer.Commerce.UI.11.3.0\lib\net452\EPiServer.Commerce.Shell.dll True - ..\..\packages\EPiServer.Commerce.UI.ManagerIntegration.11.2.6\lib\net452\EPiServer.Commerce.Shell.ManagerIntegration.dll + ..\..\packages\EPiServer.Commerce.UI.ManagerIntegration.11.3.0\lib\net452\EPiServer.Commerce.Shell.ManagerIntegration.dll True - ..\..\packages\EPiServer.Commerce.UI.11.2.6\lib\net452\EPiServer.Commerce.UI.dll - True - - - ..\..\packages\EPiServer.Recommendations.1.3.16\lib\net452\EPiServer.Recommendations.dll + ..\..\packages\EPiServer.Commerce.UI.11.3.0\lib\net452\EPiServer.Commerce.UI.dll True - - ..\..\packages\EPiServer.Recommendations.Commerce.11.2.6\lib\net452\EPiServer.Recommendations.Commerce.dll + + ..\..\packages\EPiServer.Tracking.Commerce.1.0.0\lib\net452\EPiServer.Tracking.Commerce.dll True - - ..\..\packages\EPiServer.Recommendations.Commerce.11.2.6\lib\net452\EPiServer.ProfileStore.Tracking.dll + + ..\..\packages\EPiServer.Personalization.Commerce.1.0.0\lib\net452\EPiServer.Personalization.Commerce.dll True - ..\..\packages\EPiServer.Commerce.Core.11.2.6\lib\net452\AjaxControlToolkit.dll + ..\..\packages\EPiServer.Commerce.Core.11.3.0\lib\net452\AjaxControlToolkit.dll True diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/CartController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/CartController.cs index d92ba26c..4da8f978 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/CartController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/CartController.cs @@ -1,3 +1,4 @@ +using System.Threading.Tasks; using EPiServer.Commerce.Order; using EPiServer.Reference.Commerce.Site.Features.Cart.Services; using EPiServer.Reference.Commerce.Site.Features.Cart.ViewModelFactories; @@ -44,7 +45,7 @@ public ActionResult LargeCart() [HttpPost] [AllowDBWrite] - public ActionResult AddToCart(string code) + public async Task AddToCart(string code) { string warningMessage = string.Empty; @@ -59,7 +60,7 @@ public ActionResult AddToCart(string code) if (result.EntriesAddedToCart) { _orderRepository.Save(Cart); - _recommendationService.SendCartTrackingData(HttpContext); + await _recommendationService.TrackCart(HttpContext); return MiniCartDetails(); } @@ -68,13 +69,13 @@ public ActionResult AddToCart(string code) [HttpPost] [AllowDBWrite] - public ActionResult ChangeCartItem(int shipmentId, string code, decimal quantity, string size, string newSize) + public async Task ChangeCartItem(int shipmentId, string code, decimal quantity, string size, string newSize) { ModelState.Clear(); _cartService.ChangeCartItem(Cart, shipmentId, code, quantity, size, newSize); _orderRepository.Save(Cart); - _recommendationService.SendCartTrackingData(HttpContext); + await _recommendationService.TrackCart(HttpContext); return MiniCartDetails(); } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/WishListController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/WishListController.cs index 15fd99e5..82cff76e 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/WishListController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Controllers/WishListController.cs @@ -1,16 +1,16 @@ using EPiServer.Commerce.Order; using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; using EPiServer.Reference.Commerce.Site.Features.Cart.Pages; using EPiServer.Reference.Commerce.Site.Features.Cart.Services; using EPiServer.Reference.Commerce.Site.Features.Cart.ViewModelFactories; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Features.Start.Pages; using EPiServer.Reference.Commerce.Site.Infrastructure.Attributes; +using EPiServer.Tracking.Commerce; using EPiServer.Web.Mvc; using System; using System.Linq; +using System.Threading.Tasks; using System.Web.Mvc; namespace EPiServer.Reference.Commerce.Site.Features.Cart.Controllers @@ -40,7 +40,7 @@ public WishListController( } [HttpGet] - [Tracking(TrackingType.Wishlist)] + [CommerceTracking(TrackingType.Wishlist)] public ActionResult Index(WishListPage currentPage) { var viewModel = _cartViewModelFactory.CreateWishListViewModel(WishList); @@ -58,7 +58,7 @@ public ActionResult WishListMiniCartDetails() [HttpPost] [AllowDBWrite] - public ActionResult AddToCart(string code) + public async Task AddToCart(string code) { ModelState.Clear(); @@ -76,7 +76,7 @@ public ActionResult AddToCart(string code) if (result.EntriesAddedToCart) { _orderRepository.Save(WishList); - _recommendationService.SendWishListTrackingData(HttpContext); + await _recommendationService.TrackWishlist(HttpContext); return WishListMiniCartDetails(); } @@ -85,13 +85,13 @@ public ActionResult AddToCart(string code) [HttpPost] [AllowDBWrite] - public ActionResult ChangeCartItem(string code, decimal quantity, string size, string newSize) + public async Task ChangeCartItem(string code, decimal quantity, string size, string newSize) { ModelState.Clear(); _cartService.ChangeCartItem(WishList, 0, code, quantity, size, newSize); _orderRepository.Save(WishList); - _recommendationService.SendWishListTrackingData(HttpContext); + await _recommendationService.TrackWishlist(HttpContext); return WishListMiniCartDetails(); } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/CartService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/CartService.cs index c57512a2..147def5d 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/CartService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/CartService.cs @@ -251,10 +251,11 @@ public Dictionary> ValidateCart(ICart cart) cart.UpdatePlacedPriceOrRemoveLineItems(_customerContext.GetContactById(cart.CustomerId), (item, issue) => validationIssues.AddValidationIssues(item, issue), _placedPriceProcessor); cart.UpdateInventoryOrRemoveLineItems((item, issue) => validationIssues.AddValidationIssues(item, issue), _inventoryProcessor); - cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings()); + ApplyDiscounts(cart); // Try to validate gift items inventory and don't catch validation issues. - cart.UpdateInventoryOrRemoveLineItems((item, issue) => { + cart.UpdateInventoryOrRemoveLineItems((item, issue) => + { if (!item.IsGift) { validationIssues.AddValidationIssues(item, issue); @@ -312,7 +313,7 @@ public bool AddCouponCode(ICart cart, string couponCode) return false; } couponCodes.Add(couponCode); - var rewardDescriptions = cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings()); + var rewardDescriptions = ApplyDiscounts(cart); var appliedCoupons = rewardDescriptions .Where(r => r.AppliedCoupon != null) .Select(r => r.AppliedCoupon); @@ -328,7 +329,12 @@ public bool AddCouponCode(ICart cart, string couponCode) public void RemoveCouponCode(ICart cart, string couponCode) { cart.GetFirstForm().CouponCodes.Remove(couponCode); - cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings()); + ApplyDiscounts(cart); + } + + public IEnumerable ApplyDiscounts(ICart cart) + { + return cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings()); } private void RemoveLineItem(ICart cart, int shipmentId, string code) diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/ICartService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/ICartService.cs index a74c1d71..e8c7ec01 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/ICartService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Cart/Services/ICartService.cs @@ -1,8 +1,9 @@ +using EPiServer.Commerce.Marketing; using EPiServer.Commerce.Order; +using EPiServer.Reference.Commerce.Site.Features.Cart.ViewModels; using EPiServer.Reference.Commerce.Site.Features.Shared.Models; using Mediachase.Commerce; using System.Collections.Generic; -using EPiServer.Reference.Commerce.Site.Features.Cart.ViewModels; namespace EPiServer.Reference.Commerce.Site.Features.Cart.Services { @@ -21,5 +22,6 @@ public interface ICartService void RemoveCouponCode(ICart cart, string couponCode); void RecreateLineItemsBasedOnShipments(ICart cart, IEnumerable cartItems, IEnumerable addresses); void MergeShipments(ICart cart); + IEnumerable ApplyDiscounts(ICart cart); } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/CheckoutController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/CheckoutController.cs index a46bcd1c..b9929e2b 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/CheckoutController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/CheckoutController.cs @@ -1,7 +1,5 @@ using EPiServer.Commerce.Order; using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; using EPiServer.Reference.Commerce.Site.Features.Cart.Services; using EPiServer.Reference.Commerce.Site.Features.Checkout.Pages; using EPiServer.Reference.Commerce.Site.Features.Checkout.Services; @@ -15,6 +13,7 @@ using EPiServer.Web.Mvc.Html; using EPiServer.Web.Routing; using System.Linq; +using System.Threading.Tasks; using System.Web.Mvc; namespace EPiServer.Reference.Commerce.Site.Features.Checkout.Controllers @@ -53,7 +52,7 @@ public CheckoutController( [HttpGet] [OutputCache(Duration = 0, NoStore = true)] - public ActionResult Index(CheckoutPage currentPage) + public async Task Index(CheckoutPage currentPage) { if (CartIsNullOrEmpty()) { @@ -67,10 +66,10 @@ public ActionResult Index(CheckoutPage currentPage) _checkoutService.UpdateShippingAddresses(Cart, viewModel); _checkoutService.UpdateShippingMethods(Cart, viewModel.Shipments); - _checkoutService.ApplyDiscounts(Cart); + _cartService.ApplyDiscounts(Cart); _orderRepository.Save(Cart); - _recommendationService.SendCheckoutTrackingData(HttpContext); + await _recommendationService.TrackCheckout(HttpContext); _checkoutService.ProcessPaymentCancel(viewModel, TempData, ControllerContext); @@ -96,7 +95,7 @@ public ActionResult Update(CheckoutPage currentPage, UpdateShippingMethodViewMod ModelState.Clear(); _checkoutService.UpdateShippingMethods(Cart, shipmentViewModel.Shipments); - _checkoutService.ApplyDiscounts(Cart); + _cartService.ApplyDiscounts(Cart); _orderRepository.Save(Cart); var viewModel = CreateCheckoutViewModel(currentPage, paymentOption); diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/OrderConfirmationController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/OrderConfirmationController.cs index 45d22316..2d1c4e56 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/OrderConfirmationController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Controllers/OrderConfirmationController.cs @@ -1,4 +1,5 @@ -using EPiServer.Commerce.Order; +using System.Threading.Tasks; +using EPiServer.Commerce.Order; using EPiServer.Core; using EPiServer.Editor; using EPiServer.Reference.Commerce.Site.Features.AddressBook.Services; @@ -27,7 +28,7 @@ public OrderConfirmationController( } [HttpGet] - public ActionResult Index(OrderConfirmationPage currentPage, string notificationMessage, int? orderNumber) + public async Task Index(OrderConfirmationPage currentPage, string notificationMessage, int? orderNumber) { IPurchaseOrder order = null; if (PageEditing.PageIsInEditMode) @@ -40,7 +41,7 @@ public ActionResult Index(OrderConfirmationPage currentPage, string notification if (order != null) { - _recommendationService.SendOrderTracking(HttpContext, order); + await _recommendationService.TrackOrder(HttpContext, order); } } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/CheckoutService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/CheckoutService.cs index dd4eb2fd..4ced06ea 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/CheckoutService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/CheckoutService.cs @@ -97,11 +97,6 @@ public virtual void UpdateShippingAddresses(ICart cart, CheckoutViewModel viewMo } } - public virtual void ApplyDiscounts(ICart cart) - { - cart.ApplyDiscounts(_promotionEngine, new PromotionEngineSettings()); - } - public virtual void CreateAndAddPaymentToCart(ICart cart, CheckoutViewModel viewModel) { // Clean up payments in cart on payment provider site. diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/ShippingMethodInfo.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/ShippingMethodInfo.cs deleted file mode 100644 index e9881f7e..00000000 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Checkout/Services/ShippingMethodInfo.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace EPiServer.Reference.Commerce.Site.Features.Checkout.Services -{ - public class ShippingMethodInfo - { - public Guid MethodId { get; set; } - - public string ClassName { get; set; } - - public string LanguageId { get; set; } - - public string Currency { get; set; } - - public int Ordering { get; set; } - } -} \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/BundleController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/BundleController.cs index 42054342..d3db7861 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/BundleController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/BundleController.cs @@ -1,10 +1,9 @@ using EPiServer.Commerce.Catalog.ContentTypes; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Infrastructure.Facades; +using EPiServer.Tracking.Commerce; using EPiServer.Web.Mvc; using System.Linq; using System.Web.Mvc; @@ -23,7 +22,7 @@ public BundleController(IsInEditModeAccessor isInEditModeAccessor, CatalogEntryV } [HttpGet] - [Tracking(TrackingType.Product)] + [CommerceTracking(TrackingType.Product)] public ActionResult Index(FashionBundle currentContent, bool useQuickview = false) { var viewModel = _viewModelFactory.Create(currentContent); @@ -41,6 +40,7 @@ public ActionResult Index(FashionBundle currentContent, bool useQuickview = fals viewModel.AlternativeProducts = this.GetAlternativeProductsRecommendations().Take(3); viewModel.CrossSellProducts = this.GetCrossSellProductsRecommendations(); + return Request.IsAjaxRequest() ? PartialView(viewModel) : (ActionResult)View(viewModel); } } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/PackageController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/PackageController.cs index d7d31750..98c41fea 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/PackageController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/PackageController.cs @@ -1,9 +1,8 @@ -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; -using EPiServer.Reference.Commerce.Site.Features.Product.Models; +using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Infrastructure.Facades; +using EPiServer.Tracking.Commerce; using EPiServer.Web.Mvc; using System.Linq; using System.Web.Mvc; @@ -22,7 +21,7 @@ public PackageController(IsInEditModeAccessor isInEditModeAccessor, CatalogEntry } [HttpGet] - [Tracking(TrackingType.Product)] + [CommerceTracking(TrackingType.Product)] public ActionResult Index(FashionPackage currentContent, bool useQuickview = false) { var viewModel = _viewModelFactory.Create(currentContent); diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/ProductController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/ProductController.cs index d19f3e38..2025237f 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/ProductController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Product/Controllers/ProductController.cs @@ -1,14 +1,13 @@ -using EPiServer.Recommendations.Tracking; -using EPiServer.Recommendations.Tracking.Data; +using System.Linq; +using System.Threading.Tasks; using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModelFactories; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Infrastructure.Facades; using EPiServer.Web.Mvc; using Mediachase.Commerce.Catalog; -using System.Linq; using System.Web.Mvc; +using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; namespace EPiServer.Reference.Commerce.Site.Features.Product.Controllers { @@ -28,7 +27,7 @@ public ProductController(IsInEditModeAccessor isInEditModeAccessor, CatalogEntry } [HttpGet] - public ActionResult Index(FashionProduct currentContent, string entryCode = "", bool useQuickview = false, bool skipTracking = false) + public async Task Index(FashionProduct currentContent, string entryCode = "", bool useQuickview = false, bool skipTracking = false) { var viewModel = _viewModelFactory.Create(currentContent, entryCode); @@ -47,20 +46,21 @@ public ActionResult Index(FashionProduct currentContent, string entryCode = "", { if (!skipTracking) { - _recommendationService.SendProductTracking(HttpContext, currentContent.Code, RetrieveRecommendationMode.Disabled); + await _recommendationService.TrackProduct(HttpContext, currentContent.Code, true); } return PartialView("_Quickview", viewModel); } - var trackingResponse = new TrackingResponseData(); if (!skipTracking) { - trackingResponse = _recommendationService.SendProductTracking(HttpContext, currentContent.Code, RetrieveRecommendationMode.Enabled); - } + var trackingResult = await _recommendationService.TrackProduct(HttpContext, currentContent.Code, false); - viewModel.AlternativeProducts = trackingResponse.GetAlternativeProductsRecommendations(_referenceConverter).Take(3); - viewModel.CrossSellProducts = trackingResponse.GetCrossSellProductsRecommendations(_referenceConverter); + viewModel.AlternativeProducts = + trackingResult?.GetAlternativeProductsRecommendations(_referenceConverter).Take(3); + viewModel.CrossSellProducts = + trackingResult?.GetCrossSellProductsRecommendations(_referenceConverter); + } return Request.IsAjaxRequest() ? PartialView(viewModel) : (ActionResult)View(viewModel); } @@ -75,7 +75,6 @@ public ActionResult SelectVariant(FashionProduct currentContent, string color, s } return HttpNotFound(); - } } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Controllers/RecommendationsController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Controllers/RecommendationsController.cs index 0a37301a..d3cde583 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Controllers/RecommendationsController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Controllers/RecommendationsController.cs @@ -1,4 +1,4 @@ -using EPiServer.Recommendations.Commerce.Tracking; +using EPiServer.Personalization.Commerce.Tracking; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels; using System.Collections.Generic; diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Extensions/RecommendationsExtensions.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Extensions/RecommendationsExtensions.cs index 7c08c4d0..b74e3cb5 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Extensions/RecommendationsExtensions.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Extensions/RecommendationsExtensions.cs @@ -1,9 +1,10 @@ -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking.Data; +using EPiServer.Personalization.Commerce.Tracking; +using EPiServer.Tracking.Commerce.Data; using Mediachase.Commerce.Catalog; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; +using EPiServer.Personalization.Commerce.Extensions; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions { diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/IRecommendationService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/IRecommendationService.cs index 222d9572..72c97bcd 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/IRecommendationService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/IRecommendationService.cs @@ -1,23 +1,24 @@ using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Order; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; -using EPiServer.Recommendations.Tracking.Data; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels; +using EPiServer.Tracking.Commerce.Data; using System.Collections.Generic; +using System.Threading.Tasks; using System.Web; +using EPiServer.Personalization.Commerce.Tracking; +using EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Services { public interface IRecommendationService { - TrackingResponseData SendProductTracking(HttpContextBase httpContext, string productCode, RetrieveRecommendationMode retrieveRecommendationMode); - TrackingResponseData SendSearchTracking(HttpContextBase httpContext, string searchTerm, IEnumerable productCodes); - TrackingResponseData SendOrderTracking(HttpContextBase httpContext, IPurchaseOrder order); - TrackingResponseData SendCategoryTracking(HttpContextBase httpContext, NodeContent category); - TrackingResponseData SendCartTrackingData(HttpContextBase httpContext); - TrackingResponseData SendWishListTrackingData(HttpContextBase httpContext); - TrackingResponseData SendCheckoutTrackingData(HttpContextBase httpContext); + Task TrackProduct(HttpContextBase httpContext, string productCode, bool skipRecommendations); + Task TrackSearch(HttpContextBase httpContext, string searchTerm, IEnumerable productCodes); + Task TrackOrder(HttpContextBase httpContext, IPurchaseOrder order); + Task TrackCategory(HttpContextBase httpContext, NodeContent category); + Task TrackCart(HttpContextBase httpContext); + Task TrackWishlist(HttpContextBase httpContext); + Task TrackCheckout(HttpContextBase httpContext); + IEnumerable GetRecommendedProductTileViewModels(IEnumerable recommendations); } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/ClickTrackingService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationContext.cs similarity index 86% rename from Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/ClickTrackingService.cs rename to Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationContext.cs index 6cbcb8ff..a0cf4982 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/ClickTrackingService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationContext.cs @@ -1,5 +1,5 @@ using EPiServer.Business.Commerce; -using EPiServer.Recommendations.Commerce.Tracking; +using EPiServer.Tracking.Commerce; using System.Web; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Services @@ -8,14 +8,14 @@ namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Services /// Tracks clicks on the recommended products. /// /// This class uses cookie to store recommendation id. - public class ClickTrackingService : IClickTrackingService + public class RecommendationContext : IRecommendationContext { /// /// Gets the id of the recommendation that was clicked to initiate the current request. /// /// The current http context. /// The recommendation id, or 0 if the current request was not initiated by clicking on a recommendation. - public long GetRecommendationId(HttpContextBase context) + public long GetCurrentRecommendationId(HttpContextBase context) { var recommendationIdKey = "RecommendationId"; if (context.Items.Contains(recommendationIdKey)) diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationService.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationService.cs index 8def08c0..55dab887 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationService.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/Services/RecommendationService.cs @@ -1,14 +1,17 @@ using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Order; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; -using EPiServer.Recommendations.Tracking.Data; +using EPiServer.Personalization.Commerce.Tracking; using EPiServer.Reference.Commerce.Site.Features.Product.Services; using EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels; using EPiServer.ServiceLocation; +using EPiServer.Tracking.Commerce; +using EPiServer.Tracking.Commerce.Data; +using EPiServer.Tracking.Core; using EPiServer.Web; +using EPiServer.Web.Routing; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; using System.Web; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Services @@ -16,107 +19,117 @@ namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.Services [ServiceConfiguration(typeof(IRecommendationService), Lifecycle = ServiceInstanceScope.Singleton)] public class RecommendationService : IRecommendationService { - private readonly ITrackingService _trackingService; - private readonly TrackingDataFactory _trackingDataFactory; - private readonly IProductService _productService; + private readonly ServiceAccessor _contentRouteHelperAccessor; private readonly IContextModeResolver _contextModeResolver; + private readonly IProductService _productService; + private readonly TrackingDataFactory _trackingDataFactory; + private readonly ITrackingService _trackingService; public RecommendationService( - ITrackingService trackingService, - TrackingDataFactory trackingDataFactory, + ServiceAccessor contentRouteHelperAccessor, + IContextModeResolver contextModeResolver, IProductService productService, - IContextModeResolver contextModeResolver) + TrackingDataFactory trackingDataFactory, + ITrackingService trackingService) { - _trackingService = trackingService; - _trackingDataFactory = trackingDataFactory; - _productService = productService; + _contentRouteHelperAccessor = contentRouteHelperAccessor; _contextModeResolver = contextModeResolver; + _productService = productService; + _trackingDataFactory = trackingDataFactory; + _trackingService = trackingService; } - public TrackingResponseData SendProductTracking(HttpContextBase httpContext, string productCode, RetrieveRecommendationMode retrieveRecommendationMode) + public async Task TrackProduct(HttpContextBase httpContext, string productCode, bool skipRecommendations) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateProductTrackingData(productCode, httpContext); - return _trackingService.Send(trackingData, httpContext, retrieveRecommendationMode); + + if (skipRecommendations) + { + trackingData.SkipRecommendations(); + } + + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - public TrackingResponseData SendSearchTracking(HttpContextBase httpContext, string searchTerm, IEnumerable productCodes) + public async Task TrackSearch(HttpContextBase httpContext, string searchTerm, IEnumerable productCodes) { if (_contextModeResolver.CurrentMode != ContextMode.Default || string.IsNullOrWhiteSpace(searchTerm)) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateSearchTrackingData(searchTerm, productCodes, httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Enabled); + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - public TrackingResponseData SendOrderTracking(HttpContextBase httpContext, IPurchaseOrder order) + public async Task TrackOrder(HttpContextBase httpContext, IPurchaseOrder order) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateOrderTrackingData(order, httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Enabled); + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - public TrackingResponseData SendCategoryTracking(HttpContextBase httpContext, NodeContent category) + public async Task TrackCategory(HttpContextBase httpContext, NodeContent category) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateCategoryTrackingData(category, httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Enabled); + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - public TrackingResponseData SendCartTrackingData(HttpContextBase httpContext) + public async Task TrackCart(HttpContextBase httpContext) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateCartTrackingData(httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Disabled); + trackingData.SkipRecommendations(); + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - public TrackingResponseData SendWishListTrackingData(HttpContextBase httpContext) + public async Task TrackWishlist(HttpContextBase httpContext) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateWishListTrackingData(httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Enabled); - } + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); + } - public TrackingResponseData SendCheckoutTrackingData(HttpContextBase httpContext) + public async Task TrackCheckout(HttpContextBase httpContext) { if (_contextModeResolver.CurrentMode != ContextMode.Default) { - return new TrackingResponseData(); + return null; } var trackingData = _trackingDataFactory.CreateCheckoutTrackingData(httpContext); - return _trackingService.Send(trackingData, httpContext, RetrieveRecommendationMode.Enabled); + return await _trackingService.TrackAsync(trackingData, httpContext, _contentRouteHelperAccessor().Content); } - + public IEnumerable GetRecommendedProductTileViewModels(IEnumerable recommendations) { return recommendations.Select(x => new RecommendedProductTileViewModel( - x.RecommendationId, + x.RecommendationId, _productService.GetProductTileViewModel(x.ContentLink)) ); - } + } } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/ViewModels/ProductViewModelBase.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/ViewModels/ProductViewModelBase.cs index af5bd60b..a7c923f4 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/ViewModels/ProductViewModelBase.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Recommendations/ViewModels/ProductViewModelBase.cs @@ -1,4 +1,4 @@ -using EPiServer.Recommendations.Commerce.Tracking; +using EPiServer.Personalization.Commerce.Tracking; using System.Collections.Generic; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/CategoryController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/CategoryController.cs index 851d48b4..b718857c 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/CategoryController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/CategoryController.cs @@ -1,4 +1,5 @@ -using EPiServer.Reference.Commerce.Site.Features.Product.Models; +using System.Threading.Tasks; +using EPiServer.Reference.Commerce.Site.Features.Product.Models; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Features.Search.ViewModelFactories; @@ -17,7 +18,7 @@ public class CategoryController : ContentController public CategoryController( SearchViewModelFactory viewModelFactory, - IRecommendationService recommendationService, + IRecommendationService recommendationService, ReferenceConverter referenceConverter) { _viewModelFactory = viewModelFactory; @@ -26,16 +27,16 @@ public CategoryController( } [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] - public ViewResult Index(FashionNode currentContent, FilterOptionViewModel viewModel) + public async Task Index(FashionNode currentContent, FilterOptionViewModel viewModel) { var model = _viewModelFactory.Create(currentContent, viewModel); if (HttpContext.Request.HttpMethod == "GET") { - var response = _recommendationService.SendCategoryTracking(HttpContext, currentContent); - model.Recommendations = response.GetCategoryRecommendations(_referenceConverter); + var trackingResult = await _recommendationService.TrackCategory(HttpContext, currentContent); + model.Recommendations = trackingResult.GetCategoryRecommendations(_referenceConverter); } - + return View(model); } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/SearchController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/SearchController.cs index 97fbcc7f..9c41c781 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/SearchController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/Controllers/SearchController.cs @@ -1,4 +1,4 @@ -using EPiServer.Recommendations.Tracking.Data; +using EPiServer.Tracking.Commerce.Data; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Features.Search.Pages; @@ -8,6 +8,7 @@ using EPiServer.Web.Mvc; using Mediachase.Commerce.Catalog; using System.Linq; +using System.Threading.Tasks; using System.Web.Mvc; namespace EPiServer.Reference.Commerce.Site.Features.Search.Controllers @@ -33,7 +34,7 @@ public SearchController( [ValidateInput(false)] [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] - public ActionResult Index(SearchPage currentPage, FilterOptionViewModel filterOptions) + public async Task Index(SearchPage currentPage, FilterOptionViewModel filterOptions) { var viewModel = _viewModelFactory.Create(currentPage, filterOptions); @@ -41,9 +42,10 @@ public ActionResult Index(SearchPage currentPage, FilterOptionViewModel filterOp { HttpContext.Items[SearchTrackingData.TotalSearchResultsKey] = filterOptions.TotalCount; - viewModel.Recommendations = _recommendationService - .SendSearchTracking(HttpContext, filterOptions.Q, viewModel.ProductViewModels.Select(x => x.Code)) - .GetSearchResultRecommendations(_referenceConverter); + var trackingResult = + await _recommendationService.TrackSearch(HttpContext, filterOptions.Q, + viewModel.ProductViewModels.Select(x => x.Code)); + viewModel.Recommendations = trackingResult.GetSearchResultRecommendations(_referenceConverter); } return View(viewModel); diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModelFactories/SearchViewModelFactory.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModelFactories/SearchViewModelFactory.cs index bdd74469..08142fdd 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModelFactories/SearchViewModelFactory.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModelFactories/SearchViewModelFactory.cs @@ -1,12 +1,12 @@ -using System.Collections.Generic; -using System.Linq; -using System.Web.Mvc; -using EPiServer.Core; +using EPiServer.Core; using EPiServer.Framework.Localization; -using Mediachase.Search; +using EPiServer.Personalization.Commerce.Tracking; using EPiServer.Reference.Commerce.Site.Features.Search.Services; using EPiServer.Reference.Commerce.Site.Features.Search.ViewModels; -using EPiServer.Recommendations.Commerce.Tracking; +using Mediachase.Search; +using System.Collections.Generic; +using System.Linq; +using System.Web.Mvc; namespace EPiServer.Reference.Commerce.Site.Features.Search.ViewModelFactories { diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModels/SearchViewModel.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModels/SearchViewModel.cs index 1b8123c4..f227936e 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModels/SearchViewModel.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Search/ViewModels/SearchViewModel.cs @@ -1,5 +1,5 @@ using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; +using EPiServer.Personalization.Commerce.Tracking; using EPiServer.Reference.Commerce.Site.Features.Product.ViewModels; using Mediachase.Search; using System.Collections.Generic; diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Start/Controllers/StartController.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Start/Controllers/StartController.cs index 6c2b9b62..0f5c72fb 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Start/Controllers/StartController.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Start/Controllers/StartController.cs @@ -1,17 +1,16 @@ using EPiServer.Commerce.Catalog.ContentTypes; using EPiServer.Commerce.Marketing; using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Tracking; using EPiServer.Reference.Commerce.Site.Features.Market.Services; +using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; using EPiServer.Reference.Commerce.Site.Features.Start.Pages; using EPiServer.Reference.Commerce.Site.Features.Start.ViewModels; +using EPiServer.Tracking.Commerce; using EPiServer.Web.Mvc; using Mediachase.Commerce; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; -using EPiServer.Reference.Commerce.Site.Features.Recommendations.Extensions; namespace EPiServer.Reference.Commerce.Site.Features.Start.Controllers { @@ -31,16 +30,16 @@ public StartController( _marketContentFilter = marketContentFilter; } - [Tracking(TrackingType.Home)] + [CommerceTracking(TrackingType.Home)] public ViewResult Index(StartPage currentPage) { var viewModel = new StartPageViewModel() { StartPage = currentPage, - Promotions = GetActivePromotions(), - Recommendations = this.GetHomeRecommendations() + Recommendations = this.GetHomeRecommendations(), + Promotions = GetActivePromotions() }; - + return View(viewModel); } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Features/Start/ViewModels/StartPageViewModel.cs b/Sources/EPiServer.Reference.Commerce.Site/Features/Start/ViewModels/StartPageViewModel.cs index b7c4cc0d..0c0c8097 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Features/Start/ViewModels/StartPageViewModel.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Features/Start/ViewModels/StartPageViewModel.cs @@ -1,5 +1,6 @@ using EPiServer.Core; -using EPiServer.Recommendations.Commerce.Tracking; +using EPiServer.Personalization.Commerce.Tracking; +using EPiServer.Tracking.Commerce; using EPiServer.Reference.Commerce.Site.Features.Start.Pages; using System.Collections.Generic; diff --git a/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/BundleConfig.cs b/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/BundleConfig.cs index bebf9632..a4e2bdd9 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/BundleConfig.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/BundleConfig.cs @@ -6,24 +6,12 @@ public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { - bundles.Add(new ScriptBundle("~/bundles/jquery").Include( - "~/Scripts/jquery-{version}.js")); - - bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( - "~/Scripts/jquery.validate.min.js", - "~/Scripts/jquery.validate.unobtrusive.min.js" - )); - - bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( - "~/Scripts/bootstrap*" - )); - - bundles.Add(new ScriptBundle("~/bundles/js").Include( - "~/Scripts/js/*.js")); - - bundles.Add(new StyleBundle("~/styles/bundled").Include( - "~/Styles/style.css" - )); + bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-{version}.js")); + bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include("~/Scripts/jquery.validate.min.js", "~/Scripts/jquery.validate.unobtrusive.min.js")); + bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap*")); + bundles.Add(new ScriptBundle("~/bundles/mustache").Include("~/Scripts/mustache.min.js")); + bundles.Add(new ScriptBundle("~/bundles/js").Include("~/Scripts/js/*.js")); + bundles.Add(new StyleBundle("~/styles/bundled").Include("~/Styles/style.css")); } } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/SiteInitialization.cs b/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/SiteInitialization.cs index 05476c05..aa0c1ec8 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/SiteInitialization.cs +++ b/Sources/EPiServer.Reference.Commerce.Site/Infrastructure/SiteInitialization.cs @@ -6,15 +6,17 @@ using EPiServer.Framework.Initialization; using EPiServer.Framework.Web; using EPiServer.Globalization; -using EPiServer.Recommendations.Commerce.Tracking; -using EPiServer.Recommendations.Widgets; +using EPiServer.Personalization.Commerce; +using EPiServer.Personalization.Commerce.Widgets; using EPiServer.Reference.Commerce.Site.Features.Market.Services; using EPiServer.Reference.Commerce.Site.Features.Recommendations.Services; using EPiServer.Reference.Commerce.Site.Infrastructure.Attributes; using EPiServer.Reference.Commerce.Site.Infrastructure.Facades; using EPiServer.Reference.Commerce.Site.Infrastructure.WebApi; using EPiServer.ServiceLocation; +using EPiServer.Tracking.Commerce; using EPiServer.Web; +using EPiServer.Web.Routing; using Mediachase.Commerce; using Mediachase.Commerce.Core; using Newtonsoft.Json; @@ -30,7 +32,6 @@ namespace EPiServer.Reference.Commerce.Site.Infrastructure { [ModuleDependency(typeof(EPiServer.Commerce.Initialization.InitializationModule))] - [ModuleDependency(typeof(Recommendations.Commerce.InitializationModule))] public class SiteInitialization : IConfigurableModule { public void Initialize(InitializationEngine context) @@ -64,7 +65,7 @@ public void ConfigureContainer(ServiceConfigurationContext context) { var services = context.Services; - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); @@ -82,6 +83,8 @@ public void ConfigureContainer(ServiceConfigurationContext context) services.AddHttpContextOrThreadScoped(); services.AddTransient(locator => HttpContext.Current.ContextBaseOrNull()); + services.AddSingleton>(locator => locator.GetInstance); + DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.StructureMap())); GlobalConfiguration.Configure(config => { @@ -180,9 +183,9 @@ private void SetupExcludePromotionEntries(InitializationEngine context) /// private void SetupRecommendationsWidgets(InitializationEngine context) { - var configuration = context.Locate.Advanced.GetInstance(); + var configuration = context.Locate.Advanced.GetInstance(); - if (configuration.SilentMode) + if (!configuration.TrackingEnabled) { return; } diff --git a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Cart.js b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Cart.js index e1f29aff..7fdb6bc3 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Cart.js +++ b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Cart.js @@ -6,8 +6,8 @@ .on('click', '.jsRemoveCartItem', Cart.removeCartItem) .on('change', '.jsChangeCartItem', Cart.changeCartItem) .on('click', '.jsAddToCart', Cart.addCartItem) - .on('change', '#MiniCart', function () { $("#MiniCartResponsive").html($(this).html()); }) - .on('change', '#WishListMiniCart', function () { $("#WishListMiniCartResponsive").html($(this).html()); }) + .on('change', '#MiniCart', function () { $("#MiniCartResponsive > div:first").html($("div:first", this).html()); }) + .on('change', '#WishListMiniCart', function () { $("#WishListMiniCartResponsive > div:first").html($("div:first", this).html()); }) .on('click', '.jsCartContinueShopping', function () { if ($(this).closest('#cart-dropdown')) { $(this).closest('#cart-dropdown').collapse('hide'); diff --git a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Market.js b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Market.js index 1931db36..34acb9b3 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Market.js +++ b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Market.js @@ -1,12 +1,12 @@ var Market = { init: function () { $(document) - .on('change ', '.jsMarketSelector', Market.setMarket) - .on('change ', '.jsLanguageSelector', Market.setLanguage) - .on('change ', '.jsCurrencySelector', Market.setCurrency); + .on("change ", ".jsMarketSelector", Market.setMarket) + .on("change ", ".jsLanguageSelector", Market.setLanguage) + .on("change ", ".jsCurrencySelector", Market.setCurrency); }, setMarket: function () { - var form = $(this).closest('form'); + var form = $(this).closest("form"); $.ajax({ type: "POST", url: form[0].action, @@ -17,7 +17,7 @@ }); }, setLanguage: function (e) { - var form = $(this).closest('form'); + var form = $(this).closest("form"); $.ajax({ type: "POST", url: form[0].action, @@ -28,7 +28,7 @@ }); }, setCurrency: function (e) { - var form = $(this).closest('form'); + var form = $(this).closest("form"); $.ajax({ type: "POST", url: form[0].action, @@ -37,5 +37,8 @@ document.location = response.returnUrl; } }); + }, + getSelectedCurrency: function () { + return $("#CurrencyCode").val() || "USD"; } } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Recommendations.js b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Recommendations.js index 5b533dcb..dc1b10e9 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Recommendations.js +++ b/Sources/EPiServer.Reference.Commerce.Site/Scripts/js/Recommendations.js @@ -1,9 +1,6 @@ var Recommendations = { init: function () { - $(".recommendations").find("[data-recommendation-id]").on("click", ".quick-view-btn-container > button", Recommendations.clickTracking); - $(".recommendations").find("[data-recommendation-id]").on("mouseup", ".product > a", Recommendations.clickTracking); - $(".recommendations").find("[data-recommendation-id]").on("contextmenu", ".product > a", Recommendations.keyboardHandle); - $(".recommendations").find("[data-recommendation-id]").on("keydown", ".product > a, .product img", Recommendations.keyboardHandle); + this._bindEvents(); }, clickTracking: function (evt) { @@ -12,8 +9,138 @@ }, keyboardHandle: function (evt) { - if ((evt.type == "keydown" && evt.which == 13) || (evt.type == "contextmenu" && evt.which != 3)) { + if ((evt.type === "keydown" && evt.which === 13) || (evt.type === "contextmenu" && evt.which !== 3)) { Recommendations.clickTracking(evt); //handle keyup event of enter key, contextmenu event of menu key. } + }, + + // summary: + // Renders the recommended items received inside the given target container. + // returnedData: [Object] + // The recommendations data. + // contextSettings: [Object] + // The context settings used to render recommendations, that included: + // sectionMappings: [Object] + // area: [string] + // The area that recommendations belong to. + // selector: [string] + // The selector to target container (a HTML element). + // tags: + // public, recommendations + render: function (returnedData, contextSettings) { + var data = null; + try { + data = JSON.parse(returnedData); + } catch (e) { + return; + } + + var sectionMappings = contextSettings.sectionMappings; + if (!(sectionMappings instanceof Array) || sectionMappings.length === 0) { + return; + } + + // Loads and parses templates. + var listTemplate = $("#epiRecommendationListTemplate").html(), + itemTemplate = $("#epiRecommendationItemTemplate").html(); + Mustache.parse(listTemplate); + Mustache.parse(itemTemplate); + + // Gets selected currency. + var selectedCurrency = Market.getSelectedCurrency(), + setDisplayPrice = function (recs) { + for (var i = 0, length = recs.length; i < length; i++) { + var selectedPrice = recs[i].prices[selectedCurrency]; + if (!selectedPrice) { + continue; + } + + recs[i].hasDiscount = selectedPrice.unitPrice > selectedPrice.salePrice; + recs[i].unitPrice = selectedPrice.unitPrice; + recs[i].salePrice = selectedPrice.salePrice; + } + + return recs; + }; + + var renderRecommendations = function (data, targetArea, targetSelector, numberOfItemsToRender) { + var $target = $(targetSelector); + if ($target.length === 0) { + return; + } + + // Get indicated recommendations data. + var recommendations = { + recs: [], + getRelativeUrl: function () { + return function (text, render) { + if (this.hasOwnProperty(text)) { + var a = document.createElement("a"); + a.href = this[text]; + + return a.pathname; + } else { + return text; + } + } + }, + formatPrice: function () { + return function (text, render) { + var localeSettings = contextSettings.localeSettings, + formattedPrice; + if (this.hasOwnProperty(text)) { + formattedPrice = this[text].toLocaleString(localeSettings.culture, { + style: "currency", + currency: localeSettings.currencyCode, + minimumFractionDigits: localeSettings.currencyDigits + }); + + formattedPrice = formattedPrice + .replace(localeSettings.currencyCode, localeSettings.currencySymbol) + .replace(localeSettings.currencySymbol, "" + localeSettings.currencySymbol + ""); + + // Special handling for Saudi Arabia + if (localeSettings.currencyCode === "SAR") { + var priceInSAR = this[text].toLocaleString(localeSettings.culture, { minimumFractionDigits: localeSettings.currencyDigits }); + formattedPrice = formattedPrice.replace(priceInSAR, this[text].toFixed(localeSettings.currencyDigits)); + } + } else { + formattedPrice = localeSettings.notAvailable; + } + + return "" + formattedPrice + ""; + } + } + }; + for (var i = 0, length = data.smartRecs.length; i < length; i++) { + if (data.smartRecs[i].position === targetArea) { + recommendations.recs = recommendations.recs.concat(setDisplayPrice(data.smartRecs[i].recs)); + } + } + if (numberOfItemsToRender > 0) { + recommendations.recs = recommendations.recs.slice(0, numberOfItemsToRender); + } + + // Renders recommended data with loaded templates. + var htmlContent = Mustache.render(listTemplate, recommendations, { epiRecommendationItemTemplate: itemTemplate }); + $target.html(htmlContent); + }; + + for (var i = 0, length = sectionMappings.length; i < length; i++) { + var targetArea = sectionMappings[i].area, + targetSelector = sectionMappings[i].selector, + numberOfItemsToRender = sectionMappings[i].numberOfItemsToRender; + renderRecommendations(data, targetArea, targetSelector, numberOfItemsToRender); + } + + // Bind events for new rendered elements. + Recommendations._bindEvents(); + }, + + _bindEvents: function () { + $(".recommendations").find("[data-recommendation-id]").on("click", ".quick-view-btn-container > button", Recommendations.clickTracking); + $(".recommendations").find("[data-recommendation-id]").on("mouseup", ".product > a", Recommendations.clickTracking); + $(".recommendations").find("[data-recommendation-id]").on("contextmenu", ".product > a", Recommendations.keyboardHandle); + $(".recommendations").find("[data-recommendation-id]").on("keydown", ".product > a, .product img", Recommendations.keyboardHandle); } }; \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Scripts/mustache.min.js b/Sources/EPiServer.Reference.Commerce.Site/Scripts/mustache.min.js new file mode 100644 index 00000000..520cfcb9 --- /dev/null +++ b/Sources/EPiServer.Reference.Commerce.Site/Scripts/mustache.min.js @@ -0,0 +1 @@ +(function defineMustache(global,factory){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{global.Mustache={};factory(global.Mustache)}})(this,function mustacheFactory(mustache){var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index")value=this.renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j
+ + if (Request.IsAjaxRequest()) + { + @Html.SetupOnLoadTracking() + } }
\ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Views/Checkout/SingleShipmentCheckout.cshtml b/Sources/EPiServer.Reference.Commerce.Site/Views/Checkout/SingleShipmentCheckout.cshtml index 004ae999..d3807430 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Views/Checkout/SingleShipmentCheckout.cshtml +++ b/Sources/EPiServer.Reference.Commerce.Site/Views/Checkout/SingleShipmentCheckout.cshtml @@ -1,4 +1,6 @@ -@model EPiServer.Reference.Commerce.Site.Features.Checkout.ViewModels.CheckoutViewModel +@using EPiServer.Personalization.Commerce.Extensions +@using EPiServer.Tracking.Commerce +@model EPiServer.Reference.Commerce.Site.Features.Checkout.ViewModels.CheckoutViewModel @{ if (Request.IsAjaxRequest()) { @@ -120,5 +122,10 @@ } + + @if (Request.IsAjaxRequest()) + { + @Html.SetupOnLoadTracking() + } \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Views/Package/Index.cshtml b/Sources/EPiServer.Reference.Commerce.Site/Views/Package/Index.cshtml index 58bce639..1bf082b6 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Views/Package/Index.cshtml +++ b/Sources/EPiServer.Reference.Commerce.Site/Views/Package/Index.cshtml @@ -1,5 +1,4 @@ @model EPiServer.Reference.Commerce.Site.Features.Product.ViewModels.FashionPackageViewModel -
- } +} -@section RightMarginRecommendations {@{Html.RenderAction("Index", "Recommendations", new { recommendations = Model.Recommendations });}} \ No newline at end of file +@if (@Functions.UseClientSideTracking()) +{ + @section RecommendationsContextSettings { sectionMappings: [{ area: "homeWidget", selector: ".recommendations-right", numberOfItemsToRender: 6 }] } +} +else +{ + @section RightMarginRecommendations {@{Html.RenderAction("Index", "Recommendations", new { recommendations = Model.Recommendations });}} +} \ No newline at end of file diff --git a/Sources/EPiServer.Reference.Commerce.Site/Web.config b/Sources/EPiServer.Reference.Commerce.Site/Web.config index 97974044..d77b927f 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/Web.config +++ b/Sources/EPiServer.Reference.Commerce.Site/Web.config @@ -221,6 +221,10 @@ + + + + @@ -235,91 +239,87 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + - - + + @@ -605,6 +605,7 @@ + @@ -621,14 +622,13 @@ - - - - - - - - + + + + + + + diff --git a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/Commerce/Commerce.zip b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/Commerce/Commerce.zip index 75096e81..c7e9ba3c 100644 Binary files a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/Commerce/Commerce.zip and b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/Commerce/Commerce.zip differ diff --git a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell.ManagerIntegration/EPiServer.Commerce.Shell.ManagerIntegration.zip b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell.ManagerIntegration/EPiServer.Commerce.Shell.ManagerIntegration.zip index 3b9d6972..f5c353a2 100644 Binary files a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell.ManagerIntegration/EPiServer.Commerce.Shell.ManagerIntegration.zip and b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell.ManagerIntegration/EPiServer.Commerce.Shell.ManagerIntegration.zip differ diff --git a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell/EPiServer.Commerce.Shell.zip b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell/EPiServer.Commerce.Shell.zip index dfbeded6..84c3ef28 100644 Binary files a/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell/EPiServer.Commerce.Shell.zip and b/Sources/EPiServer.Reference.Commerce.Site/modules/_protected/EPiServer.Commerce.Shell/EPiServer.Commerce.Shell.zip differ diff --git a/Sources/EPiServer.Reference.Commerce.Site/packages.config b/Sources/EPiServer.Reference.Commerce.Site/packages.config index 7a74bd20..cc9d3e56 100644 --- a/Sources/EPiServer.Reference.Commerce.Site/packages.config +++ b/Sources/EPiServer.Reference.Commerce.Site/packages.config @@ -14,6 +14,8 @@ + + @@ -50,10 +52,10 @@ - - - - - - + + + + + + diff --git a/Update-EPiPackages.ps1 b/Update-EPiPackages.ps1 index 64d9101f..54210f82 100644 --- a/Update-EPiPackages.ps1 +++ b/Update-EPiPackages.ps1 @@ -4,7 +4,8 @@ Update-Package EPiServer.Commerce -Source http://nuget.episerver.com/nuget Update-Package EPiServer.Commerce.UI.ManagerIntegration -Source http://nuget.episerver.com/nuget Update-Package EPiServer.CommerceManager -Source http://nuget.episerver.com/nuget Update-Package EPiServer.Commerce.Core -Source http://nuget.episerver.com/nuget -Update-Package EPiServer.Recommendations.Commerce -Source http://nuget.episerver.com/nuget +Update-Package EPiServer.Tracking.Commerce -Source http://nuget.episerver.com/nuget +Update-Package EPiServer.Personalization.Commerce -Source http://nuget.episerver.com/nuget Update-Package EPiServer.CMS -Source http://nuget.episerver.com/nuget Update-Package EPiServer.CMS.UI -Source http://nuget.episerver.com/nuget Update-Package EPiServer.CMS.Core -Source http://nuget.episerver.com/nuget \ No newline at end of file