Пример #1
0
 public DeliveryController(IStorefrontContext storefrontContext, IDeliveryRepository deliveryRepository, IVisitorContext visitorContext, IShoppingCartLinesRepository shoppingCartLinesRepository, ISearchManager searchManager)
     : base(storefrontContext)
 {
     Assert.ArgumentNotNull((object)deliveryRepository, nameof(deliveryRepository));
     Assert.ArgumentNotNull((object)storefrontContext, nameof(storefrontContext));
     Assert.ArgumentNotNull((object)deliveryRepository, nameof(deliveryRepository));
     Assert.ArgumentNotNull((object)visitorContext, nameof(visitorContext));
     this.VisitorContext              = visitorContext;
     this.DeliveryRepository          = deliveryRepository;
     this.ShoppingCartLinesRepository = shoppingCartLinesRepository;
     this.SearchManager = searchManager;
 }
 public ManagerResponse <CartResult, CommerceCart> RemoveAllBillingParties(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> RemoveAllPaymentMethods(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> AddPartyToCart(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart, CommerceParty party)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> RemovePartiesFromCart(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart, List <Party> parties)
 {
     return(null);
 }
        /// <summary>
        /// The <see cref="RelatedCatalogItemsViewModel" /> representing the related catalog items.
        /// </summary>
        /// <param name="storefront">The storefront.</param>
        /// <param name="visitorContext">The visitor context.</param>
        /// <param name="catalogItem">The catalog item.</param>
        /// <param name="rendering">The target renering.</param>
        /// <returns>
        /// The related catalog item view model.
        /// </returns>
        public RelatedCatalogItemsViewModel GetRelationshipsFromItem([NotNull] CommerceStorefront storefront, [NotNull] IVisitorContext visitorContext, Item catalogItem, Rendering rendering)
        {
            Assert.ArgumentNotNull(storefront, "storefront");

            if (catalogItem != null &&
                catalogItem.Fields.Contains(CommerceConstants.KnownFieldIds.RelationshipList) &&
                !string.IsNullOrEmpty(catalogItem[CommerceConstants.KnownFieldIds.RelationshipList]))
            {
                var field = new RelationshipField(catalogItem.Fields[CommerceConstants.KnownFieldIds.RelationshipList]);
                if (rendering != null &&
                    !string.IsNullOrWhiteSpace(rendering.RenderingItem.InnerItem["RelationshipsToDisplay"]))
                {
                    var relationshipsToDisplay = rendering.RenderingItem.InnerItem["RelationshipsToDisplay"].Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                    return(this.GetRelationshipsFromField(storefront, visitorContext, field, rendering, relationshipsToDisplay));
                }
                else
                {
                    return(this.GetRelationshipsFromField(storefront, visitorContext, field, rendering));
                }
            }

            return(null);
        }
 public ManagerResponse <CartResult, CommerceCart> UpdateCart(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart, CommerceCart cartChanges)
 {
     return(null);
 }
 public ManagerResponse <RemovePromoCodeResult, CommerceCart> RemovePromoCodeFromCart(CommerceStorefront storefront, IVisitorContext visitorContext, string promoCode)
 {
     return(null);
 }
 public ManagerResponse <AddShippingInfoResult, CommerceCart> SetShippingMethods(CommerceStorefront storefront, IVisitorContext visitorContext, SetShippingMethodsInputModel inputModel)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> RemoveLineItemFromCart(CommerceStorefront storefront, IVisitorContext visitorContext, string externalCartLineId)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> ChangeLineQuantity(CommerceStorefront storefront, IVisitorContext visitorContext, UpdateCartLineInputModel inputModel)
 {
     return(null);
 }
 public ManagerResponse <CartResult, bool> AddLineItemsToCart(CommerceStorefront storefront, IVisitorContext visitorContext, IEnumerable <AddCartLineInputModel> inputModelList)
 {
     return(null);
 }
 public ManagerResponse <CartResult, bool> UpdateCartCurrency(CommerceStorefront storefront, IVisitorContext visitorContext, string currencyCode)
 {
     return(null);
 }
 public ManagerResponse <CartResult, CommerceCart> GetCurrentCart(CommerceStorefront storefront, IVisitorContext visitorContext, bool refresh = false)
 {
     return(null);
 }
 public OrderHeaderRenderingModel(IStorefrontContext storefrontContext, IModelProvider modelProvider, ILoyaltyOrderManager loyaltyOrderManager, IVisitorContext visitorContext) : base(storefrontContext)
 {
     Assert.ArgumentNotNull(modelProvider, nameof(modelProvider));
     _storefrontContext   = storefrontContext;
     _modelProvider       = modelProvider;
     _loyaltyOrderManager = loyaltyOrderManager;
     _visitorContext      = visitorContext;
 }
 public ManagerResponse <CartResult, CommerceCart> SetPaymentMethods(CommerceStorefront storefront, IVisitorContext visitorContext, PaymentInputModel inputModel)
 {
     return(null);
 }
Пример #17
0
 internal ParameterVisitor(IVisitorContext ctx) : base(ctx)
 {
 }
 public ManagerResponse <CartResult, CommerceCart> MergeCarts(CommerceStorefront storefront, IVisitorContext visitorContext, string anonymousVisitorId, Cart anonymousVisitorCart)
 {
     return(null);
 }
        /// <summary>
        /// Gets a lists of target items from a relationship field
        /// </summary>
        /// <param name="storefront">The storefront.</param>
        /// <param name="visitorContext">The visitor context.</param>
        /// <param name="field">the relationship field</param>
        /// <param name="rendering">The target renering.</param>
        /// <returns>
        /// a list of relationship targets or null if no items found
        /// </returns>
        public RelatedCatalogItemsViewModel GetRelationshipsFromField([NotNull] CommerceStorefront storefront, [NotNull] IVisitorContext visitorContext, RelationshipField field, Rendering rendering)
        {
            Assert.ArgumentNotNull(storefront, "storefront");

            return(GetRelationshipsFromField(storefront, visitorContext, field, rendering, null));
        }
 public ManagerResponse <CartResult, CommerceCart> AddPaymentInfoToCart(CommerceStorefront storefront, IVisitorContext visitorContext, CommerceCart cart, PaymentInfo info, CommerceParty party, bool refreshCart = false)
 {
     return(null);
 }