This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Promotions processors | |
this.For<ConditionAwareItemDiscountProcessor<BuyQuantityGetItemDiscount>>().Use<MyCustomDiscountProcessor>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyCustomDiscountProcessor : BuyQuantityGetItemDiscountProcessor | |
{ | |
private readonly IAccountManager _accountManager; | |
public MyCustomDiscountProcessor(CollectionTargetEvaluator targetEvaluator, | |
FulfillmentEvaluator fulfillmentEvaluator, LocalizationService localizationService, | |
RedemptionDescriptionFactory redemptionDescriptionFactory, IAccountManager accountManager) | |
: base(targetEvaluator, fulfillmentEvaluator, localizationService, redemptionDescriptionFactory) | |
{ | |
this._accountManager = accountManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ContentType( | |
DisplayName = "My custom discount", | |
GUID = "EDC495FD-8A76-4106-B32E-6EAF9666E170", | |
AvailableInEditMode = false)] | |
[AvailableContentTypes(Include = new[] { typeof(PromotionData) })] | |
public class MyCustomDiscount : EPiServer.Commerce.Marketing.Promotions.BuyQuantityGetItemDiscount | |
{ | |
/// <summary> | |
/// The account number for the customer who will apply the promotion | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Tracking.Commerce; | |
using EPiServer.Tracking.Commerce.Data; | |
using EPiServer.Tracking.Core; | |
//... | |
namespace Project.CheckoutAndOrderManagement.Implementation.Areas.CheckoutAndOrder.Controllers.Pages | |
{ | |
[Authorize] | |
public class CartPageController : PageController<CartPageType> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer; | |
using EPiServer.Commerce.Catalog.Linking; | |
using EPiServer.Commerce.Order; | |
using EPiServer.Core; | |
using EPiServer.Globalization; | |
using EPiServer.ServiceLocation; | |
using EPiServer.Tracking.Commerce; | |
using EPiServer.Tracking.Commerce.Data; | |
using Mediachase.Commerce; | |
using Mediachase.Commerce.Catalog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer; | |
using EPiServer.Commerce.Order; | |
using EPiServer.Core; | |
using EPiServer.Globalization; | |
using EPiServer.Tracking.Commerce; | |
using EPiServer.Tracking.Commerce.Data; | |
using EPiServer.Tracking.Core; | |
using EPiServer.Web.Mvc; | |
using EPiServer.Web.Routing; | |
using Mediachase.BusinessFoundation.Data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CommerceTracking(TrackingType.Basket)] | |
public ActionResult Index(CartPageType currentPage, string cartName) | |
{ | |
//This is my cart controller | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Commerce.Catalog.ContentTypes; | |
using EPiServer.Find.ClientConventions; | |
using EPiServer.Find.Commerce; | |
public class CustomCatalogContentClientConventions : CatalogContentClientConventions | |
{ | |
protected override void ApplyPricingConventions(TypeConventionBuilder<IPricing> conventionBuilder) | |
{ | |
conventionBuilder | |
.ExcludeField(x => x.PriceReference); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseVariantType : VariationContent, IBaseVariant | |
{ | |
[JsonIgnore] | |
[IgnoreMetaDataPlusSynchronization] | |
[Display(GroupName = "Pricing", Name = "Prices", Order = 100)] | |
[UIHint("pricecollection")] | |
public virtual ContentReference PriceReference { get; set; } | |
[JsonIgnore] | |
[IgnoreMetaDataPlusSynchronization] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IBaseVariant : ICommerce, IAssetContainer, IPricing, IStockPlacement | |
{ | |
... | |
} |
NewerOlder