Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Grand.Business.Core - Code cleanup (ReSharper)
supportef28dc30741a
diff --git a/src/Business/Grand.Business.Core/Commands/Catalog/SendNotificationsToSubscribersCommand.cs b/src/Business/Grand.Business.Core/Commands/Catalog/SendNotificationsToSubscribersCommand.csindex c1551ed8c..dd0d224fd 100644--- a/src/Business/Grand.Business.Core/Commands/Catalog/SendNotificationsToSubscribersCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Catalog/SendNotificationsToSubscribersCommand.cs@@ -2,12 +2,11 @@using Grand.Domain.Common;using MediatR;-namespace Grand.Business.Core.Commands.Catalog+namespace Grand.Business.Core.Commands.Catalog;++public class SendNotificationsToSubscribersCommand : IRequest<IList<OutOfStockSubscription>>{- public class SendNotificationsToSubscribersCommand : IRequest<IList<OutOfStockSubscription>>- {- public Product Product { get; set; }- public IList<CustomAttribute> Attributes { get; set; }- public string Warehouse { get; set; }- }-}+ public Product Product { get; set; }+ public IList<CustomAttribute> Attributes { get; set; }+ public string Warehouse { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Catalog/SendOutBidCustomerCommand.cs b/src/Business/Grand.Business.Core/Commands/Catalog/SendOutBidCustomerCommand.csindex ba713258f..449251e0d 100644--- a/src/Business/Grand.Business.Core/Commands/Catalog/SendOutBidCustomerCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Catalog/SendOutBidCustomerCommand.cs@@ -2,12 +2,11 @@using Grand.Domain.Localization;using MediatR;-namespace Grand.Business.Core.Commands.Catalog+namespace Grand.Business.Core.Commands.Catalog;++public class SendOutBidCustomerCommand : IRequest<bool>{- public class SendOutBidCustomerCommand : IRequest<bool>- {- public Product Product { get; set; }- public Bid Bid { get; set; }- public Language Language { get; set; }- }-}+ public Product Product { get; set; }+ public Bid Bid { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Catalog/SendQuantityBelowStoreOwnerCommand.cs b/src/Business/Grand.Business.Core/Commands/Catalog/SendQuantityBelowStoreOwnerCommand.csindex 334483f95..bdd7febc7 100644--- a/src/Business/Grand.Business.Core/Commands/Catalog/SendQuantityBelowStoreOwnerCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Catalog/SendQuantityBelowStoreOwnerCommand.cs@@ -1,12 +1,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Commands.Catalog-{- public class SendQuantityBelowStoreOwnerCommand : IRequest<bool>- {- public Product Product { get; set; }- public ProductAttributeCombination ProductAttributeCombination { get; set; }+namespace Grand.Business.Core.Commands.Catalog;- }-}+public class SendQuantityBelowStoreOwnerCommand : IRequest<bool>+{+ public Product Product { get; set; }+ public ProductAttributeCombination ProductAttributeCombination { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Catalog/UpdateProductReviewTotalsCommand.cs b/src/Business/Grand.Business.Core/Commands/Catalog/UpdateProductReviewTotalsCommand.csindex 2a6361505..e65995a43 100644--- a/src/Business/Grand.Business.Core/Commands/Catalog/UpdateProductReviewTotalsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Catalog/UpdateProductReviewTotalsCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Commands.Catalog+namespace Grand.Business.Core.Commands.Catalog;++public class UpdateProductReviewTotalsCommand : IRequest<bool>{- public class UpdateProductReviewTotalsCommand : IRequest<bool>- {- public Product Product { get; set; }- }-}+ public Product Product { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ActivatedValueForPurchasedVouchersCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ActivatedValueForPurchasedVouchersCommand.csindex 17cef10b4..4a606541f 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ActivatedValueForPurchasedVouchersCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ActivatedValueForPurchasedVouchersCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ActivatedValueForPurchasedGiftVouchersCommand : IRequest<bool>{- public class ActivatedValueForPurchasedGiftVouchersCommand : IRequest<bool>- {- public Order Order { get; set; }- public bool Activate { get; set; }- }-}+ public Order Order { get; set; }+ public bool Activate { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddCustomerReservationCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddCustomerReservationCommand.csindex c780281f5..312d71290 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddCustomerReservationCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddCustomerReservationCommand.cs@@ -3,15 +3,14 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class AddCustomerReservationCommand : IRequest<bool>{- public class AddCustomerReservationCommand : IRequest<bool>- {- public Customer Customer { get; set; }- public Product Product { get; set; }- public DateTime? RentalStartDate { get; set; }- public DateTime? RentalEndDate { get; set; }- public ShoppingCartItem ShoppingCartItem { get; set; }- public string ReservationId { get; set; }- }-}+ public Customer Customer { get; set; }+ public Product Product { get; set; }+ public DateTime? RentalStartDate { get; set; }+ public DateTime? RentalEndDate { get; set; }+ public ShoppingCartItem ShoppingCartItem { get; set; }+ public string ReservationId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddRequiredProductsCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddRequiredProductsCommand.csindex 425f6ecfe..3768e6126 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddRequiredProductsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AddRequiredProductsCommand.cs@@ -3,13 +3,12 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class AddRequiredProductsCommand : IRequest<bool>{- public class AddRequiredProductsCommand : IRequest<bool>- {- public Customer Customer { get; set; }- public ShoppingCartType ShoppingCartType { get; set; }- public Product Product { get; set; }- public string StoreId { get; set; }- }-}+ public Customer Customer { get; set; }+ public ShoppingCartType ShoppingCartType { get; set; }+ public Product Product { get; set; }+ public string StoreId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AwardLoyaltyPointsCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AwardLoyaltyPointsCommand.csindex fa7bba2b1..c8c968401 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AwardLoyaltyPointsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/AwardLoyaltyPointsCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class AwardLoyaltyPointsCommand : IRequest<bool>{- public class AwardLoyaltyPointsCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CalculateLoyaltyPointsCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CalculateLoyaltyPointsCommand.csindex ceec0cff7..2c32e664d 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CalculateLoyaltyPointsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CalculateLoyaltyPointsCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class CalculateLoyaltyPointsCommand : IRequest<int>{- public class CalculateLoyaltyPointsCommand : IRequest<int>- {- public Customer Customer { get; set; }- public double Amount { get; set; }- }-}+ public Customer Customer { get; set; }+ public double Amount { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderCommand.csindex df5a125ce..98ab540fd 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderCommand.cs@@ -1,12 +1,11 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class CancelOrderCommand : IRequest<bool>{- public class CancelOrderCommand : IRequest<bool>- {- public Order Order { get; set; }- public bool NotifyCustomer { get; set; }- public bool NotifyStoreOwner { get; set; } = false;- }-}+ public Order Order { get; set; }+ public bool NotifyCustomer { get; set; }+ public bool NotifyStoreOwner { get; set; } = false;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderItemCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderItemCommand.csindex e4e80dfb7..360046ad5 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderItemCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CancelOrderItemCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class CancelOrderItemCommand : IRequest<(bool error, string message)>{- public class CancelOrderItemCommand : IRequest<(bool error, string message)>- {- public Order Order { get; set; }- public OrderItem OrderItem { get; set; }- }-}+ public Order Order { get; set; }+ public OrderItem OrderItem { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CaptureCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CaptureCommand.csindex 9ea396d59..de1cb0b65 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CaptureCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CaptureCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class CaptureCommand : IRequest<IList<string>>{- public class CaptureCommand : IRequest<IList<string>>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CheckOrderStatusCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CheckOrderStatusCommand.csindex 5994b43df..4c5531f0c 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CheckOrderStatusCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/CheckOrderStatusCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class CheckOrderStatusCommand : IRequest<bool>{- public class CheckOrderStatusCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderCommand.csindex 17dd15719..ec03354dd 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class DeleteOrderCommand : IRequest<bool>{- public class DeleteOrderCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderItemCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderItemCommand.csindex a3007a5ae..9bfd9b2de 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderItemCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/DeleteOrderItemCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class DeleteOrderItemCommand : IRequest<(bool error, string message)>{- public class DeleteOrderItemCommand : IRequest<(bool error, string message)>- {- public Order Order { get; set; }- public OrderItem OrderItem { get; set; }- }-}+ public Order Order { get; set; }+ public OrderItem OrderItem { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/InsertOrderItemCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/InsertOrderItemCommand.csindex 61a395c0a..a6e3edcd2 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/InsertOrderItemCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/InsertOrderItemCommand.cs@@ -2,12 +2,11 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class InsertOrderItemCommand : IRequest<bool>{- public class InsertOrderItemCommand : IRequest<bool>- {- public Order Order { get; set; }- public OrderItem OrderItem { get; set; }- public Product Product { get; set; }- }-}+ public Order Order { get; set; }+ public OrderItem OrderItem { get; set; }+ public Product Product { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsAuthorizedCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsAuthorizedCommand.csindex c2b1b5555..435646b6c 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsAuthorizedCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsAuthorizedCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class MarkAsAuthorizedCommand : IRequest<bool>{- public class MarkAsAuthorizedCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsPaidCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsPaidCommand.csindex a7c534f00..9c25e39b6 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsPaidCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MarkAsPaidCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class MarkAsPaidCommand : IRequest<bool>{- public class MarkAsPaidCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MaxOrderNumberCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MaxOrderNumberCommand.csindex f42f4cbfa..19e2b062c 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MaxOrderNumberCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/MaxOrderNumberCommand.cs@@ -1,9 +1,8 @@using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class MaxOrderNumberCommand : IRequest<int?>{- public class MaxOrderNumberCommand : IRequest<int?>- {- public int? OrderNumber { get; set; }- }-}+ public int? OrderNumber { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyPaidOfflineCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyPaidOfflineCommand.csindex c228bbbbb..8aa858f7a 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyPaidOfflineCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyPaidOfflineCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class PartiallyPaidOfflineCommand : IRequest<bool>{- public class PartiallyPaidOfflineCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- public double AmountToPaid { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+ public double AmountToPaid { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundCommand.csindex bd01069dc..2af5169dc 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class PartiallyRefundCommand : IRequest<IList<string>>{- public class PartiallyRefundCommand : IRequest<IList<string>>- {- public PaymentTransaction PaymentTransaction { get; set; }- public double AmountToRefund { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+ public double AmountToRefund { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundOfflineCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundOfflineCommand.csindex fdaff4f39..606a19af3 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundOfflineCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PartiallyRefundOfflineCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class PartiallyRefundOfflineCommand : IRequest<bool>{- public class PartiallyRefundOfflineCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- public double AmountToRefund { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+ public double AmountToRefund { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PlaceOrderCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PlaceOrderCommand.csindex 05f5553b0..dfa3e2f12 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PlaceOrderCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PlaceOrderCommand.cs@@ -1,10 +1,8 @@using Grand.Business.Core.Utilities.Checkout;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders-{- public class PlaceOrderCommand : IRequest<PlaceOrderResult>- {+namespace Grand.Business.Core.Commands.Checkout.Orders;- }-}+public class PlaceOrderCommand : IRequest<PlaceOrderResult>+{+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PrepareOrderCodeCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PrepareOrderCodeCommand.csindex b386bf595..805131016 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PrepareOrderCodeCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/PrepareOrderCodeCommand.cs@@ -1,8 +1,7 @@using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class PrepareOrderCodeCommand : IRequest<string>{- public class PrepareOrderCodeCommand : IRequest<string>- {- }-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ProcessOrderPaidCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ProcessOrderPaidCommand.csindex 76ebec15b..e18c3b4a4 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ProcessOrderPaidCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ProcessOrderPaidCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ProcessOrderPaidCommand : IRequest<bool>{- public class ProcessOrderPaidCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReOrderCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReOrderCommand.csindex f9e978f00..f72f239da 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReOrderCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReOrderCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ReOrderCommand : IRequest<IList<string>>{- public class ReOrderCommand : IRequest<IList<string>>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReduceLoyaltyPointsCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReduceLoyaltyPointsCommand.csindex e6a31c0f6..8b2df6554 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReduceLoyaltyPointsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReduceLoyaltyPointsCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ReduceLoyaltyPointsCommand : IRequest<bool>{- public class ReduceLoyaltyPointsCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundCommand.csindex 17a709b64..d57364541 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class RefundCommand : IRequest<IList<string>>{- public class RefundCommand : IRequest<IList<string>>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundOfflineCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundOfflineCommand.csindex 05c06473d..ceee391ff 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundOfflineCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/RefundOfflineCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class RefundOfflineCommand : IRequest<bool>{- public class RefundOfflineCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReturnBackRedeemedLoyaltyPointsCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReturnBackRedeemedLoyaltyPointsCommand.csindex e96976476..ce517d3b9 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReturnBackRedeemedLoyaltyPointsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ReturnBackRedeemedLoyaltyPointsCommand.cs@@ -1,9 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders++namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ReturnBackRedeemedLoyaltyPointsCommand : IRequest<bool>{- public class ReturnBackRedeemedLoyaltyPointsCommand : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/SetOrderStatusCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/SetOrderStatusCommand.csindex 090d4a1fc..2b3f92316 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/SetOrderStatusCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/SetOrderStatusCommand.cs@@ -1,13 +1,12 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class SetOrderStatusCommand : IRequest<bool>{- public class SetOrderStatusCommand : IRequest<bool>- {- public Order Order { get; set; }- public OrderStatusSystem Os { get; set; }- public bool NotifyCustomer { get; set; }- public bool NotifyStoreOwner { get; set; }- }-}+ public Order Order { get; set; }+ public OrderStatusSystem Os { get; set; }+ public bool NotifyCustomer { get; set; }+ public bool NotifyStoreOwner { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/UpdateOrderItemCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/UpdateOrderItemCommand.csindex e78664cc2..09a43ab3f 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/UpdateOrderItemCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/UpdateOrderItemCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class UpdateOrderItemCommand : IRequest<bool>{- public class UpdateOrderItemCommand : IRequest<bool>- {- public Order Order { get; set; }- public OrderItem OrderItem { get; set; }- }-}+ public Order Order { get; set; }+ public OrderItem OrderItem { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ValidateMinShoppingCartSubtotalAmountCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ValidateMinShoppingCartSubtotalAmountCommand.csindex bb55c67b7..0193571e7 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ValidateMinShoppingCartSubtotalAmountCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/ValidateMinShoppingCartSubtotalAmountCommand.cs@@ -2,11 +2,10 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class ValidateMinShoppingCartSubtotalAmountCommand : IRequest<bool>{- public class ValidateMinShoppingCartSubtotalAmountCommand : IRequest<bool>- {- public Customer Customer { get; set; }- public IList<ShoppingCartItem> Cart { get; set; }- }-}+ public Customer Customer { get; set; }+ public IList<ShoppingCartItem> Cart { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidCommand.csindex 0f27cd011..ac3cc0863 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class VoidCommand : IRequest<IList<string>>{- public class VoidCommand : IRequest<IList<string>>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidOfflineCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidOfflineCommand.csindex 22f184211..bd9383484 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidOfflineCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Orders/VoidOfflineCommand.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Orders+namespace Grand.Business.Core.Commands.Checkout.Orders;++public class VoidOfflineCommand : IRequest<bool>{- public class VoidOfflineCommand : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/DeliveryCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/DeliveryCommand.csindex 0129a76c6..967e0cae9 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/DeliveryCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/DeliveryCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Shipping+namespace Grand.Business.Core.Commands.Checkout.Shipping;++public class DeliveryCommand : IRequest<bool>{- public class DeliveryCommand : IRequest<bool>- {- public Shipment Shipment { get; set; }- public bool NotifyCustomer { get; set; }- }-}+ public Shipment Shipment { get; set; }+ public bool NotifyCustomer { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/ShipCommand.cs b/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/ShipCommand.csindex 6442e041e..24fa59db4 100644--- a/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/ShipCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Checkout/Shipping/ShipCommand.cs@@ -1,11 +1,10 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Commands.Checkout.Shipping+namespace Grand.Business.Core.Commands.Checkout.Shipping;++public class ShipCommand : IRequest<bool>{- public class ShipCommand : IRequest<bool>- {- public Shipment Shipment { get; set; }- public bool NotifyCustomer { get; set; }- }-}+ public Shipment Shipment { get; set; }+ public bool NotifyCustomer { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Customers/ActiveVendorCommand.cs b/src/Business/Grand.Business.Core/Commands/Customers/ActiveVendorCommand.csindex ce4324ed8..aed60b24f 100644--- a/src/Business/Grand.Business.Core/Commands/Customers/ActiveVendorCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Customers/ActiveVendorCommand.cs@@ -1,12 +1,11 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Commands.Customers+namespace Grand.Business.Core.Commands.Customers;++public class ActiveVendorCommand : IRequest<bool>{- public class ActiveVendorCommand : IRequest<bool>- {- public Vendor Vendor { get; set; }- public bool Active { get; set; }- public IList<string> CustomerIds { get; set; } = new List<string>();- }-}+ public Vendor Vendor { get; set; }+ public bool Active { get; set; }+ public IList<string> CustomerIds { get; set; } = new List<string>();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Customers/RegisteredByExternalMethod.cs b/src/Business/Grand.Business.Core/Commands/Customers/RegisteredByExternalMethod.csindex 0721586db..ac1f03ede 100644--- a/src/Business/Grand.Business.Core/Commands/Customers/RegisteredByExternalMethod.cs+++ b/src/Business/Grand.Business.Core/Commands/Customers/RegisteredByExternalMethod.cs@@ -2,29 +2,28 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Commands.Customers+namespace Grand.Business.Core.Commands.Customers;++/// <summary>+/// Automatic customer registration by external authentication method event+/// </summary>+public class RegisteredByExternalMethod : INotification{- /// <summary>- /// Automatic customer registration by external authentication method event- /// </summary>- public class RegisteredByExternalMethod : INotification+ public RegisteredByExternalMethod(+ Customer customer,+ ExternalAuthParam parameters){- public RegisteredByExternalMethod(- Customer customer,- ExternalAuthParam parameters)- {- Customer = customer;- AuthenticationParameters = parameters;- }+ Customer = customer;+ AuthenticationParameters = parameters;+ }- /// <summary>- /// Gets or sets specified customer- /// </summary>- public Customer Customer { get; private set; }+ /// <summary>+ /// Gets or sets specified customer+ /// </summary>+ public Customer Customer { get; private set; }- /// <summary>- /// Gets or sets parameters of external authentication- /// </summary>- public ExternalAuthParam AuthenticationParameters { get; private set; }- }-}+ /// <summary>+ /// Gets or sets parameters of external authentication+ /// </summary>+ public ExternalAuthParam AuthenticationParameters { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Common/InsertContactUsCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Common/InsertContactUsCommand.csindex 91f2077dd..1d4f7c85b 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Common/InsertContactUsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Common/InsertContactUsCommand.cs@@ -1,21 +1,19 @@using Grand.Domain.Common;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Common-{- public class InsertContactUsCommand : IRequest<bool>- {- public string CustomerId { get; set; }- public string StoreId { get; set; }- public string VendorId { get; set; }- public string Email { get; set; }- public string FullName { get; set; }- public string Subject { get; set; }- public string Enquiry { get; set; }- public string RemoteIpAddress { get; set; }- public string ContactAttributeDescription { get; set; }- public IList<CustomAttribute> ContactAttributes { get; set; }- public string EmailAccountId { get; set; }- }+namespace Grand.Business.Core.Commands.Messages.Common;-}+public class InsertContactUsCommand : IRequest<bool>+{+ public string CustomerId { get; set; }+ public string StoreId { get; set; }+ public string VendorId { get; set; }+ public string Email { get; set; }+ public string FullName { get; set; }+ public string Subject { get; set; }+ public string Enquiry { get; set; }+ public string RemoteIpAddress { get; set; }+ public string ContactAttributeDescription { get; set; }+ public IList<CustomAttribute> ContactAttributes { get; set; }+ public string EmailAccountId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAttributeCombinationTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAttributeCombinationTokensCommand.csindex 665c37fd9..c4c081bf1 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAttributeCombinationTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAttributeCombinationTokensCommand.cs@@ -2,11 +2,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetAttributeCombinationTokensCommand : IRequest<LiquidAttributeCombination>{- public class GetAttributeCombinationTokensCommand : IRequest<LiquidAttributeCombination>- {- public Product Product { get; set; }- public ProductAttributeCombination Combination { get; set; }- }-}+ public Product Product { get; set; }+ public ProductAttributeCombination Combination { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAuctionTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAuctionTokensCommand.csindex c0a747b3b..2649c8913 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAuctionTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetAuctionTokensCommand.cs@@ -2,11 +2,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetAuctionTokensCommand : IRequest<LiquidAuctions>{- public class GetAuctionTokensCommand : IRequest<LiquidAuctions>- {- public Product Product { get; set; }- public Bid Bid { get; set; }- }-}+ public Product Product { get; set; }+ public Bid Bid { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetGiftVoucherTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetGiftVoucherTokensCommand.csindex 60734f8ab..bb2c4303d 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetGiftVoucherTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetGiftVoucherTokensCommand.cs@@ -3,11 +3,10 @@ using Grand.Domain.Localization;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetGiftVoucherTokensCommand : IRequest<LiquidGiftVoucher>{- public class GetGiftVoucherTokensCommand : IRequest<LiquidGiftVoucher>- {- public GiftVoucher GiftVoucher { get; set; }- public Language Language { get; set; }- }-}+ public GiftVoucher GiftVoucher { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetMerchandiseReturnTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetMerchandiseReturnTokensCommand.csindex 5ecaa2ca2..41b4e371b 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetMerchandiseReturnTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetMerchandiseReturnTokensCommand.cs@@ -4,15 +4,14 @@ using Grand.Domain.Orders;using Grand.Domain.Stores;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetMerchandiseReturnTokensCommand : IRequest<LiquidMerchandiseReturn>{- public class GetMerchandiseReturnTokensCommand : IRequest<LiquidMerchandiseReturn>- {- public MerchandiseReturn MerchandiseReturn { get; set; }- public Store Store { get; set; }- public Order Order { get; set; }- public DomainHost Host { get; set; }- public Language Language { get; set; }- public MerchandiseReturnNote MerchandiseReturnNote { get; set; } = null;- }-}+ public MerchandiseReturn MerchandiseReturn { get; set; }+ public Store Store { get; set; }+ public Order Order { get; set; }+ public DomainHost Host { get; set; }+ public Language Language { get; set; }+ public MerchandiseReturnNote MerchandiseReturnNote { get; set; } = null;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetOrderTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetOrderTokensCommand.csindex 8764a78c0..de3361880 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetOrderTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetOrderTokensCommand.cs@@ -5,16 +5,15 @@ using Grand.Domain.Stores;using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetOrderTokensCommand : IRequest<LiquidOrder>{- public class GetOrderTokensCommand : IRequest<LiquidOrder>- {- public Order Order { get; set; }- public Customer Customer { get; set; }- public Store Store { get; set; }- public DomainHost Host { get; set; }- public OrderNote OrderNote { get; set; } = null;- public Vendor Vendor { get; set; } = null;- public double RefundedAmount { get; set; } = 0;- }-}+ public Order Order { get; set; }+ public Customer Customer { get; set; }+ public Store Store { get; set; }+ public DomainHost Host { get; set; }+ public OrderNote OrderNote { get; set; } = null;+ public Vendor Vendor { get; set; } = null;+ public double RefundedAmount { get; set; } = 0;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShipmentTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShipmentTokensCommand.csindex fa6fa4887..4f6e14825 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShipmentTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShipmentTokensCommand.cs@@ -5,14 +5,13 @@ using Grand.Domain.Shipping;using Grand.Domain.Stores;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetShipmentTokensCommand : IRequest<LiquidShipment>{- public class GetShipmentTokensCommand : IRequest<LiquidShipment>- {- public Shipment Shipment { get; set; }- public Order Order { get; set; }- public Store Store { get; set; }- public DomainHost Host { get; set; }- public Language Language { get; set; }- }-}+ public Shipment Shipment { get; set; }+ public Order Order { get; set; }+ public Store Store { get; set; }+ public DomainHost Host { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShoppingCartTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShoppingCartTokensCommand.csindex d134ef983..291d8093f 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShoppingCartTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetShoppingCartTokensCommand.cs@@ -4,12 +4,11 @@ using Grand.Domain.Localization;using Grand.Domain.Stores;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetShoppingCartTokensCommand : IRequest<LiquidShoppingCart>{- public class GetShoppingCartTokensCommand : IRequest<LiquidShoppingCart>- {- public Customer Customer { get; set; }- public Store Store { get; set; }- public Language Language { get; set; }- }-}+ public Customer Customer { get; set; }+ public Store Store { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetStoreTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetStoreTokensCommand.csindex a002d8c86..345436876 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetStoreTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetStoreTokensCommand.cs@@ -4,12 +4,11 @@ using Grand.Domain.Messages;using Grand.Domain.Stores;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetStoreTokensCommand : IRequest<LiquidStore>{- public class GetStoreTokensCommand : IRequest<LiquidStore>- {- public Store Store { get; set; }- public Language Language { get; set; }- public EmailAccount EmailAccount { get; set; }- }-}+ public Store Store { get; set; }+ public Language Language { get; set; }+ public EmailAccount EmailAccount { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetVendorTokensCommand.cs b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetVendorTokensCommand.csindex ea91ade59..8381e6cd5 100644--- a/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetVendorTokensCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/Messages/Tokens/GetVendorTokensCommand.cs@@ -3,11 +3,10 @@ using Grand.Domain.Localization;using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Commands.Messages.Tokens+namespace Grand.Business.Core.Commands.Messages.Tokens;++public class GetVendorTokensCommand : IRequest<LiquidVendor>{- public class GetVendorTokensCommand : IRequest<LiquidVendor>- {- public Vendor Vendor { get; set; }- public Language Language { get; set; }- }-}+ public Vendor Vendor { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/System/Common/ClearMostViewedCommand.cs b/src/Business/Grand.Business.Core/Commands/System/Common/ClearMostViewedCommand.csindex a2aad7892..6d2bf8516 100644--- a/src/Business/Grand.Business.Core/Commands/System/Common/ClearMostViewedCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/System/Common/ClearMostViewedCommand.cs@@ -1,8 +1,7 @@using MediatR;-namespace Grand.Business.Core.Commands.System.Common+namespace Grand.Business.Core.Commands.System.Common;++public class ClearMostViewedCommand : IRequest<bool>{- public class ClearMostViewedCommand : IRequest<bool>- {- }-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/System/Common/GetSitemapXmlCommand.cs b/src/Business/Grand.Business.Core/Commands/System/Common/GetSitemapXmlCommand.csindex 61ee9c5c5..c59adfd35 100644--- a/src/Business/Grand.Business.Core/Commands/System/Common/GetSitemapXmlCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/System/Common/GetSitemapXmlCommand.cs@@ -2,11 +2,10 @@using Grand.Domain.Stores;using MediatR;-namespace Grand.Business.Core.Commands.System.Common+namespace Grand.Business.Core.Commands.System.Common;++public class GetSitemapXmlCommand : IRequest<string>{- public class GetSitemapXmlCommand : IRequest<string>- {- public Store Store { get; set; }- public Language Language { get; set; }- }-}+ public Store Store { get; set; }+ public Language Language { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/System/Security/InstallNewPermissionsCommand.cs b/src/Business/Grand.Business.Core/Commands/System/Security/InstallNewPermissionsCommand.csindex 83e845621..440aca796 100644--- a/src/Business/Grand.Business.Core/Commands/System/Security/InstallNewPermissionsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/System/Security/InstallNewPermissionsCommand.cs@@ -1,10 +1,9 @@using Grand.Business.Core.Interfaces.Common.Security;using MediatR;-namespace Grand.Business.Core.Commands.System.Security+namespace Grand.Business.Core.Commands.System.Security;++public class InstallNewPermissionsCommand : IRequest<bool>{- public class InstallNewPermissionsCommand : IRequest<bool>- {- public IPermissionProvider PermissionProvider { get; set; }- }-}+ public IPermissionProvider PermissionProvider { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/System/Security/InstallPermissionsCommand.cs b/src/Business/Grand.Business.Core/Commands/System/Security/InstallPermissionsCommand.csindex ffd0486ba..3884284a4 100644--- a/src/Business/Grand.Business.Core/Commands/System/Security/InstallPermissionsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/System/Security/InstallPermissionsCommand.cs@@ -1,10 +1,9 @@using Grand.Business.Core.Interfaces.Common.Security;using MediatR;-namespace Grand.Business.Core.Commands.System.Security+namespace Grand.Business.Core.Commands.System.Security;++public class InstallPermissionsCommand : IRequest<bool>{- public class InstallPermissionsCommand : IRequest<bool>- {- public IPermissionProvider PermissionProvider { get; set; }- }-}+ public IPermissionProvider PermissionProvider { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Commands/System/Security/UninstallPermissionsCommand.cs b/src/Business/Grand.Business.Core/Commands/System/Security/UninstallPermissionsCommand.csindex cdb28cf71..c0e71fd35 100644--- a/src/Business/Grand.Business.Core/Commands/System/Security/UninstallPermissionsCommand.cs+++ b/src/Business/Grand.Business.Core/Commands/System/Security/UninstallPermissionsCommand.cs@@ -1,10 +1,9 @@using Grand.Business.Core.Interfaces.Common.Security;using MediatR;-namespace Grand.Business.Core.Commands.System.Security+namespace Grand.Business.Core.Commands.System.Security;++public class UninstallPermissionsCommand : IRequest<bool>{- public class UninstallPermissionsCommand : IRequest<bool>- {- public IPermissionProvider PermissionProvider { get; set; }- }-}+ public IPermissionProvider PermissionProvider { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Dto/BrandDto.cs b/src/Business/Grand.Business.Core/Dto/BrandDto.csindex ed19d3c87..2d5169c3a 100644--- a/src/Business/Grand.Business.Core/Dto/BrandDto.cs+++ b/src/Business/Grand.Business.Core/Dto/BrandDto.cs@@ -1,26 +1,25 @@-namespace Grand.Business.Core.Dto+namespace Grand.Business.Core.Dto;++public class BrandDto{- public class BrandDto- {- public string Id { get; set; }- public string Name { get; set; }- public string SeName { get; set; }- public string Picture { get; set; }- public string Description { get; set; }- public string BottomDescription { get; set; }- public string BrandLayoutId { get; set; }- public string MetaKeywords { get; set; }- public string MetaDescription { get; set; }- public string MetaTitle { get; set; }- public int? PageSize { get; set; }- public bool? AllowCustomersToSelectPageSize { get; set; }- public string PageSizeOptions { get; set; }- public bool? ShowOnHomePage { get; set; }- public bool? IncludeInMenu { get; set; }- public string Icon { get; set; }- public int? DefaultSort { get; set; }- public string ExternalId { get; set; }- public bool? Published { get; set; }- public int? DisplayOrder { get; set; }- }-}+ public string Id { get; set; }+ public string Name { get; set; }+ public string SeName { get; set; }+ public string Picture { get; set; }+ public string Description { get; set; }+ public string BottomDescription { get; set; }+ public string BrandLayoutId { get; set; }+ public string MetaKeywords { get; set; }+ public string MetaDescription { get; set; }+ public string MetaTitle { get; set; }+ public int? PageSize { get; set; }+ public bool? AllowCustomersToSelectPageSize { get; set; }+ public string PageSizeOptions { get; set; }+ public bool? ShowOnHomePage { get; set; }+ public bool? IncludeInMenu { get; set; }+ public string Icon { get; set; }+ public int? DefaultSort { get; set; }+ public string ExternalId { get; set; }+ public bool? Published { get; set; }+ public int? DisplayOrder { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Dto/CategoryDto.cs b/src/Business/Grand.Business.Core/Dto/CategoryDto.csindex 097095da9..d3de7c3ed 100644--- a/src/Business/Grand.Business.Core/Dto/CategoryDto.cs+++ b/src/Business/Grand.Business.Core/Dto/CategoryDto.cs@@ -1,34 +1,32 @@-namespace Grand.Business.Core.Dto-{- public class CategoryDto- {- public string Id { get; set; }- public string Name { get; set; }- public string CategoryLayoutId { get; set; }- public string Picture { get; set; }- public string SeName { get; set; }- public string Description { get; set; }- public string BottomDescription { get; set; }- public string MetaKeywords { get; set; }- public string MetaDescription { get; set; }- public string MetaTitle { get; set; }- public string ParentCategoryId { get; set; }- public int? PageSize { get; set; }- public bool? AllowCustomersToSelectPageSize { get; set; }- public string PageSizeOptions { get; set; }- public bool? ShowOnHomePage { get; set; }- public bool? FeaturedProductsOnHomePage { get; set; }- public bool? ShowOnSearchBox { get; set; }- public int? SearchBoxDisplayOrder { get; set; }- public bool? IncludeInMenu { get; set; }- public bool? Published { get; set; }- public int? DisplayOrder { get; set; }- public string ExternalId { get; set; }- public string Flag { get; set; }- public string FlagStyle { get; set; }- public string Icon { get; set; }- public int? DefaultSort { get; set; }- public bool? HideOnCatalog { get; set; }+namespace Grand.Business.Core.Dto;- }-}+public class CategoryDto+{+ public string Id { get; set; }+ public string Name { get; set; }+ public string CategoryLayoutId { get; set; }+ public string Picture { get; set; }+ public string SeName { get; set; }+ public string Description { get; set; }+ public string BottomDescription { get; set; }+ public string MetaKeywords { get; set; }+ public string MetaDescription { get; set; }+ public string MetaTitle { get; set; }+ public string ParentCategoryId { get; set; }+ public int? PageSize { get; set; }+ public bool? AllowCustomersToSelectPageSize { get; set; }+ public string PageSizeOptions { get; set; }+ public bool? ShowOnHomePage { get; set; }+ public bool? FeaturedProductsOnHomePage { get; set; }+ public bool? ShowOnSearchBox { get; set; }+ public int? SearchBoxDisplayOrder { get; set; }+ public bool? IncludeInMenu { get; set; }+ public bool? Published { get; set; }+ public int? DisplayOrder { get; set; }+ public string ExternalId { get; set; }+ public string Flag { get; set; }+ public string FlagStyle { get; set; }+ public string Icon { get; set; }+ public int? DefaultSort { get; set; }+ public bool? HideOnCatalog { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Dto/CollectionDto.cs b/src/Business/Grand.Business.Core/Dto/CollectionDto.csindex 3edb1149e..3058e45ff 100644--- a/src/Business/Grand.Business.Core/Dto/CollectionDto.cs+++ b/src/Business/Grand.Business.Core/Dto/CollectionDto.cs@@ -1,28 +1,26 @@-namespace Grand.Business.Core.Dto-{- public class CollectionDto- {- public string Id { get; set; }- public string Name { get; set; }- public string Picture { get; set; }- public string SeName { get; set; }- public string Description { get; set; }- public string BottomDescription { get; set; }- public string CollectionLayoutId { get; set; }- public string MetaKeywords { get; set; }- public string MetaDescription { get; set; }- public string MetaTitle { get; set; }- public int? PageSize { get; set; }- public bool? AllowCustomersToSelectPageSize { get; set; }- public string PageSizeOptions { get; set; }- public bool? ShowOnHomePage { get; set; }- public bool? FeaturedProductsOnHomePage { get; set; }- public bool? IncludeInMenu { get; set; }- public string Icon { get; set; }- public int? DefaultSort { get; set; } = -1;- public bool? Published { get; set; }- public int? DisplayOrder { get; set; }- public string ExternalId { get; set; }+namespace Grand.Business.Core.Dto;- }-}+public class CollectionDto+{+ public string Id { get; set; }+ public string Name { get; set; }+ public string Picture { get; set; }+ public string SeName { get; set; }+ public string Description { get; set; }+ public string BottomDescription { get; set; }+ public string CollectionLayoutId { get; set; }+ public string MetaKeywords { get; set; }+ public string MetaDescription { get; set; }+ public string MetaTitle { get; set; }+ public int? PageSize { get; set; }+ public bool? AllowCustomersToSelectPageSize { get; set; }+ public string PageSizeOptions { get; set; }+ public bool? ShowOnHomePage { get; set; }+ public bool? FeaturedProductsOnHomePage { get; set; }+ public bool? IncludeInMenu { get; set; }+ public string Icon { get; set; }+ public int? DefaultSort { get; set; } = -1;+ public bool? Published { get; set; }+ public int? DisplayOrder { get; set; }+ public string ExternalId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Dto/CountryStatesDto.cs b/src/Business/Grand.Business.Core/Dto/CountryStatesDto.csindex 420d3dd9a..f905c4ac0 100644--- a/src/Business/Grand.Business.Core/Dto/CountryStatesDto.cs+++ b/src/Business/Grand.Business.Core/Dto/CountryStatesDto.cs@@ -1,11 +1,10 @@-namespace Grand.Business.Core.Dto+namespace Grand.Business.Core.Dto;++public class CountryStatesDto{- public class CountryStatesDto- {- public string Country { get; set; }- public string StateProvinceName { get; set; }- public string Abbreviation { get; set; }- public int DisplayOrder { get; set; }- public bool Published { get; set; }- }-}+ public string Country { get; set; }+ public string StateProvinceName { get; set; }+ public string Abbreviation { get; set; }+ public int DisplayOrder { get; set; }+ public bool Published { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Dto/ProductDto.cs b/src/Business/Grand.Business.Core/Dto/ProductDto.csindex 5cd64f43e..fcef42ab9 100644--- a/src/Business/Grand.Business.Core/Dto/ProductDto.cs+++ b/src/Business/Grand.Business.Core/Dto/ProductDto.cs@@ -1,120 +1,119 @@-namespace Grand.Business.Core.Dto+namespace Grand.Business.Core.Dto;++public class ProductDto{- public class ProductDto- {- public string Id { get; set; }- public int? ProductTypeId { get; set; }- public string ParentGroupedProductId { get; set; }- public bool? VisibleIndividually { get; set; }- public string Name { get; set; }- public string SeName { get; set; }- public string ShortDescription { get; set; }- public string FullDescription { get; set; }- public string AdminComment { get; set; }- public string ProductLayoutId { get; set; }- public string BrandId { get; set; }- public string VendorId { get; set; }- public bool? ShowOnHomePage { get; set; }- public bool? BestSeller { get; set; }- public string MetaKeywords { get; set; }- public string MetaDescription { get; set; }- public string MetaTitle { get; set; }- public bool? AllowCustomerReviews { get; set; }- public int? ApprovedRatingSum { get; set; }- public int? NotApprovedRatingSum { get; set; }- public int? ApprovedTotalReviews { get; set; }- public int? NotApprovedTotalReviews { get; set; }- public string ExternalId { get; set; }- public string Sku { get; set; }- public string Mpn { get; set; }- public string Gtin { get; set; }- public bool? IsGiftVoucher { get; set; }- public int? GiftVoucherTypeId { get; set; }- public double? OverGiftAmount { get; set; }- public bool? RequireOtherProducts { get; set; }- public string RequiredProductIds { get; set; }- public bool? AutoAddRequiredProducts { get; set; }- public bool? IsDownload { get; set; }- public bool? UnlimitedDownloads { get; set; }- public int? MaxNumberOfDownloads { get; set; }- public int? DownloadExpirationDays { get; set; }- public int? DownloadActivationTypeId { get; set; }- public bool? HasSampleDownload { get; set; }- public bool? HasUserAgreement { get; set; }- public string UserAgreementText { get; set; }- public bool? IsRecurring { get; set; }- public int? RecurringCycleLength { get; set; }- public int? RecurringCyclePeriodId { get; set; }- public int? RecurringTotalCycles { get; set; }- public bool? IncBothDate { get; set; }- public int? Interval { get; set; }- public int? IntervalUnitId { get; set; }- public bool? IsShipEnabled { get; set; }- public bool? IsFreeShipping { get; set; }- public bool? ShipSeparately { get; set; }- public double? AdditionalShippingCharge { get; set; }- public string DeliveryDateId { get; set; }- public bool? IsTaxExempt { get; set; }- public string TaxCategoryId { get; set; }- public bool? IsTele { get; set; }- public int? ManageInventoryMethodId { get; set; }- public bool? UseMultipleWarehouses { get; set; }- public string WarehouseId { get; set; }- public int? StockQuantity { get; set; }- public int? ReservedQuantity { get; set; }- public bool? StockAvailability { get; set; }- public bool? DisplayStockQuantity { get; set; }- public int? MinStockQuantity { get; set; }- public bool? LowStock { get; set; }- public int? LowStockActivityId { get; set; }- public int? NotifyAdminForQuantityBelow { get; set; }- public int? BackorderModeId { get; set; }- public bool? AllowOutOfStockSubscriptions { get; set; }- public int? OrderMinimumQuantity { get; set; }- public int? OrderMaximumQuantity { get; set; }- public string AllowedQuantities { get; set; }- public bool? NotReturnable { get; set; }- public bool? DisableBuyButton { get; set; }- public bool? DisableWishlistButton { get; set; }- public bool? AvailableForPreOrder { get; set; }- public DateTime? PreOrderDateTimeUtc { get; set; }- public bool? CallForPrice { get; set; }- public double? Price { get; set; }- public double? OldPrice { get; set; }- public double? CatalogPrice { get; set; }- public double? ProductCost { get; set; }- public bool? EnteredPrice { get; set; }- public double? MinEnteredPrice { get; set; }- public double? MaxEnteredPrice { get; set; }- public bool? BasePriceEnabled { get; set; }- public double? BasePriceAmount { get; set; }- public string BasePriceUnitId { get; set; }- public double? BasePriceBaseAmount { get; set; }- public string BasePriceBaseUnitId { get; set; }- public string UnitId { get; set; }- public string CourseId { get; set; }- public bool? MarkAsNew { get; set; }- public DateTime? MarkAsNewStartDateTimeUtc { get; set; }- public DateTime? MarkAsNewEndDateTimeUtc { get; set; }- public double? Weight { get; set; }- public double? Length { get; set; }- public double? Width { get; set; }- public double? Height { get; set; }- public DateTime? AvailableStartDateTimeUtc { get; set; }- public DateTime? AvailableEndDateTimeUtc { get; set; }- public int? DisplayOrder { get; set; }- public int? DisplayOrderCategory { get; set; }- public int? DisplayOrderBrand { get; set; }- public int? DisplayOrderCollection { get; set; }- public bool? Published { get; set; }- public int? Sold { get; set; }- public Int64? Viewed { get; set; }- public int? OnSale { get; set; }- public string Flag { get; set; }- public string CategoryIds { get; set; }- public string CollectionIds { get; set; }- public string Picture1 { get; set; }- public string Picture2 { get; set; }- public string Picture3 { get; set; }- }-}+ public string Id { get; set; }+ public int? ProductTypeId { get; set; }+ public string ParentGroupedProductId { get; set; }+ public bool? VisibleIndividually { get; set; }+ public string Name { get; set; }+ public string SeName { get; set; }+ public string ShortDescription { get; set; }+ public string FullDescription { get; set; }+ public string AdminComment { get; set; }+ public string ProductLayoutId { get; set; }+ public string BrandId { get; set; }+ public string VendorId { get; set; }+ public bool? ShowOnHomePage { get; set; }+ public bool? BestSeller { get; set; }+ public string MetaKeywords { get; set; }+ public string MetaDescription { get; set; }+ public string MetaTitle { get; set; }+ public bool? AllowCustomerReviews { get; set; }+ public int? ApprovedRatingSum { get; set; }+ public int? NotApprovedRatingSum { get; set; }+ public int? ApprovedTotalReviews { get; set; }+ public int? NotApprovedTotalReviews { get; set; }+ public string ExternalId { get; set; }+ public string Sku { get; set; }+ public string Mpn { get; set; }+ public string Gtin { get; set; }+ public bool? IsGiftVoucher { get; set; }+ public int? GiftVoucherTypeId { get; set; }+ public double? OverGiftAmount { get; set; }+ public bool? RequireOtherProducts { get; set; }+ public string RequiredProductIds { get; set; }+ public bool? AutoAddRequiredProducts { get; set; }+ public bool? IsDownload { get; set; }+ public bool? UnlimitedDownloads { get; set; }+ public int? MaxNumberOfDownloads { get; set; }+ public int? DownloadExpirationDays { get; set; }+ public int? DownloadActivationTypeId { get; set; }+ public bool? HasSampleDownload { get; set; }+ public bool? HasUserAgreement { get; set; }+ public string UserAgreementText { get; set; }+ public bool? IsRecurring { get; set; }+ public int? RecurringCycleLength { get; set; }+ public int? RecurringCyclePeriodId { get; set; }+ public int? RecurringTotalCycles { get; set; }+ public bool? IncBothDate { get; set; }+ public int? Interval { get; set; }+ public int? IntervalUnitId { get; set; }+ public bool? IsShipEnabled { get; set; }+ public bool? IsFreeShipping { get; set; }+ public bool? ShipSeparately { get; set; }+ public double? AdditionalShippingCharge { get; set; }+ public string DeliveryDateId { get; set; }+ public bool? IsTaxExempt { get; set; }+ public string TaxCategoryId { get; set; }+ public bool? IsTele { get; set; }+ public int? ManageInventoryMethodId { get; set; }+ public bool? UseMultipleWarehouses { get; set; }+ public string WarehouseId { get; set; }+ public int? StockQuantity { get; set; }+ public int? ReservedQuantity { get; set; }+ public bool? StockAvailability { get; set; }+ public bool? DisplayStockQuantity { get; set; }+ public int? MinStockQuantity { get; set; }+ public bool? LowStock { get; set; }+ public int? LowStockActivityId { get; set; }+ public int? NotifyAdminForQuantityBelow { get; set; }+ public int? BackorderModeId { get; set; }+ public bool? AllowOutOfStockSubscriptions { get; set; }+ public int? OrderMinimumQuantity { get; set; }+ public int? OrderMaximumQuantity { get; set; }+ public string AllowedQuantities { get; set; }+ public bool? NotReturnable { get; set; }+ public bool? DisableBuyButton { get; set; }+ public bool? DisableWishlistButton { get; set; }+ public bool? AvailableForPreOrder { get; set; }+ public DateTime? PreOrderDateTimeUtc { get; set; }+ public bool? CallForPrice { get; set; }+ public double? Price { get; set; }+ public double? OldPrice { get; set; }+ public double? CatalogPrice { get; set; }+ public double? ProductCost { get; set; }+ public bool? EnteredPrice { get; set; }+ public double? MinEnteredPrice { get; set; }+ public double? MaxEnteredPrice { get; set; }+ public bool? BasePriceEnabled { get; set; }+ public double? BasePriceAmount { get; set; }+ public string BasePriceUnitId { get; set; }+ public double? BasePriceBaseAmount { get; set; }+ public string BasePriceBaseUnitId { get; set; }+ public string UnitId { get; set; }+ public string CourseId { get; set; }+ public bool? MarkAsNew { get; set; }+ public DateTime? MarkAsNewStartDateTimeUtc { get; set; }+ public DateTime? MarkAsNewEndDateTimeUtc { get; set; }+ public double? Weight { get; set; }+ public double? Length { get; set; }+ public double? Width { get; set; }+ public double? Height { get; set; }+ public DateTime? AvailableStartDateTimeUtc { get; set; }+ public DateTime? AvailableEndDateTimeUtc { get; set; }+ public int? DisplayOrder { get; set; }+ public int? DisplayOrderCategory { get; set; }+ public int? DisplayOrderBrand { get; set; }+ public int? DisplayOrderCollection { get; set; }+ public bool? Published { get; set; }+ public int? Sold { get; set; }+ public long? Viewed { get; set; }+ public int? OnSale { get; set; }+ public string Flag { get; set; }+ public string CategoryIds { get; set; }+ public string CollectionIds { get; set; }+ public string Picture1 { get; set; }+ public string Picture2 { get; set; }+ public string Picture3 { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Enums/Checkout/PaymentMethodType.cs b/src/Business/Grand.Business.Core/Enums/Checkout/PaymentMethodType.csindex c7e8c0a4e..af7ab8737 100644--- a/src/Business/Grand.Business.Core/Enums/Checkout/PaymentMethodType.cs+++ b/src/Business/Grand.Business.Core/Enums/Checkout/PaymentMethodType.cs@@ -1,12 +1,11 @@-namespace Grand.Business.Core.Enums.Checkout+namespace Grand.Business.Core.Enums.Checkout;++/// <summary>+/// Represents a payment method type+/// </summary>+public enum PaymentMethodType{- /// <summary>- /// Represents a payment method type- /// </summary>- public enum PaymentMethodType- {- Standard = 1,- Redirection = 2,- Other = 3- }-}+ Standard = 1,+ Redirection = 2,+ Other = 3+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Enums/Checkout/ShipmentStatusEvent.cs b/src/Business/Grand.Business.Core/Enums/Checkout/ShipmentStatusEvent.csindex 6de040eb6..31253c387 100644--- a/src/Business/Grand.Business.Core/Enums/Checkout/ShipmentStatusEvent.cs+++ b/src/Business/Grand.Business.Core/Enums/Checkout/ShipmentStatusEvent.cs@@ -1,25 +1,27 @@-namespace Grand.Business.Core.Enums.Checkout+namespace Grand.Business.Core.Enums.Checkout;++/// <summary>+/// Shipment status event+/// </summary>+public class ShipmentStatusEvent{/// <summary>- /// Shipment status event+ /// Event name/// </summary>- public class ShipmentStatusEvent- {- /// <summary>- /// Event name- /// </summary>- public string EventName { get; set; }- /// <summary>- /// Location- /// </summary>- public string Location { get; set; }- /// <summary>- /// two-letter country code- /// </summary>- public string CountryCode { get; set; }- /// <summary>- /// Date- /// </summary>- public DateTime? Date { get; set; }- }-}+ public string EventName { get; set; }++ /// <summary>+ /// Location+ /// </summary>+ public string Location { get; set; }++ /// <summary>+ /// two-letter country code+ /// </summary>+ public string CountryCode { get; set; }++ /// <summary>+ /// Date+ /// </summary>+ public DateTime? Date { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Enums/Checkout/ShippingRateCalculationType.cs b/src/Business/Grand.Business.Core/Enums/Checkout/ShippingRateCalculationType.csindex bc63f8527..445667ef7 100644--- a/src/Business/Grand.Business.Core/Enums/Checkout/ShippingRateCalculationType.cs+++ b/src/Business/Grand.Business.Core/Enums/Checkout/ShippingRateCalculationType.cs@@ -1,17 +1,17 @@-namespace Grand.Business.Core.Enums.Checkout+namespace Grand.Business.Core.Enums.Checkout;++/// <summary>+/// Represents a shipping rate method type+/// </summary>+public enum ShippingRateCalculationType{/// <summary>- /// Represents a shipping rate method type+ /// Off/// </summary>- public enum ShippingRateCalculationType- {- /// <summary>- /// Off- /// </summary>- Off = 0,- /// <summary>- /// Real- /// </summary>- Real = 10- }-}+ Off = 0,++ /// <summary>+ /// Real+ /// </summary>+ Real = 10+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Enums/Messages/SecureSocketOptions.cs b/src/Business/Grand.Business.Core/Enums/Messages/SecureSocketOptions.csindex 5330de659..cfc53d232 100644--- a/src/Business/Grand.Business.Core/Enums/Messages/SecureSocketOptions.cs+++ b/src/Business/Grand.Business.Core/Enums/Messages/SecureSocketOptions.cs@@ -1,33 +1,35 @@-namespace Grand.Business.Core.Enums.Messages+namespace Grand.Business.Core.Enums.Messages;++public enum SecureSocketOptions{- public enum SecureSocketOptions- {- //- // Summary:- // No SSL or TLS encryption should be used.- None = 0,- //- // Summary:- // Allow the MailKit.IMailService to decide which SSL or TLS options to use (default).- // If the server does not support SSL or TLS, then the connection will continue- // without any encryption.- Auto = 1,- //- // Summary:- // The connection should use SSL or TLS encryption immediately.- SslOnConnect = 2,- //- // Summary:- // Elevates the connection to use TLS encryption immediately after reading the greeting- // and capabilities of the server. If the server does not support the STARTTLS extension,- // then the connection will fail and a System.NotSupportedException will be thrown.- StartTls = 3,- //- // Summary:- // Elevates the connection to use TLS encryption immediately after reading the greeting- // and capabilities of the server, but only if the server supports the STARTTLS- // extension.- StartTlsWhenAvailable = 4+ //+ // Summary:+ // No SSL or TLS encryption should be used.+ None = 0,++ //+ // Summary:+ // Allow the MailKit.IMailService to decide which SSL or TLS options to use (default).+ // If the server does not support SSL or TLS, then the connection will continue+ // without any encryption.+ Auto = 1,++ //+ // Summary:+ // The connection should use SSL or TLS encryption immediately.+ SslOnConnect = 2,++ //+ // Summary:+ // Elevates the connection to use TLS encryption immediately after reading the greeting+ // and capabilities of the server. If the server does not support the STARTTLS extension,+ // then the connection will fail and a System.NotSupportedException will be thrown.+ StartTls = 3,- }-}+ //+ // Summary:+ // Elevates the connection to use TLS encryption immediately after reading the greeting+ // and capabilities of the server, but only if the server supports the STARTTLS+ // extension.+ StartTlsWhenAvailable = 4+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Catalog/ProductPublishEvent.cs b/src/Business/Grand.Business.Core/Events/Catalog/ProductPublishEvent.csindex 62b4e91c1..ea7f1a073 100644--- a/src/Business/Grand.Business.Core/Events/Catalog/ProductPublishEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Catalog/ProductPublishEvent.cs@@ -1,15 +1,14 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Events.Catalog+namespace Grand.Business.Core.Events.Catalog;++public class ProductPublishEvent : INotification{- public class ProductPublishEvent : INotification+ public ProductPublishEvent(Product product){- public ProductPublishEvent(Product product)- {- Product = product;- }-- public Product Product { get; private set; }+ Product = product;}-}++ public Product Product { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Catalog/ProductReviewApprovedEvent.cs b/src/Business/Grand.Business.Core/Events/Catalog/ProductReviewApprovedEvent.csindex a08f32c93..569e4661f 100644--- a/src/Business/Grand.Business.Core/Events/Catalog/ProductReviewApprovedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Catalog/ProductReviewApprovedEvent.cs@@ -1,18 +1,17 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Events.Catalog+namespace Grand.Business.Core.Events.Catalog;++/// <summary>+/// Event for product review approval+/// </summary>+public class ProductReviewApprovedEvent : INotification{- /// <summary>- /// Event for product review approval- /// </summary>- public class ProductReviewApprovedEvent : INotification+ public ProductReviewApprovedEvent(ProductReview productReview){- public ProductReviewApprovedEvent(ProductReview productReview)- {- ProductReview = productReview;- }-- public ProductReview ProductReview { get; private set; }+ ProductReview = productReview;}++ public ProductReview ProductReview { get; private set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Catalog/ProductUnPublishEvent.cs b/src/Business/Grand.Business.Core/Events/Catalog/ProductUnPublishEvent.csindex 84a0ea716..3fc9305e3 100644--- a/src/Business/Grand.Business.Core/Events/Catalog/ProductUnPublishEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Catalog/ProductUnPublishEvent.cs@@ -1,15 +1,14 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Events.Catalog+namespace Grand.Business.Core.Events.Catalog;++public class ProductUnPublishEvent : INotification{- public class ProductUnPublishEvent : INotification+ public ProductUnPublishEvent(Product product){- public ProductUnPublishEvent(Product product)- {- Product = product;- }-- public Product Product { get; private set; }+ Product = product;}-}++ public Product Product { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Catalog/UpdateProductOnCartEvent.cs b/src/Business/Grand.Business.Core/Events/Catalog/UpdateProductOnCartEvent.csindex 6fb1a54e9..531caebd3 100644--- a/src/Business/Grand.Business.Core/Events/Catalog/UpdateProductOnCartEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Catalog/UpdateProductOnCartEvent.cs@@ -1,17 +1,14 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Events.Catalog+namespace Grand.Business.Core.Events.Catalog;++public class UpdateProductOnCartEvent : INotification{- public class UpdateProductOnCartEvent : INotification+ public UpdateProductOnCartEvent(Product product){- private readonly Product _product;-- public UpdateProductOnCartEvent(Product product)- {- _product = product;- }-- public Product Product => _product;+ Product = product;}-}++ public Product Product { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Catalog/UpdateStockEvent.cs b/src/Business/Grand.Business.Core/Events/Catalog/UpdateStockEvent.csindex 14ade6380..97143b12c 100644--- a/src/Business/Grand.Business.Core/Events/Catalog/UpdateStockEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Catalog/UpdateStockEvent.cs@@ -1,17 +1,14 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Events.Catalog+namespace Grand.Business.Core.Events.Catalog;++public class UpdateStockEvent : INotification{- public class UpdateStockEvent : INotification+ public UpdateStockEvent(Product product){- private readonly Product _product;-- public UpdateStockEvent(Product product)- {- _product = product;- }-- public Product Result => _product;+ Result = product;}-}++ public Product Result { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/CapturePaymentTransactionDetailsEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/CapturePaymentTransactionDetailsEvent.csindex 2f1b98d25..76da87a8c 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/CapturePaymentTransactionDetailsEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/CapturePaymentTransactionDetailsEvent.cs@@ -2,20 +2,18 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++public class CapturePaymentTransactionDetailsEvent<R, C> : INotification+ where R : CapturePaymentResult where C : PaymentTransaction{- public class CapturePaymentTransactionDetailsEvent<R, C> : INotification where R : CapturePaymentResult where C : PaymentTransaction+ public CapturePaymentTransactionDetailsEvent(R result, C container){- private readonly R _result;- private readonly C _container;-- public CapturePaymentTransactionDetailsEvent(R result, C container)- {- _result = result;- _container = container;- }- public R Result => _result;- public C Container => _container;+ Result = result;+ Container = container;}-}+ public R Result { get; }++ public C Container { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderCancelledEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderCancelledEvent.csindex e4059e4dc..3dfa61efe 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderCancelledEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderCancelledEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order cancelled event+/// </summary>+public class OrderCancelledEvent : INotification{- /// <summary>- /// Order cancelled event- /// </summary>- public class OrderCancelledEvent : INotification+ public OrderCancelledEvent(Order order){- public OrderCancelledEvent(Order order)- {- Order = order;- }-- /// <summary>- /// Order- /// </summary>- public Order Order { get; private set; }+ Order = order;}-}++ /// <summary>+ /// Order+ /// </summary>+ public Order Order { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderDeletedEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderDeletedEvent.csindex d63baa11b..9910a71f0 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderDeletedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderDeletedEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order deleted event+/// </summary>+public class OrderDeletedEvent : INotification{- /// <summary>- /// Order deleted event- /// </summary>- public class OrderDeletedEvent : INotification+ public OrderDeletedEvent(Order order){- public OrderDeletedEvent(Order order)- {- Order = order;- }-- /// <summary>- /// Order- /// </summary>- public Order Order { get; private set; }+ Order = order;}-}++ /// <summary>+ /// Order+ /// </summary>+ public Order Order { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPaidEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPaidEvent.csindex 78949d5c5..a461053fc 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPaidEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPaidEvent.cs@@ -1,22 +1,20 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order paid event+/// </summary>+public class OrderPaidEvent : INotification{- /// <summary>- /// Order paid event- /// </summary>- public class OrderPaidEvent : INotification+ public OrderPaidEvent(Order order){- public OrderPaidEvent(Order order)- {- Order = order;- }-- /// <summary>- /// Order- /// </summary>- public Order Order { get; private set; }+ Order = order;}-}+ /// <summary>+ /// Order+ /// </summary>+ public Order Order { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPlacedEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPlacedEvent.csindex feda2df22..565fd82de 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPlacedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/OrderPlacedEvent.cs@@ -1,22 +1,20 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order placed event+/// </summary>+public class OrderPlacedEvent : INotification{- /// <summary>- /// Order placed event- /// </summary>- public class OrderPlacedEvent : INotification+ public OrderPlacedEvent(Order order){- public OrderPlacedEvent(Order order)- {- Order = order;- }-- /// <summary>- /// Order- /// </summary>- public Order Order { get; private set; }+ Order = order;}-}+ /// <summary>+ /// Order+ /// </summary>+ public Order Order { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionMarkAsAuthorizedEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionMarkAsAuthorizedEvent.csindex 81216de78..3a716d27d 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionMarkAsAuthorizedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionMarkAsAuthorizedEvent.cs@@ -1,22 +1,20 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order mark as authorized event+/// </summary>+public class PaymentTransactionMarkAsAuthorizedEvent : INotification{- /// <summary>- /// Order mark as authorized event- /// </summary>- public class PaymentTransactionMarkAsAuthorizedEvent : INotification+ public PaymentTransactionMarkAsAuthorizedEvent(PaymentTransaction paymentTransaction){- public PaymentTransactionMarkAsAuthorizedEvent(PaymentTransaction paymentTransaction)- {- PaymentTransaction = paymentTransaction;- }-- /// <summary>- /// Order- /// </summary>- public PaymentTransaction PaymentTransaction { get; private set; }+ PaymentTransaction = paymentTransaction;}-}+ /// <summary>+ /// Order+ /// </summary>+ public PaymentTransaction PaymentTransaction { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionRefundedEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionRefundedEvent.csindex d5bf1290d..5fb051273 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionRefundedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionRefundedEvent.cs@@ -1,27 +1,26 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order refunded event+/// </summary>+public class PaymentTransactionRefundedEvent : INotification{- /// <summary>- /// Order refunded event- /// </summary>- public class PaymentTransactionRefundedEvent : INotification+ public PaymentTransactionRefundedEvent(PaymentTransaction paymentTransaction, double amount){- public PaymentTransactionRefundedEvent(PaymentTransaction paymentTransaction, double amount)- {- PaymentTransaction = paymentTransaction;- Amount = amount;- }+ PaymentTransaction = paymentTransaction;+ Amount = amount;+ }- /// <summary>- /// Order- /// </summary>- public PaymentTransaction PaymentTransaction { get; private set; }+ /// <summary>+ /// Order+ /// </summary>+ public PaymentTransaction PaymentTransaction { get; private set; }- /// <summary>- /// Amount- /// </summary>- public double Amount { get; private set; }- }-}+ /// <summary>+ /// Amount+ /// </summary>+ public double Amount { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionVoidOfflineEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionVoidOfflineEvent.csindex 0e271f691..cf4f24b3f 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionVoidOfflineEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PaymentTransactionVoidOfflineEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++/// <summary>+/// Order void offline event+/// </summary>+public class PaymentTransactionVoidOfflineEvent : INotification{- /// <summary>- /// Order void offline event- /// </summary>- public class PaymentTransactionVoidOfflineEvent : INotification+ public PaymentTransactionVoidOfflineEvent(PaymentTransaction paymentTransaction){- public PaymentTransactionVoidOfflineEvent(PaymentTransaction paymentTransaction)- {- PaymentTransaction = paymentTransaction;- }-- /// <summary>- /// Order- /// </summary>- public PaymentTransaction PaymentTransaction { get; private set; }+ PaymentTransaction = paymentTransaction;}-}++ /// <summary>+ /// Order+ /// </summary>+ public PaymentTransaction PaymentTransaction { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PlaceOrderDetailsEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PlaceOrderDetailsEvent.csindex 05e0e30e4..c1e682af7 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/PlaceOrderDetailsEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/PlaceOrderDetailsEvent.cs@@ -1,20 +1,17 @@using Grand.Business.Core.Utilities.Checkout;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++public class PlaceOrderDetailsEvent<R, O> : INotification where R : PlaceOrderResult where O : PlaceOrderContainer{- public class PlaceOrderDetailsEvent<R, O> : INotification where R : PlaceOrderResult where O : PlaceOrderContainer+ public PlaceOrderDetailsEvent(R result, O container){- private readonly R _result;- private readonly O _container;-- public PlaceOrderDetailsEvent(R result, O container)- {- _result = result;- _container = container;- }- public R Result => _result;- public O Container => _container;+ Result = result;+ Container = container;}-}+ public R Result { get; }++ public O Container { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Orders/VoidPaymentTransactionDetailsEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Orders/VoidPaymentTransactionDetailsEvent.csindex cecb56268..5966f8f87 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Orders/VoidPaymentTransactionDetailsEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Orders/VoidPaymentTransactionDetailsEvent.cs@@ -2,20 +2,18 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Orders+namespace Grand.Business.Core.Events.Checkout.Orders;++public class VoidPaymentTransactionDetailsEvent<R, C> : INotification+ where R : VoidPaymentResult where C : PaymentTransaction{- public class VoidPaymentTransactionDetailsEvent<R, C> : INotification where R : VoidPaymentResult where C : PaymentTransaction+ public VoidPaymentTransactionDetailsEvent(R result, C container){- private readonly R _result;- private readonly C _container;-- public VoidPaymentTransactionDetailsEvent(R result, C container)- {- _result = result;- _container = container;- }- public R Result => _result;- public C Container => _container;+ Result = result;+ Container = container;}-}+ public R Result { get; }++ public C Container { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentDeliveredEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentDeliveredEvent.csindex 6eeb7ee6a..a2a6fbebe 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentDeliveredEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentDeliveredEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Shipping+namespace Grand.Business.Core.Events.Checkout.Shipping;++/// <summary>+/// Shipment delivered event+/// </summary>+public class ShipmentDeliveredEvent : INotification{- /// <summary>- /// Shipment delivered event- /// </summary>- public class ShipmentDeliveredEvent : INotification+ public ShipmentDeliveredEvent(Shipment shipment){- public ShipmentDeliveredEvent(Shipment shipment)- {- Shipment = shipment;- }-- /// <summary>- /// Shipment- /// </summary>- public Shipment Shipment { get; private set; }+ Shipment = shipment;}-}++ /// <summary>+ /// Shipment+ /// </summary>+ public Shipment Shipment { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentSentEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentSentEvent.csindex 806a3e49d..8dac8fae7 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentSentEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/Shipping/ShipmentSentEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Events.Checkout.Shipping+namespace Grand.Business.Core.Events.Checkout.Shipping;++/// <summary>+/// Shipment sent event+/// </summary>+public class ShipmentSentEvent : INotification{- /// <summary>- /// Shipment sent event- /// </summary>- public class ShipmentSentEvent : INotification+ public ShipmentSentEvent(Shipment shipment){- public ShipmentSentEvent(Shipment shipment)- {- Shipment = shipment;- }-- /// <summary>- /// Shipment- /// </summary>- public Shipment Shipment { get; private set; }+ Shipment = shipment;}-}++ /// <summary>+ /// Shipment+ /// </summary>+ public Shipment Shipment { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/AddToCartEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/AddToCartEvent.csindex 5f46b4f8c..c69f9b555 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/AddToCartEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/AddToCartEvent.cs@@ -3,23 +3,20 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.ShoppingCart+namespace Grand.Business.Core.Events.Checkout.ShoppingCart;++public class AddToCartEvent : INotification{- public class AddToCartEvent : INotification+ public AddToCartEvent(Customer customer, ShoppingCartItem shoppingCartItem, Product product){- private readonly Product _product;- private readonly Customer _customer;- private readonly ShoppingCartItem _shoppingCartItem;+ Customer = customer;+ ShoppingCartItem = shoppingCartItem;+ Product = product;+ }- public AddToCartEvent(Customer customer, ShoppingCartItem shoppingCartItem, Product product)- {- _customer = customer;- _shoppingCartItem = shoppingCartItem;- _product = product;- }+ public Customer Customer { get; }- public Customer Customer => _customer;- public ShoppingCartItem ShoppingCartItem => _shoppingCartItem;- public Product Product => _product;- }-}+ public ShoppingCartItem ShoppingCartItem { get; }++ public Product Product { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartItemWarningsEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartItemWarningsEvent.csindex 880d5f168..ea9e94310 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartItemWarningsEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartItemWarningsEvent.cs@@ -3,25 +3,24 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.ShoppingCart+namespace Grand.Business.Core.Events.Checkout.ShoppingCart;++public class ShoppingCartItemWarningsEvent<C, S, P> : INotification+ where C : Customer where S : ShoppingCartItem where P : Product{- public class ShoppingCartItemWarningsEvent<C, S, P> : INotification where C : Customer where S : ShoppingCartItem where P : Product+ public ShoppingCartItemWarningsEvent(IList<string> warnings, C customer, S shoppingCartItem, P product){- private readonly IList<string> _warnings;- private readonly C _customer;- private readonly S _shoppingCartItem;- private readonly P _product;-- public ShoppingCartItemWarningsEvent(IList<string> warnings, C customer, S shoppingCartItem, P product)- {- _warnings = warnings;- _customer = customer;- _shoppingCartItem = shoppingCartItem;- _product = product;- }- public IList<string> Warnings => _warnings;- public C Customer => _customer;- public S ShoppingCartItem => _shoppingCartItem;- public P Product => _product;+ Warnings = warnings;+ Customer = customer;+ ShoppingCartItem = shoppingCartItem;+ Product = product;}-}++ public IList<string> Warnings { get; }++ public C Customer { get; }++ public S ShoppingCartItem { get; }++ public P Product { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartWarningsEvent.cs b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartWarningsEvent.csindex 197d49e0e..9be4c0126 100644--- a/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartWarningsEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Checkout/ShoppingCart/ShoppingCartWarningsEvent.cs@@ -2,27 +2,24 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Events.Checkout.ShoppingCart+namespace Grand.Business.Core.Events.Checkout.ShoppingCart;++public class ShoppingCartWarningsEvent<T, U> : INotification where U : ShoppingCartItem{- public class ShoppingCartWarningsEvent<T, U> : INotification where U : ShoppingCartItem+ public ShoppingCartWarningsEvent(IList<T> warnings, IList<U> shoppingCartItems,+ IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes){- private readonly IList<T> _warnings;- private readonly IList<U> _shoppingCartItems;- private readonly IList<CustomAttribute> _checkoutAttributes;- private readonly bool _validateCheckoutAttributes;+ Warnings = warnings;+ ShoppingCartItems = shoppingCartItems;+ CheckoutAttributes = checkoutAttributes;+ ValidateCheckoutAttributes = validateCheckoutAttributes;+ }- public ShoppingCartWarningsEvent(IList<T> warnings, IList<U> shoppingCartItems, IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes)- {- _warnings = warnings;- _shoppingCartItems = shoppingCartItems;- _checkoutAttributes = checkoutAttributes;- _validateCheckoutAttributes = validateCheckoutAttributes;- }- public IList<T> Warnings => _warnings;- public IList<U> ShoppingCartItems => _shoppingCartItems;+ public IList<T> Warnings { get; }- public IList<CustomAttribute> CheckoutAttributes => _checkoutAttributes;+ public IList<U> ShoppingCartItems { get; }- public bool ValidateCheckoutAttributes => _validateCheckoutAttributes;- }-}+ public IList<CustomAttribute> CheckoutAttributes { get; }++ public bool ValidateCheckoutAttributes { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedInEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedInEvent.csindex 792ec6248..ec21fcf93 100644--- a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedInEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedInEvent.cs@@ -1,24 +1,23 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++/// <summary>+/// Customer logged-in event+/// </summary>+public class CustomerLoggedInEvent : INotification{- /// <summary>- /// Customer logged-in event- /// </summary>- public class CustomerLoggedInEvent : INotification+ public CustomerLoggedInEvent(Customer customer){- public CustomerLoggedInEvent(Customer customer)- {- Customer = customer;- }-- /// <summary>- /// Customer- /// </summary>- public Customer Customer {- get; private set;- }+ Customer = customer;}-}+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer {+ get;+ private set;+ }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedOutEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedOutEvent.csindex 2acb4b18c..f21b93f3a 100644--- a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedOutEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoggedOutEvent.cs@@ -1,23 +1,23 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++/// <summary>+/// Customer logged-in event+/// </summary>+public class CustomerLoggedOutEvent : INotification{- /// <summary>- /// Customer logged-in event- /// </summary>- public class CustomerLoggedOutEvent : INotification+ public CustomerLoggedOutEvent(Customer customer){- public CustomerLoggedOutEvent(Customer customer)- {- Customer = customer;- }+ Customer = customer;+ }- /// <summary>- /// Customer- /// </summary>- public Customer Customer {- get; private set;- }+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer {+ get;+ private set;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoginFailedEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoginFailedEvent.csindex aaa4873a7..c1e352f78 100644--- a/src/Business/Grand.Business.Core/Events/Customers/CustomerLoginFailedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/CustomerLoginFailedEvent.cs@@ -1,24 +1,23 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++/// <summary>+/// Customer login failed event+/// </summary>+public class CustomerLoginFailedEvent : INotification{- /// <summary>- /// Customer login failed event- /// </summary>- public class CustomerLoginFailedEvent : INotification+ public CustomerLoginFailedEvent(Customer customer){- public CustomerLoginFailedEvent(Customer customer)- {- Customer = customer;- }-- /// <summary>- /// Customer- /// </summary>- public Customer Customer {- get; private set;- }+ Customer = customer;}-}+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer {+ get;+ private set;+ }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/CustomerRegisteredEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/CustomerRegisteredEvent.csindex 15f72e099..7f866bf48 100644--- a/src/Business/Grand.Business.Core/Events/Customers/CustomerRegisteredEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/CustomerRegisteredEvent.cs@@ -1,24 +1,23 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++/// <summary>+/// Customer registered event+/// </summary>+public class CustomerRegisteredEvent : INotification{- /// <summary>- /// Customer registered event- /// </summary>- public class CustomerRegisteredEvent : INotification+ public CustomerRegisteredEvent(Customer customer){- public CustomerRegisteredEvent(Customer customer)- {- Customer = customer;- }-- /// <summary>- /// Customer- /// </summary>- public Customer Customer {- get; private set;- }+ Customer = customer;}-}+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer {+ get;+ private set;+ }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/CustomerRegistrationEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/CustomerRegistrationEvent.csindex 45f8d98f2..dfcb342c7 100644--- a/src/Business/Grand.Business.Core/Events/Customers/CustomerRegistrationEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/CustomerRegistrationEvent.cs@@ -1,16 +1,14 @@using Grand.Business.Core.Utilities.Customers;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++public class CustomerRegistrationEvent<R> : INotification where R : RegistrationRequest{- public class CustomerRegistrationEvent<R> : INotification where R : RegistrationRequest+ public CustomerRegistrationEvent(R request){- private readonly R _request;-- public CustomerRegistrationEvent(R request)- {- _request = request;- }- public R Request => _request;+ Request = request;}-}++ public R Request { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/VendorActivationEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/VendorActivationEvent.csindex 8cbdb31e4..2930c856f 100644--- a/src/Business/Grand.Business.Core/Events/Customers/VendorActivationEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/VendorActivationEvent.cs@@ -1,20 +1,20 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++public class VendorActivationEvent : INotification{- public class VendorActivationEvent : INotification+ public VendorActivationEvent(Vendor vendor){- public VendorActivationEvent(Vendor vendor)- {- Vendor = vendor;- }+ Vendor = vendor;+ }- /// <summary>- /// Vendor- /// </summary>- public Vendor Vendor {- get; private set;- }+ /// <summary>+ /// Vendor+ /// </summary>+ public Vendor Vendor {+ get;+ private set;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Customers/VendorReviewApprovedEvent.cs b/src/Business/Grand.Business.Core/Events/Customers/VendorReviewApprovedEvent.csindex ba96d1f6b..70e021151 100644--- a/src/Business/Grand.Business.Core/Events/Customers/VendorReviewApprovedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Customers/VendorReviewApprovedEvent.cs@@ -1,21 +1,20 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Events.Customers+namespace Grand.Business.Core.Events.Customers;++/// <summary>+/// Vendor review approved event+/// </summary>+public class VendorReviewApprovedEvent : INotification{- /// <summary>- /// Vendor review approved event- /// </summary>- public class VendorReviewApprovedEvent : INotification+ public VendorReviewApprovedEvent(VendorReview vendorReview){- public VendorReviewApprovedEvent(VendorReview vendorReview)- {- VendorReview = vendorReview;- }-- /// <summary>- /// Vendor review- /// </summary>- public VendorReview VendorReview { get; private set; }+ VendorReview = vendorReview;}-}++ /// <summary>+ /// Vendor review+ /// </summary>+ public VendorReview VendorReview { get; private set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Marketing/CustomerCoordinatesEvent.cs b/src/Business/Grand.Business.Core/Events/Marketing/CustomerCoordinatesEvent.csindex 2a97ef8a5..d83b3ff25 100644--- a/src/Business/Grand.Business.Core/Events/Marketing/CustomerCoordinatesEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Marketing/CustomerCoordinatesEvent.cs@@ -1,24 +1,23 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Events.Marketing+namespace Grand.Business.Core.Events.Marketing;++/// <summary>+/// Customer coordinates save - event+/// </summary>+public class CustomerCoordinatesEvent : INotification{- /// <summary>- /// Customer coordinates save - event- /// </summary>- public class CustomerCoordinatesEvent : INotification+ public CustomerCoordinatesEvent(Customer customer){- public CustomerCoordinatesEvent(Customer customer)- {- Customer = customer;- }-- /// <summary>- /// Customer- /// </summary>- public Customer Customer {- get; private set;- }+ Customer = customer;+ }+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer {+ get;+ private set;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Marketing/EmailSubscribedEvent.cs b/src/Business/Grand.Business.Core/Events/Marketing/EmailSubscribedEvent.csindex 7ec9441a2..21ef99e2a 100644--- a/src/Business/Grand.Business.Core/Events/Marketing/EmailSubscribedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Marketing/EmailSubscribedEvent.cs@@ -1,37 +1,34 @@using MediatR;-namespace Grand.Business.Core.Events.Marketing+namespace Grand.Business.Core.Events.Marketing;++public class EmailSubscribedEvent : INotification{- public class EmailSubscribedEvent : INotification+ public EmailSubscribedEvent(string email){- private readonly string _email;-- public EmailSubscribedEvent(string email)- {- _email = email;- }+ Email = email;+ }- public string Email => _email;+ public string Email { get; }- public bool Equals(EmailSubscribedEvent other)- {- if (ReferenceEquals(null, other))- return false;- return ReferenceEquals(this, other) || Equals(other._email, _email);- }+ public bool Equals(EmailSubscribedEvent other)+ {+ if (ReferenceEquals(null, other))+ return false;+ return ReferenceEquals(this, other) || Equals(other.Email, Email);+ }- public override bool Equals(object obj)- {- if (ReferenceEquals(null, obj))- return false;- if (ReferenceEquals(this, obj))- return true;- return obj.GetType() == typeof(EmailSubscribedEvent) && Equals((EmailSubscribedEvent)obj);- }+ public override bool Equals(object obj)+ {+ if (ReferenceEquals(null, obj))+ return false;+ if (ReferenceEquals(this, obj))+ return true;+ return obj.GetType() == typeof(EmailSubscribedEvent) && Equals((EmailSubscribedEvent)obj);+ }- public override int GetHashCode()- {- return _email != null ? _email.GetHashCode() : 0;- }+ public override int GetHashCode()+ {+ return Email != null ? Email.GetHashCode() : 0;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Marketing/EmailUnsubscribedEvent.cs b/src/Business/Grand.Business.Core/Events/Marketing/EmailUnsubscribedEvent.csindex cd7d6553e..a6ddfb592 100644--- a/src/Business/Grand.Business.Core/Events/Marketing/EmailUnsubscribedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Marketing/EmailUnsubscribedEvent.cs@@ -1,38 +1,34 @@using MediatR;-namespace Grand.Business.Core.Events.Marketing+namespace Grand.Business.Core.Events.Marketing;++public class EmailUnsubscribedEvent : INotification{- public class EmailUnsubscribedEvent : INotification+ public EmailUnsubscribedEvent(string email){- private readonly string _email;-- public EmailUnsubscribedEvent(string email)- {- _email = email;- }-- public string Email => _email;+ Email = email;+ }- public bool Equals(EmailUnsubscribedEvent other)- {- if (ReferenceEquals(null, other))- return false;- return ReferenceEquals(this, other) || Equals(other._email, _email);- }+ public string Email { get; }- public override bool Equals(object obj)- {- if (ReferenceEquals(null, obj))- return false;- if (ReferenceEquals(this, obj))- return true;- return obj.GetType() == typeof(EmailUnsubscribedEvent) && Equals((EmailUnsubscribedEvent)obj);- }+ public bool Equals(EmailUnsubscribedEvent other)+ {+ if (ReferenceEquals(null, other))+ return false;+ return ReferenceEquals(this, other) || Equals(other.Email, Email);+ }- public override int GetHashCode()- {- return _email != null ? _email.GetHashCode() : 0;- }+ public override bool Equals(object obj)+ {+ if (ReferenceEquals(null, obj))+ return false;+ if (ReferenceEquals(this, obj))+ return true;+ return obj.GetType() == typeof(EmailUnsubscribedEvent) && Equals((EmailUnsubscribedEvent)obj);}-}+ public override int GetHashCode()+ {+ return Email != null ? Email.GetHashCode() : 0;+ }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Messages/EntityTokensAddedEvent.cs b/src/Business/Grand.Business.Core/Events/Messages/EntityTokensAddedEvent.csindex 088a7957e..36b97cb01 100644--- a/src/Business/Grand.Business.Core/Events/Messages/EntityTokensAddedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Messages/EntityTokensAddedEvent.cs@@ -3,27 +3,24 @@ using Grand.Domain;using Grand.Domain.Messages;using MediatR;-namespace Grand.Business.Core.Events.Messages+namespace Grand.Business.Core.Events.Messages;++/// <summary>+/// A container for tokens that are added.+/// </summary>+/// <typeparam name="T">Entity type</typeparam>+public class EntityTokensAddedEvent<T> : INotification where T : ParentEntity{- /// <summary>- /// A container for tokens that are added.- /// </summary>- /// <typeparam name="T">Entity type</typeparam>- public class EntityTokensAddedEvent<T> : INotification where T : ParentEntity+ public EntityTokensAddedEvent(T entity, Drop liquidDrop, LiquidObject liquidObject){- private readonly T _entity;- private readonly Drop _liquidDrop;- private readonly LiquidObject _liquidObject;+ Entity = entity;+ LiquidDrop = liquidDrop;+ LiquidObject = liquidObject;+ }- public EntityTokensAddedEvent(T entity, Drop liquidDrop, LiquidObject liquidObject)- {- _entity = entity;- _liquidDrop = liquidDrop;- _liquidObject = liquidObject;- }+ public T Entity { get; }- public T Entity => _entity;- public Drop LiquidDrop => _liquidDrop;- public LiquidObject LiquidObject => _liquidObject;- }-}+ public Drop LiquidDrop { get; }++ public LiquidObject LiquidObject { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Events/Messages/MessageTokensAddedEvent.cs b/src/Business/Grand.Business.Core/Events/Messages/MessageTokensAddedEvent.csindex fe6384ce3..89cd28119 100644--- a/src/Business/Grand.Business.Core/Events/Messages/MessageTokensAddedEvent.cs+++ b/src/Business/Grand.Business.Core/Events/Messages/MessageTokensAddedEvent.cs@@ -1,23 +1,20 @@using Grand.Domain.Messages;using MediatR;-namespace Grand.Business.Core.Events.Messages+namespace Grand.Business.Core.Events.Messages;++/// <summary>+/// A container for tokens that are added.+/// </summary>+public class MessageTokensAddedEvent : INotification{- /// <summary>- /// A container for tokens that are added.- /// </summary>- public class MessageTokensAddedEvent : INotification+ public MessageTokensAddedEvent(MessageTemplate message, LiquidObject liquidObject){- private readonly MessageTemplate _message;- private readonly LiquidObject _liquidObject;+ Message = message;+ LiquidObject = liquidObject;+ }- public MessageTokensAddedEvent(MessageTemplate message, LiquidObject liquidObject)- {- _message = message;- _liquidObject = liquidObject;- }+ public MessageTemplate Message { get; }- public MessageTemplate Message => _message;- public LiquidObject LiquidObject => _liquidObject;- }-}+ public LiquidObject LiquidObject { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/AffiliateExtensions.cs b/src/Business/Grand.Business.Core/Extensions/AffiliateExtensions.csindex 700de876c..f83c1eef3 100644--- a/src/Business/Grand.Business.Core/Extensions/AffiliateExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/AffiliateExtensions.cs@@ -1,106 +1,110 @@using Grand.Business.Core.Interfaces.Customers;using Grand.Domain.Affiliates;using Grand.Domain.Seo;-using Grand.Infrastructure.Extensions;using Grand.SharedKernel.Extensions;-using System.Security.Policy;+using System.Web;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class AffiliateExtensions{- public static class AffiliateExtensions+ /// <summary>+ /// Get full name+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ /// <returns>Affiliate full name</returns>+ public static string GetFullName(this Affiliate affiliate){- /// <summary>- /// Get full name- /// </summary>- /// <param name="affiliate">Affiliate</param>- /// <returns>Affiliate full name</returns>- public static string GetFullName(this Affiliate affiliate)- {- ArgumentNullException.ThrowIfNull(affiliate);-- var firstName = affiliate.Address.FirstName;- var lastName = affiliate.Address.LastName;-- var fullName = "";- if (!string.IsNullOrWhiteSpace(firstName) && !string.IsNullOrWhiteSpace(lastName))- fullName = $"{firstName} {lastName}";- else- {- if (!string.IsNullOrWhiteSpace(firstName))- fullName = firstName;-- if (!string.IsNullOrWhiteSpace(lastName))- fullName = lastName;- }- return fullName;- }+ ArgumentNullException.ThrowIfNull(affiliate);+ var firstName = affiliate.Address.FirstName;+ var lastName = affiliate.Address.LastName;- /// <summary>- /// Generate affiliate URL- /// </summary>- /// <param name="affiliate">Affiliate</param>- /// <param name="host">Host</param>- /// <returns>Generated affiliate URL</returns>- public static string GenerateUrl(this Affiliate affiliate, string host)+ var fullName = "";+ if (!string.IsNullOrWhiteSpace(firstName) && !string.IsNullOrWhiteSpace(lastName)){- ArgumentNullException.ThrowIfNull(affiliate);-- if (string.IsNullOrEmpty(host))- throw new ArgumentNullException(nameof(host));-- var uriBuilder = new UriBuilder(host);- var query = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);- if (!string.IsNullOrEmpty(affiliate.FriendlyUrlName))- query["affiliate"] = affiliate.FriendlyUrlName;- else- query["affiliateid"] = affiliate.Id;-- uriBuilder.Port = -1;- uriBuilder.Query = query.ToString();- return uriBuilder.ToString();+ fullName = $"{firstName} {lastName}";}-- /// <summary>- /// Validate friendly URL name- /// </summary>- /// <param name="affiliate">Affiliate</param>- /// <param name="seoSettings"></param>- /// <param name="friendlyUrlName">Friendly URL name</param>- /// <param name="affiliateService"></param>- /// <param name="name"></param>- /// <returns>Valid friendly name</returns>- public static async Task<string> ValidateFriendlyUrlName(this Affiliate affiliate, IAffiliateService affiliateService, SeoSettings seoSettings, string friendlyUrlName, string name)+ else{- ArgumentNullException.ThrowIfNull(affiliate);-- if (string.IsNullOrEmpty(friendlyUrlName))- friendlyUrlName = name;-- //ensure we have only valid chars- friendlyUrlName = SeoExtensions.GetSeName(friendlyUrlName, seoSettings.ConvertNonWesternChars, seoSettings.AllowUnicodeCharsInUrls, seoSettings.SeoCharConversion);-- //max length- friendlyUrlName = CommonHelper.EnsureMaximumLength(friendlyUrlName, 200);-- if (string.IsNullOrEmpty(friendlyUrlName))- return friendlyUrlName;- //check whether such friendly URL name already exists (and that is not the current affiliate)- var i = 2;- var tempName = friendlyUrlName;- while (true)- {- var affiliateByFriendlyUrlName = await affiliateService.GetAffiliateByFriendlyUrlName(tempName);- var reserved = affiliateByFriendlyUrlName != null && affiliateByFriendlyUrlName.Id != affiliate.Id;- if (!reserved)- break;-- tempName = $"{friendlyUrlName}-{i}";- i++;- }- friendlyUrlName = tempName;+ if (!string.IsNullOrWhiteSpace(firstName))+ fullName = firstName;++ if (!string.IsNullOrWhiteSpace(lastName))+ fullName = lastName;+ }++ return fullName;+ }+++ /// <summary>+ /// Generate affiliate URL+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ /// <param name="host">Host</param>+ /// <returns>Generated affiliate URL</returns>+ public static string GenerateUrl(this Affiliate affiliate, string host)+ {+ ArgumentNullException.ThrowIfNull(affiliate);++ if (string.IsNullOrEmpty(host))+ throw new ArgumentNullException(nameof(host));+ var uriBuilder = new UriBuilder(host);+ var query = HttpUtility.ParseQueryString(uriBuilder.Query);+ if (!string.IsNullOrEmpty(affiliate.FriendlyUrlName))+ query["affiliate"] = affiliate.FriendlyUrlName;+ else+ query["affiliateid"] = affiliate.Id;++ uriBuilder.Port = -1;+ uriBuilder.Query = query.ToString();+ return uriBuilder.ToString();+ }++ /// <summary>+ /// Validate friendly URL name+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ /// <param name="seoSettings"></param>+ /// <param name="friendlyUrlName">Friendly URL name</param>+ /// <param name="affiliateService"></param>+ /// <param name="name"></param>+ /// <returns>Valid friendly name</returns>+ public static async Task<string> ValidateFriendlyUrlName(this Affiliate affiliate,+ IAffiliateService affiliateService, SeoSettings seoSettings, string friendlyUrlName, string name)+ {+ ArgumentNullException.ThrowIfNull(affiliate);++ if (string.IsNullOrEmpty(friendlyUrlName))+ friendlyUrlName = name;++ //ensure we have only valid chars+ friendlyUrlName = SeoExtensions.GetSeName(friendlyUrlName, seoSettings.ConvertNonWesternChars,+ seoSettings.AllowUnicodeCharsInUrls, seoSettings.SeoCharConversion);++ //max length+ friendlyUrlName = CommonHelper.EnsureMaximumLength(friendlyUrlName, 200);++ if (string.IsNullOrEmpty(friendlyUrlName))return friendlyUrlName;+ //check whether such friendly URL name already exists (and that is not the current affiliate)+ var i = 2;+ var tempName = friendlyUrlName;+ while (true)+ {+ var affiliateByFriendlyUrlName = await affiliateService.GetAffiliateByFriendlyUrlName(tempName);+ var reserved = affiliateByFriendlyUrlName != null && affiliateByFriendlyUrlName.Id != affiliate.Id;+ if (!reserved)+ break;++ tempName = $"{friendlyUrlName}-{i}";+ i++;}++ friendlyUrlName = tempName;++ return friendlyUrlName;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/CustomerEventsExtensions.cs b/src/Business/Grand.Business.Core/Extensions/CustomerEventsExtensions.csindex 40205eace..b28002ec0 100644--- a/src/Business/Grand.Business.Core/Extensions/CustomerEventsExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/CustomerEventsExtensions.cs@@ -2,14 +2,13 @@using Grand.Business.Core.Utilities.Customers;using MediatR;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class CustomerEventsExtensions{- public static class CustomerEventsExtensions+ public static async Task CustomerRegistrationEvent<R>(this IMediator eventPublisher, R request)+ where R : RegistrationRequest{- public static async Task CustomerRegistrationEvent<R>(this IMediator eventPublisher, R request)- where R : RegistrationRequest- {- await eventPublisher.Publish(new CustomerRegistrationEvent<R>(request));- }+ await eventPublisher.Publish(new CustomerRegistrationEvent<R>(request));}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/ExternalAuthenticationProviderExtensions.cs b/src/Business/Grand.Business.Core/Extensions/ExternalAuthenticationProviderExtensions.csindex f4d9af6a4..787911a43 100644--- a/src/Business/Grand.Business.Core/Extensions/ExternalAuthenticationProviderExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/ExternalAuthenticationProviderExtensions.cs@@ -1,25 +1,27 @@using Grand.Business.Core.Interfaces.Authentication;using Grand.Domain.Customers;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++/// <summary>+/// Extensions of external authentication method+/// </summary>+public static class ExternalAuthenticationProviderExtensions{/// <summary>- /// Extensions of external authentication method+ /// Check whether external authentication method is active/// </summary>- public static class ExternalAuthenticationProviderExtensions+ /// <param name="method">External authentication method</param>+ /// <param name="settings">External authentication settings</param>+ /// <returns>True if method is active; otherwise false</returns>+ public static bool IsMethodActive(this IExternalAuthenticationProvider method,+ ExternalAuthenticationSettings settings){- /// <summary>- /// Check whether external authentication method is active- /// </summary>- /// <param name="method">External authentication method</param>- /// <param name="settings">External authentication settings</param>- /// <returns>True if method is active; otherwise false</returns>- public static bool IsMethodActive(this IExternalAuthenticationProvider method, ExternalAuthenticationSettings settings)- {- ArgumentNullException.ThrowIfNull(method);- ArgumentNullException.ThrowIfNull(settings);+ ArgumentNullException.ThrowIfNull(method);+ ArgumentNullException.ThrowIfNull(settings);- return settings.ActiveAuthenticationMethodSystemNames != null && settings.ActiveAuthenticationMethodSystemNames.Any(activeMethodSystemName => method.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));- }+ return settings.ActiveAuthenticationMethodSystemNames != null &&+ settings.ActiveAuthenticationMethodSystemNames.Any(activeMethodSystemName =>+ method.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.cs b/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.csindex 1e22cce51..33c2e454a 100644--- a/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/HistoryExtensions.cs@@ -2,25 +2,26 @@using Grand.Domain;using Grand.Domain.History;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class HistoryExtensions{- public static class HistoryExtensions+ /// <summary>+ /// Save an entity+ /// </summary>+ /// <param name="entity">Entity</param>+ /// <param name="historyService"></param>+ public static async Task SaveHistory<T>(this BaseEntity entity, IHistoryService historyService)+ where T : BaseEntity, IHistory{- /// <summary>- /// Save an entity- /// </summary>- /// <param name="entity">Entity</param>- /// <param name="historyService"></param>- public static async Task SaveHistory<T>(this BaseEntity entity, IHistoryService historyService) where T : BaseEntity, IHistory- {- ArgumentNullException.ThrowIfNull(entity);+ ArgumentNullException.ThrowIfNull(entity);- await historyService.SaveObject(entity);- }+ await historyService.SaveObject(entity);+ }- public static async Task<IList<HistoryObject>> GetHistoryObject(this BaseEntity entity, IHistoryService historyService)- {- return await historyService.GetHistoryObjectForEntity(entity);- }+ public static async Task<IList<HistoryObject>> GetHistoryObject(this BaseEntity entity,+ IHistoryService historyService)+ {+ return await historyService.GetHistoryObjectForEntity(entity);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/MessagesEventPublisherExtensions.cs b/src/Business/Grand.Business.Core/Extensions/MessagesEventPublisherExtensions.csindex 78631d56a..5096752ab 100644--- a/src/Business/Grand.Business.Core/Extensions/MessagesEventPublisherExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/MessagesEventPublisherExtensions.cs@@ -4,18 +4,19 @@ using Grand.Domain;using Grand.Domain.Messages;using MediatR;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class MessagesEventPublisherExtensions{- public static class MessagesEventPublisherExtensions+ public static async Task EntityTokensAdded<T>(this IMediator mediator, T entity, Drop liquidDrop,+ LiquidObject liquidObject) where T : ParentEntity{- public static async Task EntityTokensAdded<T>(this IMediator mediator, T entity, Drop liquidDrop, LiquidObject liquidObject) where T : ParentEntity- {- await mediator.Publish(new EntityTokensAddedEvent<T>(entity, liquidDrop, liquidObject));- }+ await mediator.Publish(new EntityTokensAddedEvent<T>(entity, liquidDrop, liquidObject));+ }- public static async Task MessageTokensAdded(this IMediator mediator, MessageTemplate message, LiquidObject liquidObject)- {- await mediator.Publish(new MessageTokensAddedEvent(message, liquidObject));- }+ public static async Task MessageTokensAdded(this IMediator mediator, MessageTemplate message,+ LiquidObject liquidObject)+ {+ await mediator.Publish(new MessageTokensAddedEvent(message, liquidObject));}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/OrderEventPublisherExtensions.cs b/src/Business/Grand.Business.Core/Extensions/OrderEventPublisherExtensions.csindex e5c0de644..9be7d06cf 100644--- a/src/Business/Grand.Business.Core/Extensions/OrderEventPublisherExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/OrderEventPublisherExtensions.cs@@ -3,21 +3,25 @@ using Grand.Business.Core.Utilities.Checkout;using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class OrderEventPublisherExtensions{- public static class OrderEventPublisherExtensions+ public static async Task PlaceOrderDetailsEvent<R, O>(this IMediator eventPublisher, R result, O order)+ where R : PlaceOrderResult where O : PlaceOrderContainer+ {+ await eventPublisher.Publish(new PlaceOrderDetailsEvent<R, O>(result, order));+ }++ public static async Task CapturePaymentTransactionDetailsEvent<R, C>(this IMediator eventPublisher, R result,+ C request) where R : CapturePaymentResult where C : PaymentTransaction+ {+ await eventPublisher.Publish(new CapturePaymentTransactionDetailsEvent<R, C>(result, request));+ }++ public static async Task VoidPaymentTransactionDetailsEvent<R, C>(this IMediator eventPublisher, R result,+ C request) where R : VoidPaymentResult where C : PaymentTransaction{- public static async Task PlaceOrderDetailsEvent<R, O>(this IMediator eventPublisher, R result, O order) where R : PlaceOrderResult where O : PlaceOrderContainer- {- await eventPublisher.Publish(new PlaceOrderDetailsEvent<R, O>(result, order));- }- public static async Task CapturePaymentTransactionDetailsEvent<R, C>(this IMediator eventPublisher, R result, C request) where R : CapturePaymentResult where C : PaymentTransaction- {- await eventPublisher.Publish(new CapturePaymentTransactionDetailsEvent<R, C>(result, request));- }- public static async Task VoidPaymentTransactionDetailsEvent<R, C>(this IMediator eventPublisher, R result, C request) where R : VoidPaymentResult where C : PaymentTransaction- {- await eventPublisher.Publish(new VoidPaymentTransactionDetailsEvent<R, C>(result, request));- }+ await eventPublisher.Publish(new VoidPaymentTransactionDetailsEvent<R, C>(result, request));}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/PaymentExtensions.cs b/src/Business/Grand.Business.Core/Extensions/PaymentExtensions.csindex 507579b84..5ce2ba907 100644--- a/src/Business/Grand.Business.Core/Extensions/PaymentExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/PaymentExtensions.cs@@ -3,59 +3,60 @@ using Grand.Business.Core.Interfaces.Checkout.Payments;using Grand.Domain.Orders;using Grand.Domain.Payments;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++/// <summary>+/// Payment extensions+/// </summary>+public static class PaymentExtensions{/// <summary>- /// Payment extensions+ /// Is payment method active?/// </summary>- public static class PaymentExtensions+ /// <param name="paymentMethod">Payment method</param>+ /// <param name="paymentSettings">Payment settings</param>+ /// <returns>Result</returns>+ public static bool IsPaymentMethodActive(this IPaymentProvider paymentMethod,+ PaymentSettings paymentSettings){- /// <summary>- /// Is payment method active?- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <param name="paymentSettings">Payment settings</param>- /// <returns>Result</returns>- public static bool IsPaymentMethodActive(this IPaymentProvider paymentMethod,- PaymentSettings paymentSettings)- {- ArgumentNullException.ThrowIfNull(paymentMethod);- ArgumentNullException.ThrowIfNull(paymentSettings);+ ArgumentNullException.ThrowIfNull(paymentMethod);+ ArgumentNullException.ThrowIfNull(paymentSettings);- return paymentSettings.ActivePaymentProviderSystemNames != null && paymentSettings.ActivePaymentProviderSystemNames.Any(activeMethodSystemName => paymentMethod.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));- }+ return paymentSettings.ActivePaymentProviderSystemNames != null &&+ paymentSettings.ActivePaymentProviderSystemNames.Any(activeMethodSystemName =>+ paymentMethod.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));+ }- /// <summary>- /// Calculate payment method fee- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <param name="orderTotalCalculationService">Order total calculation service</param>- /// <param name="cart">Shopping cart</param>- /// <param name="fee">Fee value</param>- /// <param name="usePercentage">Is fee amount specified as percentage or fixed value?</param>- /// <returns>Result</returns>- public static async Task<double> CalculateAdditionalFee(this IPaymentProvider paymentMethod,- IOrderCalculationService orderTotalCalculationService, IList<ShoppingCartItem> cart,- double fee, bool usePercentage)- {- ArgumentNullException.ThrowIfNull(paymentMethod);- if (fee <= 0)- return fee;+ /// <summary>+ /// Calculate payment method fee+ /// </summary>+ /// <param name="paymentMethod">Payment method</param>+ /// <param name="orderTotalCalculationService">Order total calculation service</param>+ /// <param name="cart">Shopping cart</param>+ /// <param name="fee">Fee value</param>+ /// <param name="usePercentage">Is fee amount specified as percentage or fixed value?</param>+ /// <returns>Result</returns>+ public static async Task<double> CalculateAdditionalFee(this IPaymentProvider paymentMethod,+ IOrderCalculationService orderTotalCalculationService, IList<ShoppingCartItem> cart,+ double fee, bool usePercentage)+ {+ ArgumentNullException.ThrowIfNull(paymentMethod);+ if (fee <= 0)+ return fee;- double result;- if (usePercentage)- {- //percentage- var shoppingCartSubTotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);- result = (float)shoppingCartSubTotal.subTotalWithDiscount * (float)fee / 100f;- }- else- {- //fixed value- result = fee;- }- return result;+ double result;+ if (usePercentage)+ {+ //percentage+ var shoppingCartSubTotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);+ result = (float)shoppingCartSubTotal.subTotalWithDiscount * (float)fee / 100f;+ }+ else+ {+ //fixed value+ result = fee;}+ return result;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/RoundingHelper.cs b/src/Business/Grand.Business.Core/Extensions/RoundingHelper.csindex f9057fc2e..1f2a3ac4e 100644--- a/src/Business/Grand.Business.Core/Extensions/RoundingHelper.cs+++ b/src/Business/Grand.Business.Core/Extensions/RoundingHelper.cs@@ -1,94 +1,95 @@using Grand.Domain.Directory;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class RoundingHelper{- public static class RoundingHelper+ /// <summary>+ /// Round price or order total for the currency+ /// </summary>+ /// <param name="value">Value to round</param>+ /// <param name="currency">Currency</param>+ /// <returns>Rounded value</returns>+ public static double RoundPrice(double value, Currency currency){+ return currency != null+ ? value.Round(currency.NumberDecimal, currency.RoundingTypeId, currency.MidpointRoundId)+ : value;+ }- /// <summary>- /// Round price or order total for the currency- /// </summary>- /// <param name="value">Value to round</param>- /// <param name="currency">Currency</param>- /// <returns>Rounded value</returns>- public static double RoundPrice(double value, Currency currency)- {- return currency != null ? value.Round(currency.NumberDecimal, currency.RoundingTypeId, currency.MidpointRoundId) : value;- }-- /// <summary>- /// Round- /// </summary>- /// <param name="value">Value to round</param>- /// <param name="doubles">Doubles</param>- /// <param name="roundingType">The rounding type</param>- /// <param name="midpointRounding">Mid point rounding</param>- /// <returns>Rounded value</returns>- public static double Round(this double value, int doubles, RoundingType roundingType, MidpointRounding midpointRounding)- {-- //default round (Rounding001)- var rez = Math.Round(value, doubles, midpointRounding);- var fractionPart = (rez - Math.Truncate(rez)) * 10;-- //cash rounding not needed- if (fractionPart == 0)- return rez;+ /// <summary>+ /// Round+ /// </summary>+ /// <param name="value">Value to round</param>+ /// <param name="doubles">Doubles</param>+ /// <param name="roundingType">The rounding type</param>+ /// <param name="midpointRounding">Mid point rounding</param>+ /// <returns>Rounded value</returns>+ public static double Round(this double value, int doubles, RoundingType roundingType,+ MidpointRounding midpointRounding)+ {+ //default round (Rounding001)+ var rez = Math.Round(value, doubles, midpointRounding);+ var fractionPart = (rez - Math.Truncate(rez)) * 10;- //Cash rounding (details: https://en.wikipedia.org/wiki/Cash_rounding)- switch (roundingType)- {- //rounding with 0.05 or 5 intervals- case RoundingType.Rounding005Up:- case RoundingType.Rounding005Down:- fractionPart = (fractionPart - Math.Truncate(fractionPart)) * 10;- if (fractionPart is 5 or 0)- break;- if (roundingType == RoundingType.Rounding005Down)- fractionPart = fractionPart > 5 ? 5 - fractionPart : fractionPart * -1;- else- fractionPart = fractionPart > 5 ? 10 - fractionPart : 5 - fractionPart;+ //cash rounding not needed+ if (fractionPart == 0)+ return rez;- rez += fractionPart / 100;+ //Cash rounding (details: https://en.wikipedia.org/wiki/Cash_rounding)+ switch (roundingType)+ {+ //rounding with 0.05 or 5 intervals+ case RoundingType.Rounding005Up:+ case RoundingType.Rounding005Down:+ fractionPart = (fractionPart - Math.Truncate(fractionPart)) * 10;+ if (fractionPart is 5 or 0)break;- //rounding with 0.10 intervals- case RoundingType.Rounding01Up:- case RoundingType.Rounding01Down:- fractionPart = (fractionPart - Math.Truncate(fractionPart)) * 10;- if (fractionPart == 0)- break;-- if (roundingType == RoundingType.Rounding01Down && fractionPart == 5)- fractionPart = -5;- else- fractionPart = fractionPart < 5 ? fractionPart * -1 : 10 - fractionPart;+ if (roundingType == RoundingType.Rounding005Down)+ fractionPart = fractionPart > 5 ? 5 - fractionPart : fractionPart * -1;+ else+ fractionPart = fractionPart > 5 ? 10 - fractionPart : 5 - fractionPart;- rez += fractionPart / 100;+ rez += fractionPart / 100;+ break;+ //rounding with 0.10 intervals+ case RoundingType.Rounding01Up:+ case RoundingType.Rounding01Down:+ fractionPart = (fractionPart - Math.Truncate(fractionPart)) * 10;+ if (fractionPart == 0)break;- //rounding with 0.50 intervals- case RoundingType.Rounding05:- fractionPart *= 10;- fractionPart = fractionPart < 25 ? fractionPart * -1 : fractionPart < 50 || fractionPart < 75 ? 50 - fractionPart : 100 - fractionPart;- rez += fractionPart / 100;- break;- //rounding with 1.00 intervals- case RoundingType.Rounding1:- case RoundingType.Rounding1Up:- fractionPart *= 10;+ if (roundingType == RoundingType.Rounding01Down && fractionPart == 5)+ fractionPart = -5;+ else+ fractionPart = fractionPart < 5 ? fractionPart * -1 : 10 - fractionPart;- if (roundingType == RoundingType.Rounding1Up && fractionPart > 0)- rez = Math.Truncate(rez) + 1;- else- rez = fractionPart < 50 ? Math.Truncate(rez) : Math.Truncate(rez) + 1;+ rez += fractionPart / 100;+ break;+ //rounding with 0.50 intervals+ case RoundingType.Rounding05:+ fractionPart *= 10;+ fractionPart = fractionPart < 25 ? fractionPart * -1 :+ fractionPart < 50 || fractionPart < 75 ? 50 - fractionPart : 100 - fractionPart;- break;- case RoundingType.Rounding001:- default:- break;- }+ rez += fractionPart / 100;+ break;+ //rounding with 1.00 intervals+ case RoundingType.Rounding1:+ case RoundingType.Rounding1Up:+ fractionPart *= 10;- return rez;+ if (roundingType == RoundingType.Rounding1Up && fractionPart > 0)+ rez = Math.Truncate(rez) + 1;+ else+ rez = fractionPart < 50 ? Math.Truncate(rez) : Math.Truncate(rez) + 1;++ break;+ case RoundingType.Rounding001:+ default:+ break;}++ return rez;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/SeoExtensions.cs b/src/Business/Grand.Business.Core/Extensions/SeoExtensions.csindex 8cd083ed4..1fc7935d8 100644--- a/src/Business/Grand.Business.Core/Extensions/SeoExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/SeoExtensions.cs@@ -6,237 +6,233 @@ using Grand.Domain.Localization;using Grand.Domain.Seo;using Grand.SharedKernel.Extensions;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class SeoExtensions{- public static class SeoExtensions+ #region Product tag++ /// <summary>+ /// Gets product tag SE (search engine) name+ /// </summary>+ /// <param name="productTag">Product tag</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Product tag SE (search engine) name</returns>+ public static string GetSeName(this ProductTag productTag, string languageId){- #region Fields+ ArgumentNullException.ThrowIfNull(productTag);+ var seName = GenerateSlug(productTag.GetTranslation(x => x.Name, languageId), false, false, false);+ return seName;+ }++ #endregion- private static Dictionary<string, string> _seoCharacterTable;- private static readonly object SLock = new object();+ #region Fields- #endregion+ private static Dictionary<string, string> _seoCharacterTable;+ private static readonly object SLock = new();- #region Product tag+ #endregion++ #region General++ /// <summary>+ /// Get search engine friendly name (slug)+ /// </summary>+ /// <typeparam name="T">Entity type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="languageId">Language identifier</param>+ /// <param name="returnDefaultValue">+ /// A value indicating whether to return default value (if language specified one is not+ /// found)+ /// </param>+ /// <returns>Search engine name (slug)</returns>+ public static string GetSeName<T>(this T entity, string languageId, bool returnDefaultValue = true)+ where T : BaseEntity, ISlugEntity, ITranslationEntity+ {+ ArgumentNullException.ThrowIfNull(entity);- /// <summary>- /// Gets product tag SE (search engine) name- /// </summary>- /// <param name="productTag">Product tag</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Product tag SE (search engine) name</returns>- public static string GetSeName(this ProductTag productTag, string languageId)+ var seName = string.Empty;+ if (!string.IsNullOrEmpty(languageId)){- ArgumentNullException.ThrowIfNull(productTag);- var seName = GenerateSlug(productTag.GetTranslation(x => x.Name, languageId), false, false, false);- return seName;+ var value = entity.Locales.FirstOrDefault(x => x.LanguageId == languageId && x.LocaleKey == "SeName");+ if (value != null)+ if (!string.IsNullOrEmpty(value.LocaleValue))+ seName = value.LocaleValue;}- #endregion+ //set default value if required+ if (string.IsNullOrEmpty(seName) && returnDefaultValue) seName = entity.SeName;- #region General+ return seName;+ }- /// <summary>- /// Get search engine friendly name (slug)- /// </summary>- /// <typeparam name="T">Entity type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="languageId">Language identifier</param>- /// <param name="returnDefaultValue">A value indicating whether to return default value (if language specified one is not found)</param>- /// <returns>Search engine name (slug)</returns>- public static string GetSeName<T>(this T entity, string languageId, bool returnDefaultValue = true)- where T : BaseEntity, ISlugEntity, ITranslationEntity- {- ArgumentNullException.ThrowIfNull(entity);+ /// <summary>+ /// Validate search engine name+ /// </summary>+ /// <param name="entity">Entity</param>+ /// <param name="seName">Search engine name to validate</param>+ /// <param name="name">User-friendly name used to generate se-name</param>+ /// <param name="ensureNotEmpty">Ensure that se-name is not empty</param>+ /// <param name="seoSettings"></param>+ /// <param name="slugService"></param>+ /// <param name="languageService"></param>+ /// <returns>Valid se-name</returns>+ public static async Task<string> ValidateSeName<T>(this T entity, string seName, string name, bool ensureNotEmpty,+ SeoSettings seoSettings, ISlugService slugService, ILanguageService languageService)+ where T : BaseEntity, ISlugEntity+ {+ ArgumentNullException.ThrowIfNull(entity);- var seName = string.Empty;- if (!string.IsNullOrEmpty(languageId))- {- var value = entity.Locales.FirstOrDefault(x => x.LanguageId == languageId && x.LocaleKey == "SeName");- if (value != null)- if (!string.IsNullOrEmpty(value.LocaleValue))- seName = value.LocaleValue;- }+ //use name if se-name is not specified+ if (string.IsNullOrWhiteSpace(seName) && !string.IsNullOrWhiteSpace(name))+ seName = name;- //set default value if required- if (string.IsNullOrEmpty(seName) && returnDefaultValue)- {- seName = entity.SeName;- }+ //validation+ seName = GetSeName(seName, seoSettings);- return seName;- }+ //max length+ //For long URLs we can get the following error:+ //"the specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters"+ //that's why we limit it to 200 here (consider a store URL + probably added {0}-{1} below)+ seName = CommonHelper.EnsureMaximumLength(seName, 200);- /// <summary>- /// Validate search engine name- /// </summary>- /// <param name="entity">Entity</param>- /// <param name="seName">Search engine name to validate</param>- /// <param name="name">User-friendly name used to generate se-name</param>- /// <param name="ensureNotEmpty">Ensure that se-name is not empty</param>- /// <param name="seoSettings"></param>- /// <param name="slugService"></param>- /// <param name="languageService"></param>- /// <returns>Valid se-name</returns>- public static async Task<string> ValidateSeName<T>(this T entity, string seName, string name, bool ensureNotEmpty,- SeoSettings seoSettings, ISlugService slugService, ILanguageService languageService)- where T : BaseEntity, ISlugEntity+ if (string.IsNullOrWhiteSpace(seName)){- ArgumentNullException.ThrowIfNull(entity);+ if (ensureNotEmpty)+ //use entity identifier as se-name if empty+ seName = entity.Id;+ else+ //return. no need for further processing+ return seName;+ }- //use name if se-name is not specified- if (string.IsNullOrWhiteSpace(seName) && !string.IsNullOrWhiteSpace(name))- seName = name;+ //ensure this se-name is not reserved yet+ var entityName = typeof(T).Name;+ var i = 1;+ var tempSeName = seName;+ while (true)+ {+ //check whether such slug already exists (and that is not the current entity)+ var entityUrl = await slugService.GetBySlug(tempSeName);+ var reserved1 = entityUrl != null && !(entityUrl.EntityId == entity.Id &&+ entityUrl.EntityName.Equals(entityName,+ StringComparison.OrdinalIgnoreCase));+ //and it's not in the list of reserved slugs+ var reserved2 = seoSettings.ReservedEntityUrlSlugs.Contains(tempSeName, StringComparer.OrdinalIgnoreCase);+ var reserved3 = (await languageService.GetAllLanguages(true)).Any(language =>+ language.UniqueSeoCode.Equals(tempSeName, StringComparison.OrdinalIgnoreCase));+ if (!reserved1 && !reserved2 && !reserved3)+ break;- //validation- seName = GetSeName(seName, seoSettings);+ tempSeName = $"{seName}-{i}";+ i++;+ if (i <= 4) continue;+ tempSeName = $"{seName}-{Guid.NewGuid()}";+ break;+ }- //max length- //For long URLs we can get the following error:- //"the specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters"- //that's why we limit it to 200 here (consider a store URL + probably added {0}-{1} below)- seName = CommonHelper.EnsureMaximumLength(seName, 200);+ seName = tempSeName;- if (string.IsNullOrWhiteSpace(seName))- {- if (ensureNotEmpty)- {- //use entity identifier as se-name if empty- seName = entity.Id;- }- else- {- //return. no need for further processing- return seName;- }- }+ return seName;+ }- //ensure this se-name is not reserved yet- var entityName = typeof(T).Name;- var i = 1;- var tempSeName = seName;- while (true)- {- //check whether such slug already exists (and that is not the current entity)- var entityUrl = await slugService.GetBySlug(tempSeName);- var reserved1 = entityUrl != null && !(entityUrl.EntityId == entity.Id && entityUrl.EntityName.Equals(entityName, StringComparison.OrdinalIgnoreCase));- //and it's not in the list of reserved slugs- var reserved2 = seoSettings.ReservedEntityUrlSlugs.Contains(tempSeName, StringComparer.OrdinalIgnoreCase);- var reserved3 = (await languageService.GetAllLanguages(true)).Any(language => language.UniqueSeoCode.Equals(tempSeName, StringComparison.OrdinalIgnoreCase));- if (!reserved1 && !reserved2 && !reserved3)- break;-- tempSeName = $"{seName}-{i}";- i++;- if (i <= 4) continue;- tempSeName = $"{seName}-{Guid.NewGuid()}";- break;- }- seName = tempSeName;- return seName;- }+ /// <summary>+ /// Get SE name+ /// </summary>+ /// <param name="name">Name</param>+ /// <param name="seoSettings">SeoSettings</param>+ /// <returns>Result</returns>+ public static string GetSeName(string name, SeoSettings seoSettings)+ {+ return GenerateSlug(name, seoSettings.ConvertNonWesternChars, seoSettings.AllowUnicodeCharsInUrls,+ seoSettings.AllowSlashChar, seoSettings.SeoCharConversion);+ }+ /// <summary>+ /// Get SE name+ /// </summary>+ /// <param name="name">Name</param>+ /// <param name="convertNonWesternChars"></param>+ /// <param name="allowUnicodeCharsInUrls"></param>+ /// <param name="charConversions"></param>+ /// <returns>Result</returns>+ public static string GetSeName(string name, bool convertNonWesternChars, bool allowUnicodeCharsInUrls,+ string charConversions = null)+ {+ return GenerateSlug(name, convertNonWesternChars, allowUnicodeCharsInUrls, false, charConversions);+ }- /// <summary>- /// Get SE name- /// </summary>- /// <param name="name">Name</param>- /// <param name="seoSettings">SeoSettings</param>- /// <returns>Result</returns>- public static string GetSeName(string name, SeoSettings seoSettings)- {- return GenerateSlug(name, seoSettings.ConvertNonWesternChars, seoSettings.AllowUnicodeCharsInUrls, seoSettings.AllowSlashChar, seoSettings.SeoCharConversion);- }+ /// <summary>+ /// Get SE name+ /// </summary>+ /// <param name="name">Name</param>+ /// <param name="convertNonWesternChars">A value indicating whether non western chars should be converted</param>+ /// <param name="allowUnicodeCharsInUrls">A value indicating whether Unicode chars are allowed</param>+ /// <param name="allowSlashChar"></param>+ /// <param name="charConversions"></param>+ /// <returns>Result</returns>+ public static string GenerateSlug(string name, bool convertNonWesternChars, bool allowUnicodeCharsInUrls,+ bool allowSlashChar, string charConversions = null)+ {+ if (string.IsNullOrEmpty(name))+ return name;- /// <summary>- /// Get SE name- /// </summary>- /// <param name="name">Name</param>- /// <param name="convertNonWesternChars"></param>- /// <param name="allowUnicodeCharsInUrls"></param>- /// <param name="charConversions"></param>- /// <returns>Result</returns>- public static string GetSeName(string name, bool convertNonWesternChars, bool allowUnicodeCharsInUrls, string charConversions = null)- {- return GenerateSlug(name, convertNonWesternChars, allowUnicodeCharsInUrls, false, charConversions);- }+ var okChars = "abcdefghijklmnopqrstuvwxyz1234567890 _-";+ if (allowSlashChar)+ okChars += '/';- /// <summary>- /// Get SE name- /// </summary>- /// <param name="name">Name</param>- /// <param name="convertNonWesternChars">A value indicating whether non western chars should be converted</param>- /// <param name="allowUnicodeCharsInUrls">A value indicating whether Unicode chars are allowed</param>- /// <param name="allowSlashChar"></param>- /// <param name="charConversions"></param>- /// <returns>Result</returns>- public static string GenerateSlug(string name, bool convertNonWesternChars, bool allowUnicodeCharsInUrls, bool allowSlashChar, string charConversions = null)- {- if (string.IsNullOrEmpty(name))- return name;+ name = name.Trim().ToLowerInvariant();- var okChars = "abcdefghijklmnopqrstuvwxyz1234567890 _-";- if (allowSlashChar)- okChars += '/';+ if (convertNonWesternChars)+ if (!string.IsNullOrEmpty(charConversions) && _seoCharacterTable == null)+ InitializeSeoCharacterTable(charConversions);- name = name.Trim().ToLowerInvariant();+ var sb = new StringBuilder();+ foreach (var c in name.ToCharArray())+ {+ var c2 = c.ToString();+ if (convertNonWesternChars && _seoCharacterTable != null)+ if (_seoCharacterTable.ContainsKey(c2))+ c2 = _seoCharacterTable[c2];- if (convertNonWesternChars)+ if (allowUnicodeCharsInUrls){- if (!string.IsNullOrEmpty(charConversions) && _seoCharacterTable == null)- InitializeSeoCharacterTable(charConversions);+ if (char.IsLetterOrDigit(c) || okChars.Contains(c2))+ sb.Append(c2);}-- var sb = new StringBuilder();- foreach (var c in name.ToCharArray())+ else if (okChars.Contains(c2)){- var c2 = c.ToString();- if (convertNonWesternChars && _seoCharacterTable != null)- {- if (_seoCharacterTable.ContainsKey(c2))- c2 = _seoCharacterTable[c2];- }-- if (allowUnicodeCharsInUrls)- {- if (char.IsLetterOrDigit(c) || okChars.Contains(c2))- sb.Append(c2);- }- else if (okChars.Contains(c2))- {- sb.Append(c2);- }+ sb.Append(c2);}- var name2 = sb.ToString();- name2 = name2.Replace(" ", "-");- while (name2.Contains("--"))- name2 = name2.Replace("--", "-");- while (name2.Contains("__"))- name2 = name2.Replace("__", "_");- return name2;}- private static void InitializeSeoCharacterTable(string charConversions)+ var name2 = sb.ToString();+ name2 = name2.Replace(" ", "-");+ while (name2.Contains("--"))+ name2 = name2.Replace("--", "-");+ while (name2.Contains("__"))+ name2 = name2.Replace("__", "_");+ return name2;+ }++ private static void InitializeSeoCharacterTable(string charConversions)+ {+ lock (SLock){- lock (SLock)+ if (_seoCharacterTable != null) return;+ _seoCharacterTable = new Dictionary<string, string>();++ foreach (var conversion in charConversions.Split(";")){- if (_seoCharacterTable != null) return;- _seoCharacterTable = new Dictionary<string, string>();-- foreach (var conversion in charConversions.Split(";"))- {- var strLeft = conversion.Split(":").FirstOrDefault();- var strRight = conversion.Split(":").LastOrDefault();- if (!string.IsNullOrEmpty(strLeft) && !_seoCharacterTable.ContainsKey(strLeft))- {- _seoCharacterTable.Add(strLeft.Trim(), strRight?.Trim());- }- }+ var strLeft = conversion.Split(":").FirstOrDefault();+ var strRight = conversion.Split(":").LastOrDefault();+ if (!string.IsNullOrEmpty(strLeft) && !_seoCharacterTable.ContainsKey(strLeft))+ _seoCharacterTable.Add(strLeft.Trim(), strRight?.Trim());}-}-- #endregion}-}++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/ShippingEventPublisherExtensions.cs b/src/Business/Grand.Business.Core/Extensions/ShippingEventPublisherExtensions.csindex 9565d5435..535da70ce 100644--- a/src/Business/Grand.Business.Core/Extensions/ShippingEventPublisherExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/ShippingEventPublisherExtensions.cs@@ -2,27 +2,27 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class ShippingEventPublisherExtensions{- public static class ShippingEventPublisherExtensions+ /// <summary>+ /// Publishes the shipment sent event.+ /// </summary>+ /// <param name="mediator">The event publisher.</param>+ /// <param name="shipment">The shipment.</param>+ public static async Task PublishShipmentSent(this IMediator mediator, Shipment shipment)+ {+ await mediator.Publish(new ShipmentSentEvent(shipment));+ }++ /// <summary>+ /// Publishes the shipment delivered event.+ /// </summary>+ /// <param name="mediator">The event publisher.</param>+ /// <param name="shipment">The shipment.</param>+ public static async Task PublishShipmentDelivered(this IMediator mediator, Shipment shipment){- /// <summary>- /// Publishes the shipment sent event.- /// </summary>- /// <param name="mediator">The event publisher.</param>- /// <param name="shipment">The shipment.</param>- public static async Task PublishShipmentSent(this IMediator mediator, Shipment shipment)- {- await mediator.Publish(new ShipmentSentEvent(shipment));- }- /// <summary>- /// Publishes the shipment delivered event.- /// </summary>- /// <param name="mediator">The event publisher.</param>- /// <param name="shipment">The shipment.</param>- public static async Task PublishShipmentDelivered(this IMediator mediator, Shipment shipment)- {- await mediator.Publish(new ShipmentDeliveredEvent(shipment));- }+ await mediator.Publish(new ShipmentDeliveredEvent(shipment));}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/ShippingExtensions.cs b/src/Business/Grand.Business.Core/Extensions/ShippingExtensions.csindex deeedb0b3..da5b9fe8d 100644--- a/src/Business/Grand.Business.Core/Extensions/ShippingExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/ShippingExtensions.cs@@ -1,43 +1,45 @@using Grand.Business.Core.Interfaces.Checkout.Shipping;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class ShippingExtensions{- public static class ShippingExtensions+ public static bool IsShippingRateMethodActive(this IShippingRateCalculationProvider srcm,+ ShippingProviderSettings shippingProviderSettings)+ {+ ArgumentNullException.ThrowIfNull(srcm);+ ArgumentNullException.ThrowIfNull(shippingProviderSettings);++ return shippingProviderSettings.ActiveSystemNames != null && shippingProviderSettings.ActiveSystemNames.Any(+ activeMethodSystemName =>+ srcm.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));+ }++ public static bool CountryRestrictionExists(this ShippingMethod shippingMethod,+ string countryId)+ {+ ArgumentNullException.ThrowIfNull(shippingMethod);++ var result = shippingMethod.RestrictedCountries.ToList().Find(c => c.Id == countryId) != null;+ return result;+ }++ public static bool CustomerGroupRestrictionExists(this ShippingMethod shippingMethod,+ string roleId){- public static bool IsShippingRateMethodActive(this IShippingRateCalculationProvider srcm,- ShippingProviderSettings shippingProviderSettings)- {- ArgumentNullException.ThrowIfNull(srcm);- ArgumentNullException.ThrowIfNull(shippingProviderSettings);-- return shippingProviderSettings.ActiveSystemNames != null && shippingProviderSettings.ActiveSystemNames.Any(activeMethodSystemName => srcm.SystemName.Equals(activeMethodSystemName, StringComparison.OrdinalIgnoreCase));- }-- public static bool CountryRestrictionExists(this ShippingMethod shippingMethod,- string countryId)- {- ArgumentNullException.ThrowIfNull(shippingMethod);-- var result = shippingMethod.RestrictedCountries.ToList().Find(c => c.Id == countryId) != null;- return result;- }- public static bool CustomerGroupRestrictionExists(this ShippingMethod shippingMethod,- string roleId)- {- ArgumentNullException.ThrowIfNull(shippingMethod);-- var result = shippingMethod.RestrictedGroups.ToList().Find(c => c == roleId) != null;- return result;- }-- public static bool CustomerGroupRestrictionExists(this ShippingMethod shippingMethod,- List<string> roleIds)- {- ArgumentNullException.ThrowIfNull(shippingMethod);-- var result = shippingMethod.RestrictedGroups.ToList().Find(roleIds.Contains) != null;- return result;- }+ ArgumentNullException.ThrowIfNull(shippingMethod);++ var result = shippingMethod.RestrictedGroups.ToList().Find(c => c == roleId) != null;+ return result;+ }++ public static bool CustomerGroupRestrictionExists(this ShippingMethod shippingMethod,+ List<string> roleIds)+ {+ ArgumentNullException.ThrowIfNull(shippingMethod);++ var result = shippingMethod.RestrictedGroups.ToList().Find(roleIds.Contains) != null;+ return result;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/ShoppingCartEventPublisherExtensions.cs b/src/Business/Grand.Business.Core/Extensions/ShoppingCartEventPublisherExtensions.csindex b20df6832..0a45e2f34 100644--- a/src/Business/Grand.Business.Core/Extensions/ShoppingCartEventPublisherExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/ShoppingCartEventPublisherExtensions.cs@@ -5,19 +5,23 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class ShoppingCartEventPublisherExtensions{- public static class ShoppingCartEventPublisherExtensions+ public static async Task ShoppingCartWarningsAdd<T, U>(this IMediator eventPublisher, IList<T> warnings,+ IList<U> shoppingCartItems, IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes)+ where U : ShoppingCartItem{- public static async Task ShoppingCartWarningsAdd<T, U>(this IMediator eventPublisher, IList<T> warnings, IList<U> shoppingCartItems, IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes) where U : ShoppingCartItem- {- await eventPublisher.Publish(new ShoppingCartWarningsEvent<T, U>(warnings, shoppingCartItems, checkoutAttributes, validateCheckoutAttributes));- }-- public static async Task ShoppingCartItemWarningsAdded<C, S, P>(this IMediator eventPublisher, IList<string> warnings, C customer, S shoppingCartItem, P product) where C : Customer where S : ShoppingCartItem where P : Product- {- await eventPublisher.Publish(new ShoppingCartItemWarningsEvent<C, S, P>(warnings, customer, shoppingCartItem, product));- }+ await eventPublisher.Publish(new ShoppingCartWarningsEvent<T, U>(warnings, shoppingCartItems,+ checkoutAttributes, validateCheckoutAttributes));+ }+ public static async Task ShoppingCartItemWarningsAdded<C, S, P>(this IMediator eventPublisher,+ IList<string> warnings, C customer, S shoppingCartItem, P product)+ where C : Customer where S : ShoppingCartItem where P : Product+ {+ await eventPublisher.Publish(+ new ShoppingCartItemWarningsEvent<C, S, P>(warnings, customer, shoppingCartItem, product));}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/TranslateExtensions.cs b/src/Business/Grand.Business.Core/Extensions/TranslateExtensions.csindex 3c2ada54d..eddab5851 100644--- a/src/Business/Grand.Business.Core/Extensions/TranslateExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/TranslateExtensions.cs@@ -8,272 +8,267 @@ using Grand.SharedKernel.Extensions;using System.Linq.Expressions;using System.Reflection;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class TranslateExtensions{- public static class TranslateExtensions+ /// <summary>+ /// Get translation property of an entity+ /// </summary>+ /// <typeparam name="T">Entity type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="keySelector">Key selector</param>+ /// <param name="languageId">Language identifier</param>+ /// <param name="returnDefaultValue">A value indicating whether to return default value (if translation is not found)</param>+ /// <returns>Translation property</returns>+ public static string GetTranslation<T>(this T entity,+ Expression<Func<T, string>> keySelector, string languageId,+ bool returnDefaultValue = true)+ where T : ParentEntity, ITranslationEntity{+ ArgumentNullException.ThrowIfNull(entity);- /// <summary>- /// Get translation property of an entity- /// </summary>- /// <typeparam name="T">Entity type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="keySelector">Key selector</param>- /// <param name="languageId">Language identifier</param>- /// <param name="returnDefaultValue">A value indicating whether to return default value (if translation is not found)</param>- /// <returns>Translation property</returns>- public static string GetTranslation<T>(this T entity,- Expression<Func<T, string>> keySelector, string languageId,- bool returnDefaultValue = true)- where T : ParentEntity, ITranslationEntity- {- ArgumentNullException.ThrowIfNull(entity);-- if (keySelector.Body is not MemberExpression member)- throw new ArgumentException($"Expression '{keySelector}' refers to a method, not a property.");+ if (keySelector.Body is not MemberExpression member)+ throw new ArgumentException($"Expression '{keySelector}' refers to a method, not a property.");- var propInfo = member.Member as PropertyInfo;- if (propInfo == null)- throw new ArgumentException($"Expression '{keySelector}' refers to a field, not a property.");+ var propInfo = member.Member as PropertyInfo;+ if (propInfo == null)+ throw new ArgumentException($"Expression '{keySelector}' refers to a field, not a property.");- string result = default;- var resultStr = string.Empty;+ string result = default;+ var resultStr = string.Empty;- var localeKey = propInfo.Name;+ var localeKey = propInfo.Name;- if (!string.IsNullOrEmpty(languageId))+ if (!string.IsNullOrEmpty(languageId))+ if (entity.Locales.Any()){- if (entity.Locales.Any())+ var en = entity.Locales.FirstOrDefault(x => x.LanguageId == languageId && x.LocaleKey == localeKey);+ if (en != null){- var en = entity.Locales.FirstOrDefault(x => x.LanguageId == languageId && x.LocaleKey == localeKey);- if (en != null)- {- resultStr = en.LocaleValue;- if (!string.IsNullOrEmpty(resultStr))- result = resultStr;- }+ resultStr = en.LocaleValue;+ if (!string.IsNullOrEmpty(resultStr))+ result = resultStr;}}- //set default value if required- if (string.IsNullOrEmpty(resultStr) && returnDefaultValue)- {- result = (string)propInfo.GetValue(entity);- }- return result;- }+ //set default value if required+ if (string.IsNullOrEmpty(resultStr) && returnDefaultValue) result = (string)propInfo.GetValue(entity);+ return result;+ }- /// <summary>- /// Get translation value of enum- /// </summary>- /// <typeparam name="T">Enum</typeparam>- /// <param name="enumValue">Enum value</param>- /// <param name="translationService">Translation service</param>- /// <param name="workContext">Work context</param>- /// <returns>Translation value</returns>- public static string GetTranslationEnum<T>(this T enumValue,- ITranslationService translationService,- IWorkContext workContext)- where T : struct- {- ArgumentNullException.ThrowIfNull(workContext);+ /// <summary>+ /// Get translation value of enum+ /// </summary>+ /// <typeparam name="T">Enum</typeparam>+ /// <param name="enumValue">Enum value</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="workContext">Work context</param>+ /// <returns>Translation value</returns>+ public static string GetTranslationEnum<T>(this T enumValue,+ ITranslationService translationService,+ IWorkContext workContext)+ where T : struct+ {+ ArgumentNullException.ThrowIfNull(workContext);- return GetTranslationEnum(enumValue, translationService, workContext.WorkingLanguage.Id);- }- /// <summary>- /// Get translation value of enum- /// </summary>- /// <typeparam name="T">Enum</typeparam>- /// <param name="enumValue">Enum value</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Translation value</returns>- public static string GetTranslationEnum<T>(this T enumValue,- ITranslationService translationService, string languageId)- where T : struct- {- ArgumentNullException.ThrowIfNull(translationService);+ return GetTranslationEnum(enumValue, translationService, workContext.WorkingLanguage.Id);+ }- if (!typeof(T).GetTypeInfo().IsEnum) throw new ArgumentException("T must be enum type");+ /// <summary>+ /// Get translation value of enum+ /// </summary>+ /// <typeparam name="T">Enum</typeparam>+ /// <param name="enumValue">Enum value</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Translation value</returns>+ public static string GetTranslationEnum<T>(this T enumValue,+ ITranslationService translationService, string languageId)+ where T : struct+ {+ ArgumentNullException.ThrowIfNull(translationService);- //Translation value- var resourceName = $"Enums.{typeof(T)}.{enumValue.ToString()}";- var result = translationService.GetResource(resourceName, languageId, "", true);+ if (!typeof(T).GetTypeInfo().IsEnum) throw new ArgumentException("T must be enum type");- //set default value if required- if (string.IsNullOrEmpty(result))- result = CommonHelper.ConvertEnum(enumValue);+ //Translation value+ var resourceName = $"Enums.{typeof(T)}.{enumValue.ToString()}";+ var result = translationService.GetResource(resourceName, languageId, "", true);- return result;- }+ //set default value if required+ if (string.IsNullOrEmpty(result))+ result = CommonHelper.ConvertEnum(enumValue);+ return result;+ }- /// <summary>- /// Get translation value of permission- /// We don't have UI to manage permission localizable name. That's why we're using this extension method- /// </summary>- /// <param name="permissionRecord">Permission record</param>- /// <param name="translationService">Translation service</param>- /// <param name="workContext">Work context</param>- /// <returns>Translation value</returns>- public static string GetTranslationPermissionName(this Permission permissionRecord,- ITranslationService translationService, IWorkContext workContext)- {- ArgumentNullException.ThrowIfNull(workContext);- return GetTranslationPermissionName(permissionRecord, translationService, workContext.WorkingLanguage.Id);- }- /// <summary>- /// Get translation value of enum- /// We don't have UI to manage permission translation name. That's why we're using this extension method- /// </summary>- /// <param name="permissionRecord">Permission record</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Translation value</returns>- public static string GetTranslationPermissionName(this Permission permissionRecord,- ITranslationService translationService, string languageId)- {- ArgumentNullException.ThrowIfNull(permissionRecord);- ArgumentNullException.ThrowIfNull(translationService);+ /// <summary>+ /// Get translation value of permission+ /// We don't have UI to manage permission localizable name. That's why we're using this extension method+ /// </summary>+ /// <param name="permissionRecord">Permission record</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="workContext">Work context</param>+ /// <returns>Translation value</returns>+ public static string GetTranslationPermissionName(this Permission permissionRecord,+ ITranslationService translationService, IWorkContext workContext)+ {+ ArgumentNullException.ThrowIfNull(workContext);++ return GetTranslationPermissionName(permissionRecord, translationService, workContext.WorkingLanguage.Id);+ }- //Translation value- var name = $"Permission.{permissionRecord.SystemName}";- var result = translationService.GetResource(name, languageId, "", true);+ /// <summary>+ /// Get translation value of enum+ /// We don't have UI to manage permission translation name. That's why we're using this extension method+ /// </summary>+ /// <param name="permissionRecord">Permission record</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Translation value</returns>+ public static string GetTranslationPermissionName(this Permission permissionRecord,+ ITranslationService translationService, string languageId)+ {+ ArgumentNullException.ThrowIfNull(permissionRecord);+ ArgumentNullException.ThrowIfNull(translationService);- //set default value if required- if (string.IsNullOrEmpty(result))- result = permissionRecord.Name;+ //Translation value+ var name = $"Permission.{permissionRecord.SystemName}";+ var result = translationService.GetResource(name, languageId, "", true);- return result;- }+ //set default value if required+ if (string.IsNullOrEmpty(result))+ result = permissionRecord.Name;- /// <summary>- /// Save translation name of a permission- /// </summary>- /// <param name="permissionRecord">Permission record</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageService">Language service</param>- public static async Task SaveTranslationPermissionName(this Permission permissionRecord,- ITranslationService translationService, ILanguageService languageService)- {- ArgumentNullException.ThrowIfNull(permissionRecord);- ArgumentNullException.ThrowIfNull(translationService);- ArgumentNullException.ThrowIfNull(languageService);+ return result;+ }- var name = $"Permission.{permissionRecord.SystemName}";- var value = permissionRecord.Name;+ /// <summary>+ /// Save translation name of a permission+ /// </summary>+ /// <param name="permissionRecord">Permission record</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageService">Language service</param>+ public static async Task SaveTranslationPermissionName(this Permission permissionRecord,+ ITranslationService translationService, ILanguageService languageService)+ {+ ArgumentNullException.ThrowIfNull(permissionRecord);+ ArgumentNullException.ThrowIfNull(translationService);+ ArgumentNullException.ThrowIfNull(languageService);++ var name = $"Permission.{permissionRecord.SystemName}";+ var value = permissionRecord.Name;- foreach (var lang in await languageService.GetAllLanguages(true))+ foreach (var lang in await languageService.GetAllLanguages(true))+ {+ var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);+ if (lsr == null){- var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);- if (lsr == null)- {- lsr = new TranslationResource- {- LanguageId = lang.Id,- Name = name,- Value = value- };- await translationService.InsertTranslateResource(lsr);- }- else- {- lsr.Value = value;- await translationService.UpdateTranslateResource(lsr);- }+ lsr = new TranslationResource {+ LanguageId = lang.Id,+ Name = name,+ Value = value+ };+ await translationService.InsertTranslateResource(lsr);}- }- /// <summary>- /// Delete a translation name of a permission- /// </summary>- /// <param name="permissionRecord">Permission record</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageService">Language service</param>- public static async Task DeleteTranslationPermissionName(this Permission permissionRecord,- ITranslationService translationService, ILanguageService languageService)- {- ArgumentNullException.ThrowIfNull(permissionRecord);- ArgumentNullException.ThrowIfNull(translationService);- ArgumentNullException.ThrowIfNull(languageService);-- var name = $"Permission.{permissionRecord.SystemName}";- foreach (var lang in await languageService.GetAllLanguages(true))+ else{- var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);- if (lsr != null)- await translationService.DeleteTranslateResource(lsr);+ lsr.Value = value;+ await translationService.UpdateTranslateResource(lsr);}}+ }++ /// <summary>+ /// Delete a translation name of a permission+ /// </summary>+ /// <param name="permissionRecord">Permission record</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageService">Language service</param>+ public static async Task DeleteTranslationPermissionName(this Permission permissionRecord,+ ITranslationService translationService, ILanguageService languageService)+ {+ ArgumentNullException.ThrowIfNull(permissionRecord);+ ArgumentNullException.ThrowIfNull(translationService);+ ArgumentNullException.ThrowIfNull(languageService);- /// <summary>- /// Delete a translation resource- /// </summary>- /// <param name="plugin">Plugin</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageService">Language service</param>- /// <param name="name">Name</param>- public static async Task DeletePluginTranslationResource(this BasePlugin plugin,- ITranslationService translationService, ILanguageService languageService,- string name)+ var name = $"Permission.{permissionRecord.SystemName}";+ foreach (var lang in await languageService.GetAllLanguages(true)){- ArgumentNullException.ThrowIfNull(plugin);- ArgumentNullException.ThrowIfNull(translationService);- ArgumentNullException.ThrowIfNull(languageService);- if (!string.IsNullOrEmpty(name))- name = name.ToLowerInvariant();- foreach (var lang in await languageService.GetAllLanguages(true))- {- var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);- if (lsr != null)- await translationService.DeleteTranslateResource(lsr);- }+ var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);+ if (lsr != null)+ await translationService.DeleteTranslateResource(lsr);}+ }- /// <summary>- /// Add a translate resource (if new) or update an existing one- /// </summary>- /// <param name="plugin">Plugin</param>- /// <param name="translationService">Translation service</param>- /// <param name="languageService">Language service</param>- /// <param name="name">Name</param>- /// <param name="value">Value</param>- /// <param name="area">Area</param>- /// <param name="languageCulture">Language culture code. If null or empty, then a resource will be added for all languages</param>- public static async Task AddOrUpdatePluginTranslateResource(this BasePlugin plugin,- ITranslationService translationService, ILanguageService languageService,- string name, string value, TranslationResourceArea area = TranslationResourceArea.Common, string languageCulture = null)+ /// <summary>+ /// Delete a translation resource+ /// </summary>+ /// <param name="plugin">Plugin</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageService">Language service</param>+ /// <param name="name">Name</param>+ public static async Task DeletePluginTranslationResource(this BasePlugin plugin,+ ITranslationService translationService, ILanguageService languageService,+ string name)+ {+ ArgumentNullException.ThrowIfNull(plugin);+ ArgumentNullException.ThrowIfNull(translationService);+ ArgumentNullException.ThrowIfNull(languageService);+ if (!string.IsNullOrEmpty(name))+ name = name.ToLowerInvariant();+ foreach (var lang in await languageService.GetAllLanguages(true)){- //actually plugin instance is not required- ArgumentNullException.ThrowIfNull(plugin);- ArgumentNullException.ThrowIfNull(translationService);- ArgumentNullException.ThrowIfNull(languageService);- if (!string.IsNullOrEmpty(name))- name = name.ToLowerInvariant();- foreach (var lang in await languageService.GetAllLanguages(true))- {- if (!string.IsNullOrEmpty(languageCulture) && !languageCulture.Equals(lang.LanguageCulture))- continue;+ var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);+ if (lsr != null)+ await translationService.DeleteTranslateResource(lsr);+ }+ }- var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);- if (lsr == null)- {- lsr = new TranslationResource- {- LanguageId = lang.Id,- Name = name,- Value = value,- Area = area- };- await translationService.InsertTranslateResource(lsr);- }- else- {- lsr.Value = value;- lsr.Area = area;- await translationService.UpdateTranslateResource(lsr);- }+ /// <summary>+ /// Add a translate resource (if new) or update an existing one+ /// </summary>+ /// <param name="plugin">Plugin</param>+ /// <param name="translationService">Translation service</param>+ /// <param name="languageService">Language service</param>+ /// <param name="name">Name</param>+ /// <param name="value">Value</param>+ /// <param name="area">Area</param>+ /// <param name="languageCulture">Language culture code. If null or empty, then a resource will be added for all languages</param>+ public static async Task AddOrUpdatePluginTranslateResource(this BasePlugin plugin,+ ITranslationService translationService, ILanguageService languageService,+ string name, string value, TranslationResourceArea area = TranslationResourceArea.Common,+ string languageCulture = null)+ {+ //actually plugin instance is not required+ ArgumentNullException.ThrowIfNull(plugin);+ ArgumentNullException.ThrowIfNull(translationService);+ ArgumentNullException.ThrowIfNull(languageService);+ if (!string.IsNullOrEmpty(name))+ name = name.ToLowerInvariant();+ foreach (var lang in await languageService.GetAllLanguages(true))+ {+ if (!string.IsNullOrEmpty(languageCulture) && !languageCulture.Equals(lang.LanguageCulture))+ continue;++ var lsr = await translationService.GetTranslateResourceByName(name, lang.Id);+ if (lsr == null)+ {+ lsr = new TranslationResource {+ LanguageId = lang.Id,+ Name = name,+ Value = value,+ Area = area+ };+ await translationService.InsertTranslateResource(lsr);+ }+ else+ {+ lsr.Value = value;+ lsr.Area = area;+ await translationService.UpdateTranslateResource(lsr);}}}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Extensions/UserFieldExtensions.cs b/src/Business/Grand.Business.Core/Extensions/UserFieldExtensions.csindex 5c9df1bcb..4b5014b2d 100644--- a/src/Business/Grand.Business.Core/Extensions/UserFieldExtensions.cs+++ b/src/Business/Grand.Business.Core/Extensions/UserFieldExtensions.cs@@ -1,24 +1,24 @@using Grand.Business.Core.Interfaces.Common.Directory;using Grand.Domain;-namespace Grand.Business.Core.Extensions+namespace Grand.Business.Core.Extensions;++public static class UserFieldExtensions{- public static class UserFieldExtensions+ /// <summary>+ /// Get an user field of an entity+ /// </summary>+ /// <typeparam name="TPropType">Property type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="userFieldService">UserFieldService</param>+ /// <param name="key">Key</param>+ /// <param name="storeId">Load a value specific for a certain store; pass 0 to load a value shared for all stores</param>+ /// <returns>Attribute</returns>+ public static async Task<TPropType> GetUserField<TPropType>(this BaseEntity entity,+ IUserFieldService userFieldService, string key, string storeId = ""){- /// <summary>- /// Get an user field of an entity- /// </summary>- /// <typeparam name="TPropType">Property type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="userFieldService">UserFieldService</param>- /// <param name="key">Key</param>- /// <param name="storeId">Load a value specific for a certain store; pass 0 to load a value shared for all stores</param>- /// <returns>Attribute</returns>- public static async Task<TPropType> GetUserField<TPropType>(this BaseEntity entity, IUserFieldService userFieldService, string key, string storeId = "")- {- ArgumentNullException.ThrowIfNull(entity);+ ArgumentNullException.ThrowIfNull(entity);- return await userFieldService.GetFieldsForEntity<TPropType>(entity, key, storeId);- }+ return await userFieldService.GetFieldsForEntity<TPropType>(entity, key, storeId);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IApiAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IApiAuthenticationService.csindex d6f329df0..62e8e7921 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IApiAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IApiAuthenticationService.cs@@ -1,14 +1,12 @@using Grand.Domain.Customers;-using Microsoft.AspNetCore.Http;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++public interface IApiAuthenticationService{- public interface IApiAuthenticationService- {- /// <summary>- /// Get authenticated customer- /// </summary>- /// <returns>Customer</returns>- Task<Customer> GetAuthenticatedCustomer();- }-}+ /// <summary>+ /// Get authenticated customer+ /// </summary>+ /// <returns>Customer</returns>+ Task<Customer> GetAuthenticatedCustomer();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IAuthenticationBuilder.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IAuthenticationBuilder.csindex fb3262a42..7d7edfb6a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IAuthenticationBuilder.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IAuthenticationBuilder.cs@@ -1,23 +1,22 @@using Microsoft.AspNetCore.Authentication;using Microsoft.Extensions.Configuration;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++/// <summary>+/// Interface to add authentication+/// </summary>+public interface IAuthenticationBuilder{/// <summary>- /// Interface to add authentication+ /// Gets priority/// </summary>- public interface IAuthenticationBuilder- {- /// <summary>- /// Add Authentication- /// </summary>- /// <param name="builder">Add Authentication builder</param>- /// <param name="configuration">Configuration</param>- void AddAuthentication(AuthenticationBuilder builder, IConfiguration configuration);+ int Priority { get; }- /// <summary>- /// Gets priority- /// </summary>- int Priority { get; }- }-}+ /// <summary>+ /// Add Authentication+ /// </summary>+ /// <param name="builder">Add Authentication builder</param>+ /// <param name="configuration">Configuration</param>+ void AddAuthentication(AuthenticationBuilder builder, IConfiguration configuration);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationProvider.csindex 51324c2c5..5dee9e91c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationProvider.cs@@ -1,15 +1,14 @@using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++/// <summary>+/// Represents method for the external authentication+/// </summary>+public interface IExternalAuthenticationProvider : IProvider{/// <summary>- /// Represents method for the external authentication+ /// Gets a view component for displaying plugin in public store/// </summary>- public interface IExternalAuthenticationProvider : IProvider- {- /// <summary>- /// Gets a view component for displaying plugin in public store- /// </summary>- Task<string> GetPublicViewComponentName();- }-}+ Task<string> GetPublicViewComponentName();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationService.csindex 1ebde72cb..9df583b32 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IExternalAuthenticationService.cs@@ -3,80 +3,78 @@ using Grand.Domain.Customers;using Grand.Domain.Stores;using Microsoft.AspNetCore.Mvc;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++/// <summary>+/// External authentication service+/// </summary>+public interface IExternalAuthenticationService{+ #region Authentication+/// <summary>- /// External authentication service+ /// Use passed parameters to authenticate customer/// </summary>- public interface IExternalAuthenticationService- {- #region External authentication methods-- /// <summary>- /// Load all active authentication providers- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="store">Store</param>- /// <returns>External authentication providers</returns>- IList<IExternalAuthenticationProvider> LoadActiveAuthenticationProviders(Customer customer = null, Store store = null);-- /// <summary>- /// Load specified external authentication provider by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found external authentication method</returns>- IExternalAuthenticationProvider LoadAuthenticationProviderBySystemName(string systemName);-- /// <summary>- /// Load all external authentication providers independently from status- /// </summary>- /// <returns>External authentication providers</returns>- IList<IExternalAuthenticationProvider> LoadAllAuthenticationProviders();+ /// <param name="parameters">External authentication parameters</param>+ /// <param name="returnUrl">Defines the URL of user return, when successfully authenticated</param>+ /// <returns>Result of an authentication</returns>+ Task<IActionResult> Authenticate(ExternalAuthParam parameters, string returnUrl = null);- /// <summary>- /// Check whether authentication by the passed external authentication provider is available- /// </summary>- /// <param name="systemName">System name of the external authentication provider</param>- /// <returns>True if is available; otherwise false</returns>- bool AuthenticationProviderIsAvailable(string systemName);+ #endregion+ /// <summary>+ /// Associate the external account with customer+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="parameters">External authentication parameters</param>+ Task AssociateCustomer(Customer customer, ExternalAuthParam parameters);- #endregion+ /// <summary>+ /// Get the particular user with specified parameters+ /// </summary>+ /// <param name="parameters">External authentication parameters</param>+ /// <returns>Customer</returns>+ Task<Customer> GetCustomer(ExternalAuthParam parameters);- #region Authentication- /// <summary>- /// Use passed parameters to authenticate customer- /// </summary>- /// <param name="parameters">External authentication parameters</param>- /// <param name="returnUrl">Defines the URL of user return, when successfully authenticated</param>- /// <returns>Result of an authentication</returns>- Task<IActionResult> Authenticate(ExternalAuthParam parameters, string returnUrl = null);+ Task<IList<ExternalAuthentication>> GetExternalIdentifiers(Customer customer);+ /// <summary>+ /// Delete the external authentication+ /// </summary>+ /// <param name="externalAuthentication">External authentication</param>+ Task DeleteExternalAuthentication(ExternalAuthentication externalAuthentication);- #endregion+ #region External authentication methods- /// <summary>- /// Associate the external account with customer- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="parameters">External authentication parameters</param>- Task AssociateCustomer(Customer customer, ExternalAuthParam parameters);+ /// <summary>+ /// Load all active authentication providers+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="store">Store</param>+ /// <returns>External authentication providers</returns>+ IList<IExternalAuthenticationProvider> LoadActiveAuthenticationProviders(Customer customer = null,+ Store store = null);- /// <summary>- /// Get the particular user with specified parameters- /// </summary>- /// <param name="parameters">External authentication parameters</param>- /// <returns>Customer</returns>- Task<Customer> GetCustomer(ExternalAuthParam parameters);+ /// <summary>+ /// Load specified external authentication provider by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found external authentication method</returns>+ IExternalAuthenticationProvider LoadAuthenticationProviderBySystemName(string systemName);+ /// <summary>+ /// Load all external authentication providers independently from status+ /// </summary>+ /// <returns>External authentication providers</returns>+ IList<IExternalAuthenticationProvider> LoadAllAuthenticationProviders();- Task<IList<ExternalAuthentication>> GetExternalIdentifiers(Customer customer);+ /// <summary>+ /// Check whether authentication by the passed external authentication provider is available+ /// </summary>+ /// <param name="systemName">System name of the external authentication provider</param>+ /// <returns>True if is available; otherwise false</returns>+ bool AuthenticationProviderIsAvailable(string systemName);- /// <summary>- /// Delete the external authentication- /// </summary>- /// <param name="externalAuthentication">External authentication</param>- Task DeleteExternalAuthentication(ExternalAuthentication externalAuthentication);- }+ #endregion}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IGrandAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IGrandAuthenticationService.csindex 51d2372b7..3fe8086a4 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IGrandAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IGrandAuthenticationService.cs@@ -1,42 +1,39 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++/// <summary>+/// Authentication service interface+/// </summary>+public interface IGrandAuthenticationService{/// <summary>- /// Authentication service interface+ /// Sign in/// </summary>- public interface IGrandAuthenticationService- {- /// <summary>- /// Sign in- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="createPersistentCookie">A value indicating whether to create a persistent cookie</param>- Task SignIn(Customer customer, bool createPersistentCookie);-- /// <summary>- /// Sign out- /// </summary>- Task SignOut();-- /// <summary>- /// Get authenticated customer- /// </summary>- /// <returns>Customer</returns>- Task<Customer> GetAuthenticatedCustomer();+ /// <param name="customer">Customer</param>+ /// <param name="createPersistentCookie">A value indicating whether to create a persistent cookie</param>+ Task SignIn(Customer customer, bool createPersistentCookie);- /// <summary>- /// Get customer guid- /// </summary>- /// <returns>Customer</returns>- Task<string> GetCustomerGuid();+ /// <summary>+ /// Sign out+ /// </summary>+ Task SignOut();- /// <summary>- /// Set customer guid- /// </summary>- /// <param name="customerGuid">Guid of the customer</param>- Task SetCustomerGuid(Guid customerGuid);+ /// <summary>+ /// Get authenticated customer+ /// </summary>+ /// <returns>Customer</returns>+ Task<Customer> GetAuthenticatedCustomer();+ /// <summary>+ /// Get customer guid+ /// </summary>+ /// <returns>Customer</returns>+ Task<string> GetCustomerGuid();- }+ /// <summary>+ /// Set customer guid+ /// </summary>+ /// <param name="customerGuid">Guid of the customer</param>+ Task SetCustomerGuid(Guid customerGuid);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerAuthenticationService.csindex c42bc34bd..6ae310b2a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerAuthenticationService.cs@@ -1,20 +1,18 @@using Microsoft.AspNetCore.Authentication.JwtBearer;-namespace Grand.Business.Core.Interfaces.Authentication-{- public interface IJwtBearerAuthenticationService- {- /// <summary>- /// Valid email- /// </summary>- ///<param name="context">Token</param>- Task<bool> Valid(TokenValidatedContext context);+namespace Grand.Business.Core.Interfaces.Authentication;- /// <summary>- /// Get error message- /// </summary>- /// <returns></returns>- Task<string> ErrorMessage();+public interface IJwtBearerAuthenticationService+{+ /// <summary>+ /// Valid email+ /// </summary>+ /// <param name="context">Token</param>+ Task<bool> Valid(TokenValidatedContext context);- }-}+ /// <summary>+ /// Get error message+ /// </summary>+ /// <returns></returns>+ Task<string> ErrorMessage();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerCustomerAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerCustomerAuthenticationService.csindex b4f24d95a..f67fb7857 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerCustomerAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IJwtBearerCustomerAuthenticationService.cs@@ -1,10 +1,9 @@using Microsoft.AspNetCore.Authentication.JwtBearer;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++public interface IJwtBearerCustomerAuthenticationService{- public interface IJwtBearerCustomerAuthenticationService- {- Task<bool> Valid(TokenValidatedContext context);- Task<string> ErrorMessage();- }-}+ Task<bool> Valid(TokenValidatedContext context);+ Task<string> ErrorMessage();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/IRefreshTokenService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/IRefreshTokenService.csindex 5d281f11f..30c75ccde 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/IRefreshTokenService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/IRefreshTokenService.cs@@ -2,13 +2,12 @@using Grand.Domain.Security;using System.Security.Claims;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++public interface IRefreshTokenService{- public interface IRefreshTokenService- {- string GenerateRefreshToken();- Task<RefreshToken> SaveRefreshTokenToCustomer(Customer customer, string refreshToken);- Task<RefreshToken> GetCustomerRefreshToken(Customer customer);- ClaimsPrincipal GetPrincipalFromToken(string token);- }-}+ string GenerateRefreshToken();+ Task<RefreshToken> SaveRefreshTokenToCustomer(Customer customer, string refreshToken);+ Task<RefreshToken> GetCustomerRefreshToken(Customer customer);+ ClaimsPrincipal GetPrincipalFromToken(string token);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/ISMSVerificationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/ISMSVerificationService.csindex 72c63bf8f..275f89ebe 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/ISMSVerificationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/ISMSVerificationService.cs@@ -2,11 +2,10 @@using Grand.Domain.Customers;using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Authentication+namespace Grand.Business.Core.Interfaces.Authentication;++public interface ISMSVerificationService{- public interface ISMSVerificationService- {- Task<bool> Authenticate(string secretKey, string token, Customer customer);- Task<TwoFactorCodeSetup> GenerateCode(string secretKey, Customer customer, Language language);- }-}+ Task<bool> Authenticate(string secretKey, string token, Customer customer);+ Task<TwoFactorCodeSetup> GenerateCode(string secretKey, Customer customer, Language language);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Authentication/ITwoFactorAuthenticationService.cs b/src/Business/Grand.Business.Core/Interfaces/Authentication/ITwoFactorAuthenticationService.csindex f46612686..e408caf7f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Authentication/ITwoFactorAuthenticationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Authentication/ITwoFactorAuthenticationService.cs@@ -2,13 +2,13 @@using Grand.Domain.Customers;using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Authentication-{- public interface ITwoFactorAuthenticationService- {- Task<bool> AuthenticateTwoFactor(string secretKey, string token, Customer customer, TwoFactorAuthenticationType twoFactorAuthenticationType);+namespace Grand.Business.Core.Interfaces.Authentication;- Task<TwoFactorCodeSetup> GenerateCodeSetup(string secretKey, Customer customer, Language language, TwoFactorAuthenticationType twoFactorAuthenticationType);+public interface ITwoFactorAuthenticationService+{+ Task<bool> AuthenticateTwoFactor(string secretKey, string token, Customer customer,+ TwoFactorAuthenticationType twoFactorAuthenticationType);- }-}+ Task<TwoFactorCodeSetup> GenerateCodeSetup(string secretKey, Customer customer, Language language,+ TwoFactorAuthenticationType twoFactorAuthenticationType);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandLayoutService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandLayoutService.csindex eea11ce26..ac029a7f3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandLayoutService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandLayoutService.cs@@ -1,38 +1,37 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Brands+namespace Grand.Business.Core.Interfaces.Catalog.Brands;++public interface IBrandLayoutService{- public interface IBrandLayoutService- {+ /// <summary>+ /// Gets all existing brand layouts+ /// </summary>+ /// <returns>Brand layouts</returns>+ Task<IList<BrandLayout>> GetAllBrandLayouts();- /// <summary>- /// Gets all existing brand layouts- /// </summary>- /// <returns>Brand layouts</returns>- Task<IList<BrandLayout>> GetAllBrandLayouts();+ /// <summary>+ /// Gets an existing brand layout+ /// </summary>+ /// <param name="brandLayoutId">Brand layout id</param>+ /// <returns>Brand layout</returns>+ Task<BrandLayout> GetBrandLayoutById(string brandLayoutId);- /// <summary>- /// Gets an existing brand layout- /// </summary>- /// <param name="brandLayoutId">Brand layout id</param>- /// <returns>Brand layout</returns>- Task<BrandLayout> GetBrandLayoutById(string brandLayoutId);+ /// <summary>+ /// Inserts a new brand layout+ /// </summary>+ /// <param name="brandLayout">Brand layout</param>+ Task InsertBrandLayout(BrandLayout brandLayout);- /// <summary>- /// Inserts a new brand layout- /// </summary>- /// <param name="brandLayout">Brand layout</param>- Task InsertBrandLayout(BrandLayout brandLayout);+ /// <summary>+ /// Updates the existing brand layout+ /// </summary>+ /// <param name="brandLayout">Brand layout</param>+ Task UpdateBrandLayout(BrandLayout brandLayout);- /// <summary>- /// Updates the existing brand layout- /// </summary>- /// <param name="brandLayout">Brand layout</param>- Task UpdateBrandLayout(BrandLayout brandLayout);- /// <summary>- /// Deletes existing brand layout- /// </summary>- /// <param name="brandLayout">Brand layout</param>- Task DeleteBrandLayout(BrandLayout brandLayout);- }-}+ /// <summary>+ /// Deletes existing brand layout+ /// </summary>+ /// <param name="brandLayout">Brand layout</param>+ Task DeleteBrandLayout(BrandLayout brandLayout);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandService.csindex c263240c1..bd2e353ce 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Brands/IBrandService.cs@@ -1,59 +1,57 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Brands+namespace Grand.Business.Core.Interfaces.Catalog.Brands;++/// <summary>+/// Brand service+/// </summary>+public interface IBrandService{/// <summary>- /// Brand service+ /// Gets all brands/// </summary>- public interface IBrandService- {- /// <summary>- /// Gets all brands- /// </summary>- /// <param name="brandName">Brand name</param>- /// <param name="storeId">Store ident</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Brands</returns>- Task<IPagedList<Brand>> GetAllBrands(string brandName = "",- string storeId = "",- int pageIndex = 0,- int pageSize = int.MaxValue,- bool showHidden = false);-- /// <summary>- /// Gets an existing brand by id- /// </summary>- /// <param name="brandId">Brand identifier</param>- /// <returns>Brand</returns>- Task<Brand> GetBrandById(string brandId);+ /// <param name="brandName">Brand name</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Brands</returns>+ Task<IPagedList<Brand>> GetAllBrands(string brandName = "",+ string storeId = "",+ int pageIndex = 0,+ int pageSize = int.MaxValue,+ bool showHidden = false);- /// <summary>- /// Inserts a new brand- /// </summary>- /// <param name="brand">Brand</param>- Task InsertBrand(Brand brand);+ /// <summary>+ /// Gets an existing brand by id+ /// </summary>+ /// <param name="brandId">Brand identifier</param>+ /// <returns>Brand</returns>+ Task<Brand> GetBrandById(string brandId);- /// <summary>- /// Updates the existing brand- /// </summary>- /// <param name="brand">Brand</param>- Task UpdateBrand(Brand brand);+ /// <summary>+ /// Inserts a new brand+ /// </summary>+ /// <param name="brand">Brand</param>+ Task InsertBrand(Brand brand);- /// <summary>- /// Deletes an existing brand- /// </summary>- /// <param name="brand">Brand</param>- Task DeleteBrand(Brand brand);+ /// <summary>+ /// Updates the existing brand+ /// </summary>+ /// <param name="brand">Brand</param>+ Task UpdateBrand(Brand brand);- /// <summary>- /// Gets all brands by discount id- /// </summary>- /// <param name="discountId">Discount id </param>- /// <returns>Product brand mapping</returns>- Task<IList<Brand>> GetAllBrandsByDiscount(string discountId);+ /// <summary>+ /// Deletes an existing brand+ /// </summary>+ /// <param name="brand">Brand</param>+ Task DeleteBrand(Brand brand);- }-}+ /// <summary>+ /// Gets all brands by discount id+ /// </summary>+ /// <param name="discountId">Discount id </param>+ /// <returns>Product brand mapping</returns>+ Task<IList<Brand>> GetAllBrandsByDiscount(string discountId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryLayoutService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryLayoutService.csindex a1e653118..aadf6a767 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryLayoutService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryLayoutService.cs@@ -1,40 +1,37 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Categories-{- public interface ICategoryLayoutService- {-- /// <summary>- /// Gets all available category layouts- /// </summary>- /// <returns>Category layouts</returns>- Task<IList<CategoryLayout>> GetAllCategoryLayouts();+namespace Grand.Business.Core.Interfaces.Catalog.Categories;- /// <summary>- /// Gets a category layout- /// </summary>- /// <param name="categoryLayoutId">Category layout id</param>- /// <returns>Category layout</returns>- Task<CategoryLayout> GetCategoryLayoutById(string categoryLayoutId);+public interface ICategoryLayoutService+{+ /// <summary>+ /// Gets all available category layouts+ /// </summary>+ /// <returns>Category layouts</returns>+ Task<IList<CategoryLayout>> GetAllCategoryLayouts();- /// <summary>- /// Inserts new category layout- /// </summary>- /// <param name="categoryLayout">Category layout</param>- Task InsertCategoryLayout(CategoryLayout categoryLayout);+ /// <summary>+ /// Gets a category layout+ /// </summary>+ /// <param name="categoryLayoutId">Category layout id</param>+ /// <returns>Category layout</returns>+ Task<CategoryLayout> GetCategoryLayoutById(string categoryLayoutId);- /// <summary>- /// Updates the existing category layout- /// </summary>- /// <param name="categoryLayout">Category layout</param>- Task UpdateCategoryLayout(CategoryLayout categoryLayout);+ /// <summary>+ /// Inserts new category layout+ /// </summary>+ /// <param name="categoryLayout">Category layout</param>+ Task InsertCategoryLayout(CategoryLayout categoryLayout);- /// <summary>- /// Deletes existing category layouts- /// </summary>- /// <param name="categoryLayout">Category layout</param>- Task DeleteCategoryLayout(CategoryLayout categoryLayout);+ /// <summary>+ /// Updates the existing category layout+ /// </summary>+ /// <param name="categoryLayout">Category layout</param>+ Task UpdateCategoryLayout(CategoryLayout categoryLayout);- }-}+ /// <summary>+ /// Deletes existing category layouts+ /// </summary>+ /// <param name="categoryLayout">Category layout</param>+ Task DeleteCategoryLayout(CategoryLayout categoryLayout);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryService.csindex 8e776a785..a6ce034fc 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/ICategoryService.cs@@ -1,125 +1,123 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Categories+namespace Grand.Business.Core.Interfaces.Catalog.Categories;++public interface ICategoryService{- public interface ICategoryService- {- /// <summary>- /// Gets all categories- /// </summary>- /// <param name="parentId"></param>- /// <param name="categoryName">Category name</param>- /// <param name="storeId">Store id</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Categories</returns>- Task<IPagedList<Category>> GetAllCategories(string parentId = null, string categoryName = "", string storeId = "",- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);-- /// <summary>- /// Gets all categories- /// </summary>- /// <returns>Categories</returns>- Task<IList<Category>> GetMenuCategories();-- /// <summary>- /// Gets all categories by parent category- /// </summary>- /// <param name="parentCategoryId">Parent category id</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <param name="includeAllLevels">A value indicates if we should load all child levels</param>- /// <returns>Categories</returns>- Task<IList<Category>> GetAllCategoriesByParentCategoryId(string parentCategoryId = "",- bool showHidden = false, bool includeAllLevels = false);-- /// <summary>- /// Gets all categories displayed on the home page- /// </summary>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Categories</returns>- Task<IList<Category>> GetAllCategoriesDisplayedOnHomePage(bool showHidden = false);-- /// <summary>- /// Gets all categories displayed that should be visible on the home page, in featured products section- /// </summary>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- Task<IList<Category>> GetAllCategoriesFeaturedProductsOnHomePage(bool showHidden = false);-- /// <summary>- /// Gets all categories that should be displayed in search box- /// </summary>- /// <returns>Categories</returns>- Task<IList<Category>> GetAllCategoriesSearchBox();-- /// <summary>- /// Get category breadcrumb- /// </summary>- /// <param name="category">Category</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Category breadcrumb </returns>- Task<IList<Category>> GetCategoryBreadCrumb(Category category, bool showHidden = false);-- /// <summary>- /// Get category breadcrumb- /// </summary>- /// <param name="category">Category</param>- /// <param name="allCategories">All categories</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Category breadcrumb </returns>- IList<Category> GetCategoryBreadCrumb(Category category, IList<Category> allCategories, bool showHidden = false);-- /// <summary>- /// Get formatted category breadcrumb- /// </summary>- /// <param name="category">Category</param>- /// <param name="separator">Separator</param>- /// <param name="languageId">Language id for localization</param>- /// <returns>Formatted breadcrumb</returns>- Task<string> GetFormattedBreadCrumb(Category category, string separator = ">>", string languageId = "");-- /// <summary>- /// Get formatted category breadcrumb- /// </summary>- /// <param name="category">Category</param>- /// <param name="allCategories">All categories</param>- /// <param name="separator">Separator</param>- /// <param name="languageId">Language id for localization</param>- /// <returns>Formatted breadcrumb</returns>- string GetFormattedBreadCrumb(Category category,- IList<Category> allCategories, string separator = ">>", string languageId = "");-- /// <summary>- /// Gets all categories filtered by discount id- /// </summary>- /// <returns>Categories</returns>- Task<IList<Category>> GetAllCategoriesByDiscount(string discountId);-- /// <summary>- /// Gets a category- /// </summary>- /// <param name="categoryId">Category identifier</param>- /// <returns>Category</returns>- Task<Category> GetCategoryById(string categoryId);-- /// <summary>- /// Inserts the new category- /// </summary>- /// <param name="category">Category</param>- Task InsertCategory(Category category);-- /// <summary>- /// Updates the existing category- /// </summary>- /// <param name="category">Category</param>- Task UpdateCategory(Category category);-- /// <summary>- /// Deletes the existing category- /// </summary>- /// <param name="category">Category</param>- Task DeleteCategory(Category category);-- }-}+ /// <summary>+ /// Gets all categories+ /// </summary>+ /// <param name="parentId"></param>+ /// <param name="categoryName">Category name</param>+ /// <param name="storeId">Store id</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Categories</returns>+ Task<IPagedList<Category>> GetAllCategories(string parentId = null, string categoryName = "", string storeId = "",+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);++ /// <summary>+ /// Gets all categories+ /// </summary>+ /// <returns>Categories</returns>+ Task<IList<Category>> GetMenuCategories();++ /// <summary>+ /// Gets all categories by parent category+ /// </summary>+ /// <param name="parentCategoryId">Parent category id</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <param name="includeAllLevels">A value indicates if we should load all child levels</param>+ /// <returns>Categories</returns>+ Task<IList<Category>> GetAllCategoriesByParentCategoryId(string parentCategoryId = "",+ bool showHidden = false, bool includeAllLevels = false);++ /// <summary>+ /// Gets all categories displayed on the home page+ /// </summary>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Categories</returns>+ Task<IList<Category>> GetAllCategoriesDisplayedOnHomePage(bool showHidden = false);++ /// <summary>+ /// Gets all categories displayed that should be visible on the home page, in featured products section+ /// </summary>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ Task<IList<Category>> GetAllCategoriesFeaturedProductsOnHomePage(bool showHidden = false);++ /// <summary>+ /// Gets all categories that should be displayed in search box+ /// </summary>+ /// <returns>Categories</returns>+ Task<IList<Category>> GetAllCategoriesSearchBox();++ /// <summary>+ /// Get category breadcrumb+ /// </summary>+ /// <param name="category">Category</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Category breadcrumb </returns>+ Task<IList<Category>> GetCategoryBreadCrumb(Category category, bool showHidden = false);++ /// <summary>+ /// Get category breadcrumb+ /// </summary>+ /// <param name="category">Category</param>+ /// <param name="allCategories">All categories</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Category breadcrumb </returns>+ IList<Category> GetCategoryBreadCrumb(Category category, IList<Category> allCategories, bool showHidden = false);++ /// <summary>+ /// Get formatted category breadcrumb+ /// </summary>+ /// <param name="category">Category</param>+ /// <param name="separator">Separator</param>+ /// <param name="languageId">Language id for localization</param>+ /// <returns>Formatted breadcrumb</returns>+ Task<string> GetFormattedBreadCrumb(Category category, string separator = ">>", string languageId = "");++ /// <summary>+ /// Get formatted category breadcrumb+ /// </summary>+ /// <param name="category">Category</param>+ /// <param name="allCategories">All categories</param>+ /// <param name="separator">Separator</param>+ /// <param name="languageId">Language id for localization</param>+ /// <returns>Formatted breadcrumb</returns>+ string GetFormattedBreadCrumb(Category category,+ IList<Category> allCategories, string separator = ">>", string languageId = "");++ /// <summary>+ /// Gets all categories filtered by discount id+ /// </summary>+ /// <returns>Categories</returns>+ Task<IList<Category>> GetAllCategoriesByDiscount(string discountId);++ /// <summary>+ /// Gets a category+ /// </summary>+ /// <param name="categoryId">Category identifier</param>+ /// <returns>Category</returns>+ Task<Category> GetCategoryById(string categoryId);++ /// <summary>+ /// Inserts the new category+ /// </summary>+ /// <param name="category">Category</param>+ Task InsertCategory(Category category);++ /// <summary>+ /// Updates the existing category+ /// </summary>+ /// <param name="category">Category</param>+ Task UpdateCategory(Category category);++ /// <summary>+ /// Deletes the existing category+ /// </summary>+ /// <param name="category">Category</param>+ Task DeleteCategory(Category category);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/IProductCategoryService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/IProductCategoryService.csindex 1175c9404..f0a495d08 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/IProductCategoryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Categories/IProductCategoryService.cs@@ -2,41 +2,39 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Categories-{- public interface IProductCategoryService- {- /// <summary>- /// Gets product category mapping collection- /// </summary>- /// <param name="categoryId">Category id</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Product a category mapping collection</returns>- Task<IPagedList<ProductsCategory>> GetProductCategoriesByCategoryId(string categoryId,- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);+namespace Grand.Business.Core.Interfaces.Catalog.Categories;- /// <summary>- /// Inserts a mapping for product category- /// </summary>- /// <param name="productCategory">>Product category mapping</param>- /// <param name="productId">Product id</param>- Task InsertProductCategory(ProductCategory productCategory, string productId);+public interface IProductCategoryService+{+ /// <summary>+ /// Gets product category mapping collection+ /// </summary>+ /// <param name="categoryId">Category id</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Product a category mapping collection</returns>+ Task<IPagedList<ProductsCategory>> GetProductCategoriesByCategoryId(string categoryId,+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);- /// <summary>- /// Updates a mapping for product category- /// </summary>- /// <param name="productCategory">>Product category mapping</param>- /// <param name="productId">Product id</param>- Task UpdateProductCategory(ProductCategory productCategory, string productId);+ /// <summary>+ /// Inserts a mapping for product category+ /// </summary>+ /// <param name="productCategory">>Product category mapping</param>+ /// <param name="productId">Product id</param>+ Task InsertProductCategory(ProductCategory productCategory, string productId);- /// <summary>- /// Deletes a mapping for product category- /// </summary>- /// <param name="productCategory">Product category</param>- /// <param name="productId">Product id</param>- Task DeleteProductCategory(ProductCategory productCategory, string productId);+ /// <summary>+ /// Updates a mapping for product category+ /// </summary>+ /// <param name="productCategory">>Product category mapping</param>+ /// <param name="productId">Product id</param>+ Task UpdateProductCategory(ProductCategory productCategory, string productId);- }-}+ /// <summary>+ /// Deletes a mapping for product category+ /// </summary>+ /// <param name="productCategory">Product category</param>+ /// <param name="productId">Product id</param>+ Task DeleteProductCategory(ProductCategory productCategory, string productId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionLayoutService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionLayoutService.csindex 467172e8f..bd7eb70d2 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionLayoutService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionLayoutService.cs@@ -1,38 +1,37 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Collections+namespace Grand.Business.Core.Interfaces.Catalog.Collections;++public interface ICollectionLayoutService{- public interface ICollectionLayoutService- {+ /// <summary>+ /// Gets all existing collection layouts+ /// </summary>+ /// <returns>Collection layouts</returns>+ Task<IList<CollectionLayout>> GetAllCollectionLayouts();- /// <summary>- /// Gets all existing collection layouts- /// </summary>- /// <returns>Collection layouts</returns>- Task<IList<CollectionLayout>> GetAllCollectionLayouts();+ /// <summary>+ /// Gets an existing collection layout+ /// </summary>+ /// <param name="collectionLayoutId">Collection layout id</param>+ /// <returns>Collection layout</returns>+ Task<CollectionLayout> GetCollectionLayoutById(string collectionLayoutId);- /// <summary>- /// Gets an existing collection layout- /// </summary>- /// <param name="collectionLayoutId">Collection layout id</param>- /// <returns>Collection layout</returns>- Task<CollectionLayout> GetCollectionLayoutById(string collectionLayoutId);+ /// <summary>+ /// Inserts a new collection layout+ /// </summary>+ /// <param name="collectionLayout">Collection layout</param>+ Task InsertCollectionLayout(CollectionLayout collectionLayout);- /// <summary>- /// Inserts a new collection layout- /// </summary>- /// <param name="collectionLayout">Collection layout</param>- Task InsertCollectionLayout(CollectionLayout collectionLayout);+ /// <summary>+ /// Updates the existing collection layout+ /// </summary>+ /// <param name="collectionLayout">Collection layout</param>+ Task UpdateCollectionLayout(CollectionLayout collectionLayout);- /// <summary>- /// Updates the existing collection layout- /// </summary>- /// <param name="collectionLayout">Collection layout</param>- Task UpdateCollectionLayout(CollectionLayout collectionLayout);- /// <summary>- /// Deletes existing collection layout- /// </summary>- /// <param name="collectionLayout">Collection layout</param>- Task DeleteCollectionLayout(CollectionLayout collectionLayout);- }-}+ /// <summary>+ /// Deletes existing collection layout+ /// </summary>+ /// <param name="collectionLayout">Collection layout</param>+ Task DeleteCollectionLayout(CollectionLayout collectionLayout);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionService.csindex d612c1ade..ecae8e334 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/ICollectionService.cs@@ -1,66 +1,64 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Collections+namespace Grand.Business.Core.Interfaces.Catalog.Collections;++/// <summary>+/// Collection service+/// </summary>+public interface ICollectionService{/// <summary>- /// Collection service+ /// Gets all collections/// </summary>- public interface ICollectionService- {- /// <summary>- /// Gets all collections- /// </summary>- /// <param name="collectionName">Collection name</param>- /// <param name="storeId">Store ident</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Collections</returns>- Task<IPagedList<Collection>> GetAllCollections(string collectionName = "",- string storeId = "",- int pageIndex = 0,- int pageSize = int.MaxValue,- bool showHidden = false);-- /// <summary>- /// Gets all collections products displayed on the home page- /// </summary>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Collections</returns>- Task<IList<Collection>> GetAllCollectionFeaturedProductsOnHomePage(bool showHidden = false);+ /// <param name="collectionName">Collection name</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Collections</returns>+ Task<IPagedList<Collection>> GetAllCollections(string collectionName = "",+ string storeId = "",+ int pageIndex = 0,+ int pageSize = int.MaxValue,+ bool showHidden = false);- /// <summary>- /// Gets an existing collection by id- /// </summary>- /// <param name="collectionId">Collection identifier</param>- /// <returns>Collection</returns>- Task<Collection> GetCollectionById(string collectionId);+ /// <summary>+ /// Gets all collections products displayed on the home page+ /// </summary>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Collections</returns>+ Task<IList<Collection>> GetAllCollectionFeaturedProductsOnHomePage(bool showHidden = false);- /// <summary>- /// Inserts a new collection- /// </summary>- /// <param name="collection">Collection</param>- Task InsertCollection(Collection collection);+ /// <summary>+ /// Gets an existing collection by id+ /// </summary>+ /// <param name="collectionId">Collection identifier</param>+ /// <returns>Collection</returns>+ Task<Collection> GetCollectionById(string collectionId);- /// <summary>- /// Updates the existing collection- /// </summary>- /// <param name="collection">Collection</param>- Task UpdateCollection(Collection collection);+ /// <summary>+ /// Inserts a new collection+ /// </summary>+ /// <param name="collection">Collection</param>+ Task InsertCollection(Collection collection);- /// <summary>- /// Deletes an existing collection- /// </summary>- /// <param name="collection">Collection</param>- Task DeleteCollection(Collection collection);+ /// <summary>+ /// Updates the existing collection+ /// </summary>+ /// <param name="collection">Collection</param>+ Task UpdateCollection(Collection collection);- /// <summary>- /// Gets all brands by discount id- /// </summary>- /// <param name="discountId">Discount id </param>- /// <returns>Product collection mapping</returns>- Task<IList<Collection>> GetAllCollectionsByDiscount(string discountId);+ /// <summary>+ /// Deletes an existing collection+ /// </summary>+ /// <param name="collection">Collection</param>+ Task DeleteCollection(Collection collection);- }-}+ /// <summary>+ /// Gets all brands by discount id+ /// </summary>+ /// <param name="discountId">Discount id </param>+ /// <returns>Product collection mapping</returns>+ Task<IList<Collection>> GetAllCollectionsByDiscount(string discountId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/IProductCollectionService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/IProductCollectionService.csindex 130ecc9f4..2f8ecb707 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/IProductCollectionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Collections/IProductCollectionService.cs@@ -2,43 +2,41 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Collections-{- public interface IProductCollectionService- {- /// <summary>- /// Gets product collection by collection id- /// </summary>- /// <param name="collectionId">Collection id</param>- /// <param name="storeId">Store id</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Product collection collection</returns>- Task<IPagedList<ProductsCollection>> GetProductCollectionsByCollectionId(string collectionId, string storeId,- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);+namespace Grand.Business.Core.Interfaces.Catalog.Collections;+public interface IProductCollectionService+{+ /// <summary>+ /// Gets product collection by collection id+ /// </summary>+ /// <param name="collectionId">Collection id</param>+ /// <param name="storeId">Store id</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Product collection collection</returns>+ Task<IPagedList<ProductsCollection>> GetProductCollectionsByCollectionId(string collectionId, string storeId,+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);- /// <summary>- /// Inserts a new product collection mapping- /// </summary>- /// <param name="productCollection">Product collection mapping</param>- /// <param name="productId">Product ident</param>- Task InsertProductCollection(ProductCollection productCollection, string productId);- /// <summary>- /// Updates the existing product collection mapping- /// </summary>- /// <param name="productCollection">Product collection mapping</param>- /// <param name="productId">Product id</param>- Task UpdateProductCollection(ProductCollection productCollection, string productId);+ /// <summary>+ /// Inserts a new product collection mapping+ /// </summary>+ /// <param name="productCollection">Product collection mapping</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductCollection(ProductCollection productCollection, string productId);- /// <summary>- /// Deletes the existing product collection mapping- /// </summary>- /// <param name="productCollection">Product collection mapping</param>- /// <param name="productId">Product id</param>- Task DeleteProductCollection(ProductCollection productCollection, string productId);+ /// <summary>+ /// Updates the existing product collection mapping+ /// </summary>+ /// <param name="productCollection">Product collection mapping</param>+ /// <param name="productId">Product id</param>+ Task UpdateProductCollection(ProductCollection productCollection, string productId);- }-}+ /// <summary>+ /// Deletes the existing product collection mapping+ /// </summary>+ /// <param name="productCollection">Product collection mapping</param>+ /// <param name="productId">Product id</param>+ Task DeleteProductCollection(ProductCollection productCollection, string productId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IGeoLookupService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IGeoLookupService.csindex 1271145f7..ec331b925 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IGeoLookupService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IGeoLookupService.cs@@ -1,22 +1,21 @@-namespace Grand.Business.Core.Interfaces.Catalog.Directory+namespace Grand.Business.Core.Interfaces.Catalog.Directory;++/// <summary>+/// GEO lookup service+/// </summary>+public interface IGeoLookupService{/// <summary>- /// GEO lookup service+ /// Get country name/// </summary>- public interface IGeoLookupService- {- /// <summary>- /// Get country name- /// </summary>- /// <param name="ipAddress">IP address</param>- /// <returns>Country name</returns>- string CountryIsoCode(string ipAddress);+ /// <param name="ipAddress">IP address</param>+ /// <returns>Country name</returns>+ string CountryIsoCode(string ipAddress);- /// <summary>- /// Get country name- /// </summary>- /// <param name="ipAddress">IP address</param>- /// <returns>Country name</returns>- string CountryName(string ipAddress);- }+ /// <summary>+ /// Get country name+ /// </summary>+ /// <param name="ipAddress">IP address</param>+ /// <returns>Country name</returns>+ string CountryName(string ipAddress);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IMeasureService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IMeasureService.csindex ad0adadc6..bf0cfab22 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IMeasureService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/IMeasureService.cs@@ -1,177 +1,174 @@using Grand.Domain.Directory;-namespace Grand.Business.Core.Interfaces.Catalog.Directory+namespace Grand.Business.Core.Interfaces.Catalog.Directory;++/// <summary>+/// Measure dimension service interface+/// </summary>+public interface IMeasureService{/// <summary>- /// Measure dimension service interface- /// </summary>- public interface IMeasureService- {-- /// <summary>- /// Gets a measure dimension by identifier- /// </summary>- /// <param name="measureDimensionId">Measure dimension identifier</param>- /// <returns>Measure dimension</returns>- Task<MeasureDimension> GetMeasureDimensionById(string measureDimensionId);-- /// <summary>- /// Gets a measure dimension by system keyword- /// </summary>- /// <param name="systemKeyword">The system keyword</param>- /// <returns>Measure dimension</returns>- Task<MeasureDimension> GetMeasureDimensionBySystemKeyword(string systemKeyword);-- /// <summary>- /// Gets all measure dimensions- /// </summary>- /// <returns>Measure dimensions</returns>- Task<IList<MeasureDimension>> GetAllMeasureDimensions();-- /// <summary>- /// Inserts a measure dimension- /// </summary>- /// <param name="measure">Measure dimension</param>- Task InsertMeasureDimension(MeasureDimension measure);-- /// <summary>- /// Updates the measure dimension- /// </summary>- /// <param name="measure">Measure dimension</param>- Task UpdateMeasureDimension(MeasureDimension measure);-- /// <summary>- /// Deletes measure dimension- /// </summary>- /// <param name="measureDimension">Measure dimension</param>- Task DeleteMeasureDimension(MeasureDimension measureDimension);-- /// <summary>- /// Converts dimension- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="sourceMeasureDimension">Source dimension</param>- /// <param name="targetMeasureDimension">Target dimension</param>- /// <param name="round">A value indicating whether a result should be rounded</param>- /// <returns>Converted value</returns>- Task<double> ConvertDimension(double value,- MeasureDimension sourceMeasureDimension, MeasureDimension targetMeasureDimension, bool round = true);-- /// <summary>- /// Converts to primary measure dimension- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="sourceMeasureDimension">Source dimension</param>- /// <returns>Converted value</returns>- Task<double> ConvertToPrimaryMeasureDimension(double value,- MeasureDimension sourceMeasureDimension);-- /// <summary>- /// Converts from primary dimension- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="targetMeasureDimension">Target dimension</param>- /// <returns>Converted value</returns>- Task<double> ConvertFromPrimaryMeasureDimension(double value,- MeasureDimension targetMeasureDimension);--- /// <summary>- /// Gets a measure weight by identifier- /// </summary>- /// <param name="measureWeightId">Measure weight identifier</param>- /// <returns>Measure weight</returns>- Task<MeasureWeight> GetMeasureWeightById(string measureWeightId);-- /// <summary>- /// Gets a measure weight by system keyword- /// </summary>- /// <param name="systemKeyword">The system keyword</param>- /// <returns>Measure weight</returns>- Task<MeasureWeight> GetMeasureWeightBySystemKeyword(string systemKeyword);-- /// <summary>- /// Gets all measure weights- /// </summary>- /// <returns>Measure weights</returns>- Task<IList<MeasureWeight>> GetAllMeasureWeights();-- /// <summary>- /// Inserts a measure weight- /// </summary>- /// <param name="measure">Measure weight</param>- Task InsertMeasureWeight(MeasureWeight measure);-- /// <summary>- /// Updates the measure weight- /// </summary>- /// <param name="measure">Measure weight</param>- Task UpdateMeasureWeight(MeasureWeight measure);-- /// <summary>- /// Deletes measure weight- /// </summary>- /// <param name="measureWeight">Measure weight</param>- Task DeleteMeasureWeight(MeasureWeight measureWeight);-- /// <summary>- /// Converts weight- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="sourceMeasureWeight">Source weight</param>- /// <param name="targetMeasureWeight">Target weight</param>- /// <param name="round">A value indicating whether a result should be rounded</param>- /// <returns>Converted value</returns>- Task<double> ConvertWeight(double value,- MeasureWeight sourceMeasureWeight, MeasureWeight targetMeasureWeight, bool round = true);-- /// <summary>- /// Converts to primary measure weight- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="sourceMeasureWeight">Source weight</param>- /// <returns>Converted value</returns>- Task<double> ConvertToPrimaryMeasureWeight(double value, MeasureWeight sourceMeasureWeight);-- /// <summary>- /// Converts from primary weight- /// </summary>- /// <param name="value">Value to convert</param>- /// <param name="targetMeasureWeight">Target weight</param>- /// <returns>Converted value</returns>- Task<double> ConvertFromPrimaryMeasureWeight(double value,- MeasureWeight targetMeasureWeight);-- /// <summary>- /// Gets a measure unit by identifier- /// </summary>- /// <param name="measureUnitId">Measure unit identifier</param>- /// <returns>Measure dimension</returns>- Task<MeasureUnit> GetMeasureUnitById(string measureUnitId);-- /// <summary>- /// Gets all measure units- /// </summary>- /// <returns>Measure units</returns>- Task<IList<MeasureUnit>> GetAllMeasureUnits();-- /// <summary>- /// Inserts a measure unit- /// </summary>- /// <param name="measure">Measure unit</param>- Task InsertMeasureUnit(MeasureUnit measure);-- /// <summary>- /// Updates the measure unit- /// </summary>- /// <param name="measure">Measure unit</param>- Task UpdateMeasureUnit(MeasureUnit measure);-- /// <summary>- /// Deletes measure unit- /// </summary>- /// <param name="measureUnit">Measure unit</param>- Task DeleteMeasureUnit(MeasureUnit measureUnit);-- }+ /// Gets a measure dimension by identifier+ /// </summary>+ /// <param name="measureDimensionId">Measure dimension identifier</param>+ /// <returns>Measure dimension</returns>+ Task<MeasureDimension> GetMeasureDimensionById(string measureDimensionId);++ /// <summary>+ /// Gets a measure dimension by system keyword+ /// </summary>+ /// <param name="systemKeyword">The system keyword</param>+ /// <returns>Measure dimension</returns>+ Task<MeasureDimension> GetMeasureDimensionBySystemKeyword(string systemKeyword);++ /// <summary>+ /// Gets all measure dimensions+ /// </summary>+ /// <returns>Measure dimensions</returns>+ Task<IList<MeasureDimension>> GetAllMeasureDimensions();++ /// <summary>+ /// Inserts a measure dimension+ /// </summary>+ /// <param name="measure">Measure dimension</param>+ Task InsertMeasureDimension(MeasureDimension measure);++ /// <summary>+ /// Updates the measure dimension+ /// </summary>+ /// <param name="measure">Measure dimension</param>+ Task UpdateMeasureDimension(MeasureDimension measure);++ /// <summary>+ /// Deletes measure dimension+ /// </summary>+ /// <param name="measureDimension">Measure dimension</param>+ Task DeleteMeasureDimension(MeasureDimension measureDimension);++ /// <summary>+ /// Converts dimension+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="sourceMeasureDimension">Source dimension</param>+ /// <param name="targetMeasureDimension">Target dimension</param>+ /// <param name="round">A value indicating whether a result should be rounded</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertDimension(double value,+ MeasureDimension sourceMeasureDimension, MeasureDimension targetMeasureDimension, bool round = true);++ /// <summary>+ /// Converts to primary measure dimension+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="sourceMeasureDimension">Source dimension</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertToPrimaryMeasureDimension(double value,+ MeasureDimension sourceMeasureDimension);++ /// <summary>+ /// Converts from primary dimension+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="targetMeasureDimension">Target dimension</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertFromPrimaryMeasureDimension(double value,+ MeasureDimension targetMeasureDimension);+++ /// <summary>+ /// Gets a measure weight by identifier+ /// </summary>+ /// <param name="measureWeightId">Measure weight identifier</param>+ /// <returns>Measure weight</returns>+ Task<MeasureWeight> GetMeasureWeightById(string measureWeightId);++ /// <summary>+ /// Gets a measure weight by system keyword+ /// </summary>+ /// <param name="systemKeyword">The system keyword</param>+ /// <returns>Measure weight</returns>+ Task<MeasureWeight> GetMeasureWeightBySystemKeyword(string systemKeyword);++ /// <summary>+ /// Gets all measure weights+ /// </summary>+ /// <returns>Measure weights</returns>+ Task<IList<MeasureWeight>> GetAllMeasureWeights();++ /// <summary>+ /// Inserts a measure weight+ /// </summary>+ /// <param name="measure">Measure weight</param>+ Task InsertMeasureWeight(MeasureWeight measure);++ /// <summary>+ /// Updates the measure weight+ /// </summary>+ /// <param name="measure">Measure weight</param>+ Task UpdateMeasureWeight(MeasureWeight measure);++ /// <summary>+ /// Deletes measure weight+ /// </summary>+ /// <param name="measureWeight">Measure weight</param>+ Task DeleteMeasureWeight(MeasureWeight measureWeight);++ /// <summary>+ /// Converts weight+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="sourceMeasureWeight">Source weight</param>+ /// <param name="targetMeasureWeight">Target weight</param>+ /// <param name="round">A value indicating whether a result should be rounded</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertWeight(double value,+ MeasureWeight sourceMeasureWeight, MeasureWeight targetMeasureWeight, bool round = true);++ /// <summary>+ /// Converts to primary measure weight+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="sourceMeasureWeight">Source weight</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertToPrimaryMeasureWeight(double value, MeasureWeight sourceMeasureWeight);++ /// <summary>+ /// Converts from primary weight+ /// </summary>+ /// <param name="value">Value to convert</param>+ /// <param name="targetMeasureWeight">Target weight</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertFromPrimaryMeasureWeight(double value,+ MeasureWeight targetMeasureWeight);++ /// <summary>+ /// Gets a measure unit by identifier+ /// </summary>+ /// <param name="measureUnitId">Measure unit identifier</param>+ /// <returns>Measure dimension</returns>+ Task<MeasureUnit> GetMeasureUnitById(string measureUnitId);++ /// <summary>+ /// Gets all measure units+ /// </summary>+ /// <returns>Measure units</returns>+ Task<IList<MeasureUnit>> GetAllMeasureUnits();++ /// <summary>+ /// Inserts a measure unit+ /// </summary>+ /// <param name="measure">Measure unit</param>+ Task InsertMeasureUnit(MeasureUnit measure);++ /// <summary>+ /// Updates the measure unit+ /// </summary>+ /// <param name="measure">Measure unit</param>+ Task UpdateMeasureUnit(MeasureUnit measure);++ /// <summary>+ /// Deletes measure unit+ /// </summary>+ /// <param name="measureUnit">Measure unit</param>+ Task DeleteMeasureUnit(MeasureUnit measureUnit);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/ISearchTermService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/ISearchTermService.csindex eabbb9368..95a517629 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/ISearchTermService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Directory/ISearchTermService.cs@@ -2,52 +2,51 @@ using Grand.Business.Core.Utilities.Catalog;using Grand.Domain;using Grand.Domain.Common;-namespace Grand.Business.Core.Interfaces.Catalog.Directory+namespace Grand.Business.Core.Interfaces.Catalog.Directory;++/// <summary>+/// Search term service interface+/// </summary>+public interface ISearchTermService{/// <summary>- /// Search term service interface+ /// Deletes a search term record/// </summary>- public interface ISearchTermService- {- /// <summary>- /// Deletes a search term record- /// </summary>- /// <param name="searchTerm">Search term</param>- Task DeleteSearchTerm(SearchTerm searchTerm);+ /// <param name="searchTerm">Search term</param>+ Task DeleteSearchTerm(SearchTerm searchTerm);- /// <summary>- /// Gets a search term record by identifier- /// </summary>- /// <param name="searchTermId">Search term identifier</param>- /// <returns>Search term</returns>- Task<SearchTerm> GetSearchTermById(string searchTermId);+ /// <summary>+ /// Gets a search term record by identifier+ /// </summary>+ /// <param name="searchTermId">Search term identifier</param>+ /// <returns>Search term</returns>+ Task<SearchTerm> GetSearchTermById(string searchTermId);- /// <summary>- /// Gets a search term record by keyword- /// </summary>- /// <param name="keyword">Search term keyword</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Search term</returns>- Task<SearchTerm> GetSearchTermByKeyword(string keyword, string storeId);+ /// <summary>+ /// Gets a search term record by keyword+ /// </summary>+ /// <param name="keyword">Search term keyword</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Search term</returns>+ Task<SearchTerm> GetSearchTermByKeyword(string keyword, string storeId);- /// <summary>- /// Gets a search term statistics- /// </summary>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>A list search term report lines</returns>- Task<IPagedList<SearchTermReportLine>> GetStats(int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets a search term statistics+ /// </summary>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>A list search term report lines</returns>+ Task<IPagedList<SearchTermReportLine>> GetStats(int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Inserts a search term record- /// </summary>- /// <param name="searchTerm">Search term</param>- Task InsertSearchTerm(SearchTerm searchTerm);+ /// <summary>+ /// Inserts a search term record+ /// </summary>+ /// <param name="searchTerm">Search term</param>+ Task InsertSearchTerm(SearchTerm searchTerm);- /// <summary>- /// Updates the search term record- /// </summary>- /// <param name="searchTerm">Search term</param>- Task UpdateSearchTerm(SearchTerm searchTerm);- }+ /// <summary>+ /// Updates the search term record+ /// </summary>+ /// <param name="searchTerm">Search term</param>+ Task UpdateSearchTerm(SearchTerm searchTerm);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountAmountProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountAmountProvider.csindex 9c13c0ab9..05568ac00 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountAmountProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountAmountProvider.cs@@ -3,10 +3,9 @@ using Grand.Domain.Customers;using Grand.Domain.Discounts;using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Catalog.Discounts+namespace Grand.Business.Core.Interfaces.Catalog.Discounts;++public interface IDiscountAmountProvider : IProvider{- public interface IDiscountAmountProvider : IProvider- {- Task<double> DiscountAmount(Discount discount, Customer customer, Product product, double amount);- }-}+ Task<double> DiscountAmount(Discount discount, Customer customer, Product product, double amount);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProvider.csindex df911452c..5b2662942 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProvider.cs@@ -1,9 +1,8 @@using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Catalog.Discounts+namespace Grand.Business.Core.Interfaces.Catalog.Discounts;++public interface IDiscountProvider : IProvider{- public interface IDiscountProvider : IProvider- {- IList<IDiscountRule> GetRequirementRules();- }-}+ IList<IDiscountRule> GetRequirementRules();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProviderLoader.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProviderLoader.csindex b9bd5936c..42458c445 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProviderLoader.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountProviderLoader.cs@@ -1,30 +1,29 @@--namespace Grand.Business.Core.Interfaces.Catalog.Discounts;+namespace Grand.Business.Core.Interfaces.Catalog.Discounts;public interface IDiscountProviderLoader{/// <summary>- /// Loads existing discount provider by rule system name+ /// Loads existing discount provider by rule system name/// </summary>/// <param name="ruleSystemName">Rule system name</param>/// <returns>Discount provider</returns>IDiscountProvider LoadDiscountProviderByRuleSystemName(string ruleSystemName);/// <summary>- /// Loads all available discount providers+ /// Loads all available discount providers/// </summary>/// <returns>Discount requirement rules</returns>IList<IDiscountProvider> LoadAllDiscountProviders();--++/// <summary>- /// Load discount amount providers+ /// Load discount amount providers/// </summary>/// <returns></returns>IList<IDiscountAmountProvider> LoadDiscountAmountProviders();-+/// <summary>- /// Load discount amount providerBySystemName+ /// Load discount amount providerBySystemName/// </summary>/// <param name="systemName"></param>/// <returns></returns>diff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountRule.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountRule.csindex 496a2cfb8..512309733 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountRule.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountRule.cs@@ -1,34 +1,33 @@using Grand.Business.Core.Utilities.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Discounts+namespace Grand.Business.Core.Interfaces.Catalog.Discounts;++public interface IDiscountRule{- public interface IDiscountRule- {- /// <summary>- /// Check discount requirements- /// </summary>- /// <param name="request">All information required to check the requirement (Current customer, discount, etc)</param>- /// <returns>Result</returns>- Task<DiscountRuleValidationResult> CheckRequirement(DiscountRuleValidationRequest request);+ /// <summary>+ /// Gets a system name+ /// </summary>+ /// <returns>SystemName</returns>+ string SystemName { get; }- /// <summary>- /// Get URL for rule configuration- /// </summary>- /// <param name="discountId">Discount id</param>- /// <param name="discountRequirementId">Discount requirement id</param>- /// <returns>URL</returns>- string GetConfigurationUrl(string discountId, string discountRequirementId);+ /// <summary>+ /// Gets a friendly name+ /// </summary>+ /// <returns>FriendlyName</returns>+ string FriendlyName { get; }- /// <summary>- /// Gets a system name- /// </summary>- /// <returns>SystemName</returns>- string SystemName { get; }+ /// <summary>+ /// Check discount requirements+ /// </summary>+ /// <param name="request">All information required to check the requirement (Current customer, discount, etc)</param>+ /// <returns>Result</returns>+ Task<DiscountRuleValidationResult> CheckRequirement(DiscountRuleValidationRequest request);- /// <summary>- /// Gets a friendly name- /// </summary>- /// <returns>FriendlyName</returns>- string FriendlyName { get; }- }-}+ /// <summary>+ /// Get URL for rule configuration+ /// </summary>+ /// <param name="discountId">Discount id</param>+ /// <param name="discountRequirementId">Discount requirement id</param>+ /// <returns>URL</returns>+ string GetConfigurationUrl(string discountId, string discountRequirementId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountService.csindex 1b7f7bdec..b9cc2fb6a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountService.cs@@ -5,166 +5,167 @@ using Grand.Domain.Customers;using Grand.Domain.Directory;using Grand.Domain.Discounts;-namespace Grand.Business.Core.Interfaces.Catalog.Discounts+namespace Grand.Business.Core.Interfaces.Catalog.Discounts;++/// <summary>+/// Discount service interface+/// </summary>+public interface IDiscountService{/// <summary>- /// Discount service interface- /// </summary>- public interface IDiscountService- {-- /// <summary>- /// Gets a discount- /// </summary>- /// <param name="discountId">Discount id</param>- /// <returns>Discount</returns>- Task<Discount> GetDiscountById(string discountId);-- /// <summary>- /// Gets active discounts by context- /// </summary>- /// <returns>Discounts</returns>- Task<IList<Discount>> GetActiveDiscountsByContext(DiscountType discountType, string storeId = "", string currencyCode = "");-- /// <summary>- /// Gets discounts query- /// </summary>- /// <returns>Discounts</returns>- Task<IList<Discount>> GetDiscountsQuery(DiscountType? discountType, string storeId = "", string currencyCode = "",- string couponCode = "", string discountName = "");-- /// <summary>- /// Inserts a new discount- /// </summary>- /// <param name="discount">Discount</param>- Task InsertDiscount(Discount discount);-- /// <summary>- /// Updates the existing discount- /// </summary>- /// <param name="discount">Discount</param>- Task UpdateDiscount(Discount discount);-- /// <summary>- /// Deletes the existing discount- /// </summary>- /// <param name="discount">Discount</param>- Task DeleteDiscount(Discount discount);-- /// <summary>- /// Gets existing discount by coupon code- /// </summary>- /// <param name="couponCode">CouponCode</param>- /// <param name="showHidden">A value that indicates if it should shows hidden records</param>- /// <returns>Discount</returns>- Task<Discount> GetDiscountByCouponCode(string couponCode, bool showHidden = false);-- /// <summary>- /// Gets a discount usage history item- /// </summary>- /// <param name="discountUsageHistoryId">Discount usage history item id</param>- /// <returns>Discount usage history</returns>- Task<DiscountUsageHistory> GetDiscountUsageHistoryById(string discountUsageHistoryId);-- /// <summary>- /// Inserts discount usage history item- /// </summary>- /// <param name="discountUsageHistory">Discount usage history item</param>- Task InsertDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);-- /// <summary>- /// Updates discount usage history item- /// </summary>- /// <param name="discountUsageHistory">Discount usage history item</param>- Task UpdateDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);-- /// <summary>- /// Deletes discount usage history item- /// </summary>- /// <param name="discountUsageHistory">Discount usage history item</param>- Task DeleteDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);-- /// <summary>- /// Gets all existing coupon codes for discount- /// </summary>- /// <param name="discountId"></param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns></returns>- Task<IPagedList<DiscountCoupon>> GetAllCouponCodesByDiscountId(string discountId, int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets the discount code by id- /// </summary>- /// <param name="id"></param>- /// <returns></returns>- Task<DiscountCoupon> GetDiscountCodeById(string id);-- /// <summary>- /// Gets the discount code by code- /// </summary>- /// <param name="couponCode"></param>- /// <returns></returns>- Task<DiscountCoupon> GetDiscountCodeByCode(string couponCode);-- /// <summary>- /// Deletes discount code- /// </summary>- /// <param name="coupon"></param>- Task DeleteDiscountCoupon(DiscountCoupon coupon);-- /// <summary>- /// Updates discount code - defines it as used or not- /// </summary>- /// <param name="couponCode"></param>- /// <param name="used"></param>- Task DiscountCouponSetAsUsed(string couponCode, bool used);-- /// <summary>- /// Cancels discount if order was canceled or deleted- /// </summary>- /// <param name="orderId"></param>- Task CancelDiscount(string orderId);-- /// <summary>- /// Inserts discount code- /// </summary>- /// <param name="coupon"></param>- Task InsertDiscountCoupon(DiscountCoupon coupon);-- /// <summary>- /// Get discount amount- /// </summary>- /// <param name="discount">Discount</param>- /// <param name="amount">Amount</param>- /// <param name="currency">currency</param>- /// <param name="customer">Customer</param>- /// <param name="product">Product</param>- Task<double> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product, double amount);-- /// <summary>- /// Gets preferred discount- /// </summary>- /// <param name="discounts"></param>- /// <param name="customer"></param>- /// <param name="product"></param>- /// <param name="currency"></param>- /// <param name="amount"></param>- /// <returns></returns>- Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,- Customer customer, Currency currency, Product product, double amount);-- /// <summary>- /// Get preferred discount- /// </summary>- /// <param name="discounts"></param>- /// <param name="amount"></param>- /// <param name="customer"></param>- /// <param name="currency"></param>- /// <returns>appliedDiscount and discountAmount</returns>- Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,- Customer customer, Currency currency, double amount);--- }-}+ /// Gets a discount+ /// </summary>+ /// <param name="discountId">Discount id</param>+ /// <returns>Discount</returns>+ Task<Discount> GetDiscountById(string discountId);++ /// <summary>+ /// Gets active discounts by context+ /// </summary>+ /// <returns>Discounts</returns>+ Task<IList<Discount>> GetActiveDiscountsByContext(DiscountType discountType, string storeId = "",+ string currencyCode = "");++ /// <summary>+ /// Gets discounts query+ /// </summary>+ /// <returns>Discounts</returns>+ Task<IList<Discount>> GetDiscountsQuery(DiscountType? discountType, string storeId = "", string currencyCode = "",+ string couponCode = "", string discountName = "");++ /// <summary>+ /// Inserts a new discount+ /// </summary>+ /// <param name="discount">Discount</param>+ Task InsertDiscount(Discount discount);++ /// <summary>+ /// Updates the existing discount+ /// </summary>+ /// <param name="discount">Discount</param>+ Task UpdateDiscount(Discount discount);++ /// <summary>+ /// Deletes the existing discount+ /// </summary>+ /// <param name="discount">Discount</param>+ Task DeleteDiscount(Discount discount);++ /// <summary>+ /// Gets existing discount by coupon code+ /// </summary>+ /// <param name="couponCode">CouponCode</param>+ /// <param name="showHidden">A value that indicates if it should shows hidden records</param>+ /// <returns>Discount</returns>+ Task<Discount> GetDiscountByCouponCode(string couponCode, bool showHidden = false);++ /// <summary>+ /// Gets a discount usage history item+ /// </summary>+ /// <param name="discountUsageHistoryId">Discount usage history item id</param>+ /// <returns>Discount usage history</returns>+ Task<DiscountUsageHistory> GetDiscountUsageHistoryById(string discountUsageHistoryId);++ /// <summary>+ /// Inserts discount usage history item+ /// </summary>+ /// <param name="discountUsageHistory">Discount usage history item</param>+ Task InsertDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);++ /// <summary>+ /// Updates discount usage history item+ /// </summary>+ /// <param name="discountUsageHistory">Discount usage history item</param>+ Task UpdateDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);++ /// <summary>+ /// Deletes discount usage history item+ /// </summary>+ /// <param name="discountUsageHistory">Discount usage history item</param>+ Task DeleteDiscountUsageHistory(DiscountUsageHistory discountUsageHistory);++ /// <summary>+ /// Gets all existing coupon codes for discount+ /// </summary>+ /// <param name="discountId"></param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns></returns>+ Task<IPagedList<DiscountCoupon>> GetAllCouponCodesByDiscountId(string discountId, int pageIndex = 0,+ int pageSize = int.MaxValue);++ /// <summary>+ /// Gets the discount code by id+ /// </summary>+ /// <param name="id"></param>+ /// <returns></returns>+ Task<DiscountCoupon> GetDiscountCodeById(string id);++ /// <summary>+ /// Gets the discount code by code+ /// </summary>+ /// <param name="couponCode"></param>+ /// <returns></returns>+ Task<DiscountCoupon> GetDiscountCodeByCode(string couponCode);++ /// <summary>+ /// Deletes discount code+ /// </summary>+ /// <param name="coupon"></param>+ Task DeleteDiscountCoupon(DiscountCoupon coupon);++ /// <summary>+ /// Updates discount code - defines it as used or not+ /// </summary>+ /// <param name="couponCode"></param>+ /// <param name="used"></param>+ Task DiscountCouponSetAsUsed(string couponCode, bool used);++ /// <summary>+ /// Cancels discount if order was canceled or deleted+ /// </summary>+ /// <param name="orderId"></param>+ Task CancelDiscount(string orderId);++ /// <summary>+ /// Inserts discount code+ /// </summary>+ /// <param name="coupon"></param>+ Task InsertDiscountCoupon(DiscountCoupon coupon);++ /// <summary>+ /// Get discount amount+ /// </summary>+ /// <param name="discount">Discount</param>+ /// <param name="amount">Amount</param>+ /// <param name="currency">currency</param>+ /// <param name="customer">Customer</param>+ /// <param name="product">Product</param>+ Task<double> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product,+ double amount);++ /// <summary>+ /// Gets preferred discount+ /// </summary>+ /// <param name="discounts"></param>+ /// <param name="customer"></param>+ /// <param name="product"></param>+ /// <param name="currency"></param>+ /// <param name="amount"></param>+ /// <returns></returns>+ Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(+ IList<ApplyDiscount> discounts,+ Customer customer, Currency currency, Product product, double amount);++ /// <summary>+ /// Get preferred discount+ /// </summary>+ /// <param name="discounts"></param>+ /// <param name="amount"></param>+ /// <param name="customer"></param>+ /// <param name="currency"></param>+ /// <returns>appliedDiscount and discountAmount</returns>+ Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(+ IList<ApplyDiscount> discounts,+ Customer customer, Currency currency, double amount);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountValidationService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountValidationService.csindex 8fbb3a42b..f3a357d20 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountValidationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Discounts/IDiscountValidationService.cs@@ -9,17 +9,18 @@ namespace Grand.Business.Core.Interfaces.Catalog.Discounts;public interface IDiscountValidationService{/// <summary>- /// Validates used discount+ /// Validates used discount/// </summary>/// <param name="discount">Discount</param>/// <param name="customer">Customer</param>/// <param name="store">Store</param>/// <param name="currency">Currency</param>/// <returns>Discount validation result</returns>- Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store, Currency currency);+ Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store,+ Currency currency);/// <summary>- /// Validates used discount with coupon code+ /// Validates used discount with coupon code/// </summary>/// <param name="discount">Discount</param>/// <param name="customer">Customer</param>@@ -27,10 +28,11 @@ public interface IDiscountValidationService/// <param name="currency">Currency</param>/// <param name="couponCodeToValidate">Coupon code that should be validated</param>/// <returns>Discount validation result</returns>- Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store, Currency currency, string couponCodeToValidate);+ Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store,+ Currency currency, string couponCodeToValidate);/// <summary>- /// Validate discount+ /// Validate discount/// </summary>/// <param name="discount">Discount</param>/// <param name="customer">Customer</param>@@ -38,10 +40,11 @@ public interface IDiscountValidationService/// <param name="currency">Currency</param>/// <param name="couponCodesToValidate">Coupon codes that should be validated</param>/// <returns>Discount validation result</returns>- Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store, Currency currency, string[] couponCodesToValidate);+ Task<DiscountValidationResult> ValidateDiscount(Discount discount, Customer customer, Store store,+ Currency currency, string[] couponCodesToValidate);/// <summary>- /// Exist coupon code in discount+ /// Exist coupon code in discount/// </summary>/// <param name="couponCode"></param>/// <param name="discountId"></param>diff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPriceFormatter.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPriceFormatter.csindex 3c3600fed..be5a8c06b 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPriceFormatter.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPriceFormatter.cs@@ -1,29 +1,28 @@using Grand.Domain.Directory;-namespace Grand.Business.Core.Interfaces.Catalog.Prices+namespace Grand.Business.Core.Interfaces.Catalog.Prices;++public interface IPriceFormatter{- public interface IPriceFormatter- {- /// <summary>- /// Formats price- /// </summary>- /// <param name="price">Price</param>- /// <returns>Price</returns>- string FormatPrice(double price);+ /// <summary>+ /// Formats price+ /// </summary>+ /// <param name="price">Price</param>+ /// <returns>Price</returns>+ string FormatPrice(double price);++ /// <summary>+ /// Formats price+ /// </summary>+ /// <param name="price">Price</param>+ /// <param name="targetCurrency">Target currency</param>+ /// <returns>Price</returns>+ string FormatPrice(double price, Currency targetCurrency);- /// <summary>- /// Formats price- /// </summary>- /// <param name="price">Price</param>- /// <param name="targetCurrency">Target currency</param>- /// <returns>Price</returns>- string FormatPrice(double price, Currency targetCurrency);-- /// <summary>- /// Formats a tax rate- /// </summary>- /// <param name="taxRate">Tax rate</param>- /// <returns>Formatted tax rate</returns>- string FormatTaxRate(double taxRate);- }-}+ /// <summary>+ /// Formats a tax rate+ /// </summary>+ /// <param name="taxRate">Tax rate</param>+ /// <returns>Formatted tax rate</returns>+ string FormatTaxRate(double taxRate);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPricingService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPricingService.csindex 407cc736a..580a1caa9 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPricingService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Prices/IPricingService.cs@@ -6,47 +6,49 @@ using Grand.Domain.Directory;using Grand.Domain.Orders;using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Catalog.Prices+namespace Grand.Business.Core.Interfaces.Catalog.Prices;++/// <summary>+/// Price calculation service+/// </summary>+public interface IPricingService{/// <summary>- /// Price calculation service+ /// Gets the final price/// </summary>- public interface IPricingService- {- /// <summary>- /// Gets the final price- /// </summary>- /// <param name="product">Product</param>- /// <param name="customer">The customer</param>- /// <param name="store">Store</param>- /// <param name="currency">The currency</param>- /// <param name="additionalCharge">Additional charge</param>- /// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>- /// <param name="quantity">Shopping cart item quantity</param>- /// <returns>Final price</returns>- Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(+ /// <param name="product">Product</param>+ /// <param name="customer">The customer</param>+ /// <param name="store">Store</param>+ /// <param name="currency">The currency</param>+ /// <param name="additionalCharge">Additional charge</param>+ /// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>+ /// <param name="quantity">Shopping cart item quantity</param>+ /// <returns>Final price</returns>+ Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)>+ GetFinalPrice(Product product,Customer customer,Store store,Currency currency,- double additionalCharge = 0,- bool includeDiscounts = true,+ double additionalCharge = 0,+ bool includeDiscounts = true,int quantity = 1);- /// <summary>- /// Gets the final price- /// </summary>- /// <param name="product">Product</param>- /// <param name="customer">The customer</param>- /// <param name="store">Store</param>- /// <param name="currency">The currency</param>- /// <param name="additionalCharge">Additional charge</param>- /// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>- /// <param name="quantity">Shopping cart item quantity</param>- /// <param name="rentalStartDate">Rental period start date (for rental products)</param>- /// <param name="rentalEndDate">Rental period end date (for rental products)</param>- /// <returns>Final price</returns>- Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,+ /// <summary>+ /// Gets the final price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="customer">The customer</param>+ /// <param name="store">Store</param>+ /// <param name="currency">The currency</param>+ /// <param name="additionalCharge">Additional charge</param>+ /// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>+ /// <param name="quantity">Shopping cart item quantity</param>+ /// <param name="rentalStartDate">Rental period start date (for rental products)</param>+ /// <param name="rentalEndDate">Rental period end date (for rental products)</param>+ /// <returns>Final price</returns>+ Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)>+ GetFinalPrice(Product product,Customer customer,Store store,Currency currency,@@ -57,68 +59,68 @@ namespace Grand.Business.Core.Interfaces.Catalog.PricesDateTime? rentalEndDate);+ /// <summary>+ /// Gets the shopping cart unit price (one item)+ /// </summary>+ /// <param name="shoppingCartItem">The shopping cart item</param>+ /// <param name="product">Product</param>+ /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>+ /// <returns>Shopping cart unit price (one item)</returns>+ Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(+ ShoppingCartItem shoppingCartItem,+ Product product, bool includeDiscounts = true);- /// <summary>- /// Gets the shopping cart unit price (one item)- /// </summary>- /// <param name="shoppingCartItem">The shopping cart item</param>- /// <param name="product">Product</param>- /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>- /// <returns>Shopping cart unit price (one item)</returns>- Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(ShoppingCartItem shoppingCartItem,- Product product, bool includeDiscounts = true);+ /// <summary>+ /// Gets the shopping cart unit price (one item)+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="customer">Customer</param>+ /// <param name="store">Store</param>+ /// <param name="currency">The currency</param>+ /// <param name="shoppingCartType">Shopping cart type</param>+ /// <param name="quantity">Quantity</param>+ /// <param name="attributes">Product attributes</param>+ /// <param name="customerEnteredPrice">Customer entered price (if specified)</param>+ /// <param name="rentalStartDate">Rental start date (null for not rental products)</param>+ /// <param name="rentalEndDate">Rental end date (null for not rental products)</param>+ /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>+ /// <returns>Shopping cart unit price (one item)</returns>+ Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(Product product,+ Customer customer,+ Store store,+ Currency currency,+ ShoppingCartType shoppingCartType,+ int quantity,+ IList<CustomAttribute> attributes,+ double? customerEnteredPrice,+ DateTime? rentalStartDate, DateTime? rentalEndDate,+ bool includeDiscounts);- /// <summary>- /// Gets the shopping cart unit price (one item)- /// </summary>- /// <param name="product">Product</param>- /// <param name="customer">Customer</param>- /// <param name="store">Store</param>- /// <param name="currency">The currency</param>- /// <param name="shoppingCartType">Shopping cart type</param>- /// <param name="quantity">Quantity</param>- /// <param name="attributes">Product attributes</param>- /// <param name="customerEnteredPrice">Customer entered price (if specified)</param>- /// <param name="rentalStartDate">Rental start date (null for not rental products)</param>- /// <param name="rentalEndDate">Rental end date (null for not rental products)</param>- /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>- /// <returns>Shopping cart unit price (one item)</returns>- Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(Product product,- Customer customer,- Store store,- Currency currency,- ShoppingCartType shoppingCartType,- int quantity,- IList<CustomAttribute> attributes,- double? customerEnteredPrice,- DateTime? rentalStartDate, DateTime? rentalEndDate,- bool includeDiscounts);+ /// <summary>+ /// Gets the shopping cart item sub total+ /// </summary>+ /// <param name="shoppingCartItem">The shopping cart item</param>+ /// <param name="product">Product</param>+ /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>+ /// <returns>Shopping cart item sub total</returns>+ Task<(double subTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(+ ShoppingCartItem shoppingCartItem, Product product,+ bool includeDiscounts = true);- /// <summary>- /// Gets the shopping cart item sub total- /// </summary>- /// <param name="shoppingCartItem">The shopping cart item</param>- /// <param name="product">Product</param>- /// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>- /// <returns>Shopping cart item sub total</returns>- Task<(double subTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(ShoppingCartItem shoppingCartItem, Product product,- bool includeDiscounts = true);+ /// <summary>+ /// Gets the product cost (one item)+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="attributes">Shopping cart item attributes</param>+ /// <returns>Product cost (one item)</returns>+ Task<double> GetProductCost(Product product, IList<CustomAttribute> attributes);- /// <summary>- /// Gets the product cost (one item)- /// </summary>- /// <param name="product">Product</param>- /// <param name="attributes">Shopping cart item attributes</param>- /// <returns>Product cost (one item)</returns>- Task<double> GetProductCost(Product product, IList<CustomAttribute> attributes);-- /// <summary>- /// Get a price adjustment of a product attribute value- /// </summary>- /// <param name="value">Product attribute value</param>- /// <returns>Price adjustment</returns>- Task<double> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value);- }-}+ /// <summary>+ /// Get a price adjustment of a product attribute value+ /// </summary>+ /// <param name="value">Product attribute value</param>+ /// <returns>Price adjustment</returns>+ Task<double> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IAuctionService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IAuctionService.csindex db3ddac54..6b20b51c1 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IAuctionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IAuctionService.cs@@ -4,100 +4,98 @@ using Grand.Domain.Customers;using Grand.Domain.Localization;using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Auction service interface+/// </summary>+public interface IAuctionService{/// <summary>- /// Auction service interface+ /// Inserts bid/// </summary>- public interface IAuctionService- {-- /// <summary>- /// Inserts bid- /// </summary>- /// <param name="bid"></param>- Task InsertBid(Bid bid);+ /// <param name="bid"></param>+ Task InsertBid(Bid bid);- /// <summary>- /// Updates bid- /// </summary>- /// <param name="bid"></param>- Task UpdateBid(Bid bid);+ /// <summary>+ /// Updates bid+ /// </summary>+ /// <param name="bid"></param>+ Task UpdateBid(Bid bid);- /// <summary>- /// Deletes bid- /// </summary>- /// <param name="bid"></param>- Task DeleteBid(Bid bid);+ /// <summary>+ /// Deletes bid+ /// </summary>+ /// <param name="bid"></param>+ Task DeleteBid(Bid bid);- /// <summary>- /// Gets bids for product Id- /// </summary>- /// <param name="productId">Product Id</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Bids</returns>- Task<IPagedList<Bid>> GetBidsByProductId(string productId, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets bids for product Id+ /// </summary>+ /// <param name="productId">Product Id</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Bids</returns>+ Task<IPagedList<Bid>> GetBidsByProductId(string productId, int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Gets bids for Customer Id- /// </summary>- /// <param name="customerId">Customer Id</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Bids</returns>- Task<IPagedList<Bid>> GetBidsByCustomerId(string customerId, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets bids for Customer Id+ /// </summary>+ /// <param name="customerId">Customer Id</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Bids</returns>+ Task<IPagedList<Bid>> GetBidsByCustomerId(string customerId, int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Gets bid for specified Id- /// </summary>- /// <param name="id">Id</param>- /// <returns>Bid</returns>- Task<Bid> GetBid(string id);+ /// <summary>+ /// Gets bid for specified Id+ /// </summary>+ /// <param name="id">Id</param>+ /// <returns>Bid</returns>+ Task<Bid> GetBid(string id);- /// <summary>- /// Get latest bid for product Id- /// </summary>- /// <param name="productId">productId</param>- /// <returns>Bid</returns>- Task<Bid> GetLatestBid(string productId);+ /// <summary>+ /// Get latest bid for product Id+ /// </summary>+ /// <param name="productId">productId</param>+ /// <returns>Bid</returns>+ Task<Bid> GetLatestBid(string productId);- /// <summary>- /// Updates highest bid- /// </summary>- /// <param name="product"></param>- /// <param name="bid"></param>- /// <param name="bidder"></param>- Task UpdateHighestBid(Product product, double bid, string bidder);+ /// <summary>+ /// Updates highest bid+ /// </summary>+ /// <param name="product"></param>+ /// <param name="bid"></param>+ /// <param name="bidder"></param>+ Task UpdateHighestBid(Product product, double bid, string bidder);- /// <summary>- /// Updates auction ended- /// </summary>- /// <param name="product"></param>- /// <param name="ended"></param>- /// <param name="endDate"></param>- Task UpdateAuctionEnded(Product product, bool ended, bool endDate = false);+ /// <summary>+ /// Updates auction ended+ /// </summary>+ /// <param name="product"></param>+ /// <param name="ended"></param>+ /// <param name="endDate"></param>+ Task UpdateAuctionEnded(Product product, bool ended, bool endDate = false);- /// <summary>- /// Gets auctions that have to be ended- /// </summary>- Task<IList<Product>> GetAuctionsToEnd();+ /// <summary>+ /// Gets auctions that have to be ended+ /// </summary>+ Task<IList<Product>> GetAuctionsToEnd();- /// <summary>- /// New bid- /// </summary>- /// <param name="customer"></param>- /// <param name="product"></param>- /// <param name="store"></param>- /// <param name="warehouseId"></param>- /// <param name="language"></param>- /// <param name="amount"></param>- Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, double amount);+ /// <summary>+ /// New bid+ /// </summary>+ /// <param name="customer"></param>+ /// <param name="product"></param>+ /// <param name="store"></param>+ /// <param name="warehouseId"></param>+ /// <param name="language"></param>+ /// <param name="amount"></param>+ Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, double amount);- /// <summary>- /// Cancel bid for product- /// </summary>- /// <param name="orderId">order id</param>- Task CancelBidByOrder(string orderId);- }+ /// <summary>+ /// Cancel bid for product+ /// </summary>+ /// <param name="orderId">order id</param>+ Task CancelBidByOrder(string orderId);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICopyProductService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICopyProductService.csindex aecad5242..72224a09c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICopyProductService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICopyProductService.cs@@ -1,21 +1,20 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Copy product service+/// </summary>+public interface ICopyProductService{/// <summary>- /// Copy product service+ /// Create a copy of product with all depended data/// </summary>- public interface ICopyProductService- {- /// <summary>- /// Create a copy of product with all depended data- /// </summary>- /// <param name="product">The product to copy</param>- /// <param name="newName">The name of product duplicate</param>- /// <param name="isPublished">A value indicating whether the product duplicate should be published</param>- /// <param name="copyAssociatedProducts">A value indicating whether the copy associated products</param>- /// <returns>Product copy</returns>- Task<Product> CopyProduct(Product product, string newName,- bool isPublished = true, bool copyAssociatedProducts = true);- }-}+ /// <param name="product">The product to copy</param>+ /// <param name="newName">The name of product duplicate</param>+ /// <param name="isPublished">A value indicating whether the product duplicate should be published</param>+ /// <param name="copyAssociatedProducts">A value indicating whether the copy associated products</param>+ /// <returns>Product copy</returns>+ Task<Product> CopyProduct(Product product, string newName,+ bool isPublished = true, bool copyAssociatedProducts = true);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICustomerGroupProductService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICustomerGroupProductService.csindex 27fbeeafa..83587b40d 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICustomerGroupProductService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ICustomerGroupProductService.cs@@ -1,47 +1,46 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++public interface ICustomerGroupProductService{- public interface ICustomerGroupProductService- {- /// <summary>- /// Gets customer groups products for customer group- /// </summary>- /// <param name="customerGroupId">Customer group id</param>- /// <returns>Customer group products</returns>- Task<IList<CustomerGroupProduct>> GetCustomerGroupProducts(string customerGroupId);+ /// <summary>+ /// Gets customer groups products for customer group+ /// </summary>+ /// <param name="customerGroupId">Customer group id</param>+ /// <returns>Customer group products</returns>+ Task<IList<CustomerGroupProduct>> GetCustomerGroupProducts(string customerGroupId);- /// <summary>- /// Gets customer groups products for customer group- /// </summary>- /// <param name="customerGroupId">Customer group id</param>- /// <param name="productId">Product id</param>- /// <returns>Customer group product</returns>- Task<CustomerGroupProduct> GetCustomerGroupProduct(string customerGroupId, string productId);+ /// <summary>+ /// Gets customer groups products for customer group+ /// </summary>+ /// <param name="customerGroupId">Customer group id</param>+ /// <param name="productId">Product id</param>+ /// <returns>Customer group product</returns>+ Task<CustomerGroupProduct> GetCustomerGroupProduct(string customerGroupId, string productId);- /// <summary>- /// Gets customer groups product- /// </summary>- /// <param name="id">id</param>- /// <returns>Customer group product</returns>- Task<CustomerGroupProduct> GetCustomerGroupProductById(string id);+ /// <summary>+ /// Gets customer groups product+ /// </summary>+ /// <param name="id">id</param>+ /// <returns>Customer group product</returns>+ Task<CustomerGroupProduct> GetCustomerGroupProductById(string id);- /// <summary>- /// Inserts a customer group product- /// </summary>- /// <param name="customerGroupProduct">Customer group product</param>- Task InsertCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);+ /// <summary>+ /// Inserts a customer group product+ /// </summary>+ /// <param name="customerGroupProduct">Customer group product</param>+ Task InsertCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);- /// <summary>- /// Updates the customer group product- /// </summary>- /// <param name="customerGroupProduct">Customer group product</param>- Task UpdateCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);+ /// <summary>+ /// Updates the customer group product+ /// </summary>+ /// <param name="customerGroupProduct">Customer group product</param>+ Task UpdateCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);- /// <summary>- /// Delete a customer group product- /// </summary>- /// <param name="customerGroupProduct">Customer group product</param>- Task DeleteCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);- }-}+ /// <summary>+ /// Delete a customer group product+ /// </summary>+ /// <param name="customerGroupProduct">Customer group product</param>+ Task DeleteCustomerGroupProduct(CustomerGroupProduct customerGroupProduct);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IInventoryManageService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IInventoryManageService.csindex ef3d987f1..a2ab88d93 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IInventoryManageService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IInventoryManageService.cs@@ -2,46 +2,45 @@using Grand.Domain.Common;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++public interface IInventoryManageService{- public interface IInventoryManageService- {- #region Inventory management methods-- /// <summary>- /// Updates stock the product- /// </summary>- /// <param name="product">Product</param>- /// <param name="mediator">Notification</param>- Task UpdateStockProduct(Product product, bool mediator = true);-- /// <summary>- /// Adjust reserved inventory- /// </summary>- /// <param name="product">Product</param>- /// <param name="quantityToChange">Quantity to increase or decrease</param>- /// <param name="attributes">Attributes</param>- /// <param name="warehouseId">Warehouse ident</param>- Task AdjustReserved(Product product, int quantityToChange, IList<CustomAttribute> attributes = null, string warehouseId = "");--- /// <summary>- /// Book the reserved quantity- /// </summary>- /// <param name="product">Product</param>- /// <param name="shipment">Shipment</param>- /// <param name="shipmentItem">Shipment item</param>- Task BookReservedInventory(Product product, Shipment shipment, ShipmentItem shipmentItem);-- /// <summary>- /// Reverse booked inventory- /// </summary>- /// <param name="shipment">Shipment</param>- /// <param name="shipmentItem">Shipment item</param>- /// <returns>Quantity reversed</returns>- Task ReverseBookedInventory(Shipment shipment, ShipmentItem shipmentItem);-- #endregion-- }-}+ #region Inventory management methods++ /// <summary>+ /// Updates stock the product+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="mediator">Notification</param>+ Task UpdateStockProduct(Product product, bool mediator = true);++ /// <summary>+ /// Adjust reserved inventory+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="quantityToChange">Quantity to increase or decrease</param>+ /// <param name="attributes">Attributes</param>+ /// <param name="warehouseId">Warehouse ident</param>+ Task AdjustReserved(Product product, int quantityToChange, IList<CustomAttribute> attributes = null,+ string warehouseId = "");+++ /// <summary>+ /// Book the reserved quantity+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="shipment">Shipment</param>+ /// <param name="shipmentItem">Shipment item</param>+ Task BookReservedInventory(Product product, Shipment shipment, ShipmentItem shipmentItem);++ /// <summary>+ /// Reverse booked inventory+ /// </summary>+ /// <param name="shipment">Shipment</param>+ /// <param name="shipmentItem">Shipment item</param>+ /// <returns>Quantity reversed</returns>+ Task ReverseBookedInventory(Shipment shipment, ShipmentItem shipmentItem);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IOutOfStockSubscriptionService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IOutOfStockSubscriptionService.csindex 029ac2d3a..cbf8b2372 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IOutOfStockSubscriptionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IOutOfStockSubscriptionService.cs@@ -2,74 +2,75 @@ using Grand.Domain;using Grand.Domain.Catalog;using Grand.Domain.Common;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Out of stock subscription service interface+/// </summary>+public interface IOutOfStockSubscriptionService{/// <summary>- /// Out of stock subscription service interface+ /// Gets all subscriptions+ /// </summary>+ /// <param name="customerId">Customer identifier</param>+ /// <param name="storeId">Store identifier; pass "" to load all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Subscriptions</returns>+ Task<IPagedList<OutOfStockSubscription>> GetAllSubscriptionsByCustomerId(string customerId,+ string storeId = "", int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Gets all subscriptions/// </summary>- public interface IOutOfStockSubscriptionService- {- /// <summary>- /// Gets all subscriptions- /// </summary>- /// <param name="customerId">Customer identifier</param>- /// <param name="storeId">Store identifier; pass "" to load all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Subscriptions</returns>- Task<IPagedList<OutOfStockSubscription>> GetAllSubscriptionsByCustomerId(string customerId,- string storeId = "", int pageIndex = 0, int pageSize = int.MaxValue);+ /// <param name="customerId">Customer id</param>+ /// <param name="productId">Product identifier</param>+ /// <param name="attributes">Attribute</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="warehouseId">Warehouse identifier</param>+ /// <returns>Subscriptions</returns>+ Task<OutOfStockSubscription> FindSubscription(string customerId, string productId,+ IList<CustomAttribute> attributes, string storeId, string warehouseId);- /// <summary>- /// Gets all subscriptions- /// </summary>- /// <param name="customerId">Customer id</param>- /// <param name="productId">Product identifier</param>- /// <param name="attributes">Attribute</param>- /// <param name="storeId">Store identifier</param>- /// <param name="warehouseId">Warehouse identifier</param>- /// <returns>Subscriptions</returns>- Task<OutOfStockSubscription> FindSubscription(string customerId, string productId, IList<CustomAttribute> attributes, string storeId, string warehouseId);+ /// <summary>+ /// Gets a subscription+ /// </summary>+ /// <param name="subscriptionId">Subscription identifier</param>+ /// <returns>Subscription</returns>+ Task<OutOfStockSubscription> GetSubscriptionById(string subscriptionId);- /// <summary>- /// Gets a subscription- /// </summary>- /// <param name="subscriptionId">Subscription identifier</param>- /// <returns>Subscription</returns>- Task<OutOfStockSubscription> GetSubscriptionById(string subscriptionId);+ /// <summary>+ /// Inserts subscription+ /// </summary>+ /// <param name="subscription">Subscription</param>+ Task InsertSubscription(OutOfStockSubscription subscription);- /// <summary>- /// Inserts subscription- /// </summary>- /// <param name="subscription">Subscription</param>- Task InsertSubscription(OutOfStockSubscription subscription);+ /// <summary>+ /// Updates subscription+ /// </summary>+ /// <param name="subscription">Subscription</param>+ Task UpdateSubscription(OutOfStockSubscription subscription);- /// <summary>- /// Updates subscription- /// </summary>- /// <param name="subscription">Subscription</param>- Task UpdateSubscription(OutOfStockSubscription subscription);+ /// <summary>+ /// Delete a out of stock subscription+ /// </summary>+ /// <param name="subscription">Subscription</param>+ Task DeleteSubscription(OutOfStockSubscription subscription);- /// <summary>- /// Delete a out of stock subscription- /// </summary>- /// <param name="subscription">Subscription</param>- Task DeleteSubscription(OutOfStockSubscription subscription);- /// <summary>- /// Send notification to subscribers- /// </summary>- /// <param name="product">Product</param>- /// <param name="warehouse">Warehouse ident</param>- /// <returns>Number of sent email</returns>- Task SendNotificationsToSubscribers(Product product, string warehouse);+ /// <summary>+ /// Send notification to subscribers+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="warehouse">Warehouse ident</param>+ /// <returns>Number of sent email</returns>+ Task SendNotificationsToSubscribers(Product product, string warehouse);- /// <summary>- /// Send notification to subscribers- /// </summary>- /// <param name="product">Product</param>- /// <param name="attributes">Attribute</param>- /// <param name="warehouse">Warehouse ident</param>- /// <returns>Number of sent email</returns>- Task SendNotificationsToSubscribers(Product product, IList<CustomAttribute> attributes, string warehouse);- }-}+ /// <summary>+ /// Send notification to subscribers+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="attributes">Attribute</param>+ /// <param name="warehouse">Warehouse ident</param>+ /// <returns>Number of sent email</returns>+ Task SendNotificationsToSubscribers(Product product, IList<CustomAttribute> attributes, string warehouse);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeFormatter.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeFormatter.csindex 7be138c77..300d1255a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeFormatter.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeFormatter.cs@@ -2,38 +2,37 @@ using Grand.Domain.Catalog;using Grand.Domain.Common;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product attribute formatter interface+/// </summary>+public interface IProductAttributeFormatter{/// <summary>- /// Product attribute formatter interface+ /// Formats attributes/// </summary>- public interface IProductAttributeFormatter- {- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="product">Product</param>- /// <param name="customAttributes">Attributes</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(Product product, IList<CustomAttribute> customAttributes);+ /// <param name="product">Product</param>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(Product product, IList<CustomAttribute> customAttributes);- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="product">Product</param>- /// <param name="customAttributes">Attributes</param>- /// <param name="customer">Customer</param>- /// <param name="separator">Separator</param>- /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>- /// <param name="renderPrices">A value indicating whether to render prices</param>- /// <param name="renderProductAttributes">A value indicating whether to render product attributes</param>- /// <param name="renderGiftVoucherAttributes">A value indicating whether to render gift voucher attributes</param>- /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>- /// <param name="showInAdmin">Show in admin</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(Product product, IList<CustomAttribute> customAttributes,- Customer customer, string separator = "<br />", bool htmlEncode = true, bool renderPrices = true,- bool renderProductAttributes = true, bool renderGiftVoucherAttributes = true,- bool allowHyperlinks = true, bool showInAdmin = false);- }-}+ /// <summary>+ /// Formats attributes+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="customer">Customer</param>+ /// <param name="separator">Separator</param>+ /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>+ /// <param name="renderPrices">A value indicating whether to render prices</param>+ /// <param name="renderProductAttributes">A value indicating whether to render product attributes</param>+ /// <param name="renderGiftVoucherAttributes">A value indicating whether to render gift voucher attributes</param>+ /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>+ /// <param name="showInAdmin">Show in admin</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(Product product, IList<CustomAttribute> customAttributes,+ Customer customer, string separator = "<br />", bool htmlEncode = true, bool renderPrices = true,+ bool renderProductAttributes = true, bool renderGiftVoucherAttributes = true,+ bool allowHyperlinks = true, bool showInAdmin = false);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeService.csindex d8254bcb2..7d8ac1bbf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductAttributeService.cs@@ -1,128 +1,130 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product attribute service interface+/// </summary>+public interface IProductAttributeService{+ #region Product attributes++ /// <summary>+ /// Deletes a product attribute+ /// </summary>+ /// <param name="productAttribute">Product attribute</param>+ Task DeleteProductAttribute(ProductAttribute productAttribute);++ /// <summary>+ /// Gets all product attributes+ /// </summary>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Product attributes</returns>+ Task<IPagedList<ProductAttribute>> GetAllProductAttributes(int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Gets a product attribute+ /// </summary>+ /// <param name="productAttributeId">Product attribute identifier</param>+ /// <returns>Product attribute </returns>+ Task<ProductAttribute> GetProductAttributeById(string productAttributeId);++ /// <summary>+ /// Inserts a product attribute+ /// </summary>+ /// <param name="productAttribute">Product attribute</param>+ Task InsertProductAttribute(ProductAttribute productAttribute);++ /// <summary>+ /// Updates the product attribute+ /// </summary>+ /// <param name="productAttribute">Product attribute</param>+ Task UpdateProductAttribute(ProductAttribute productAttribute);++ #endregion++ #region Product attributes mappings++ /// <summary>+ /// Inserts a product attribute mapping+ /// </summary>+ /// <param name="productAttributeMapping">The product attribute mapping</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId);++ /// <summary>+ /// Updates the product attribute mapping+ /// </summary>+ /// <param name="productAttributeMapping">The product attribute mapping</param>+ /// <param name="productId">Product ident</param>+ /// <param name="values">Update values</param>+ Task UpdateProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId,+ bool values = false);++ /// <summary>+ /// Deletes a product attribute mapping+ /// </summary>+ /// <param name="productAttributeMapping">Product attribute mapping</param>+ /// <param name="productId">Product ident</param>+ Task DeleteProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId);++ #endregion++ #region Product attribute values++ /// <summary>+ /// Deletes a product attribute value+ /// </summary>+ /// <param name="productAttributeValue">Product attribute value</param>+ /// <param name="productId">Product ident</param>+ /// <param name="productAttributeMappingId">Product attr mapping ident</param>+ Task DeleteProductAttributeValue(ProductAttributeValue productAttributeValue, string productId,+ string productAttributeMappingId);++ /// <summary>+ /// Inserts a product attribute value+ /// </summary>+ /// <param name="productAttributeValue">The product attribute value</param>+ /// <param name="productId">Product ident</param>+ /// <param name="productAttributeMappingId">Product attr mapping ident</param>+ Task InsertProductAttributeValue(ProductAttributeValue productAttributeValue, string productId,+ string productAttributeMappingId);+/// <summary>- /// Product attribute service interface+ /// Updates the product attribute value/// </summary>- public interface IProductAttributeService- {- #region Product attributes-- /// <summary>- /// Deletes a product attribute- /// </summary>- /// <param name="productAttribute">Product attribute</param>- Task DeleteProductAttribute(ProductAttribute productAttribute);-- /// <summary>- /// Gets all product attributes- /// </summary>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Product attributes</returns>- Task<IPagedList<ProductAttribute>> GetAllProductAttributes(int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets a product attribute- /// </summary>- /// <param name="productAttributeId">Product attribute identifier</param>- /// <returns>Product attribute </returns>- Task<ProductAttribute> GetProductAttributeById(string productAttributeId);-- /// <summary>- /// Inserts a product attribute- /// </summary>- /// <param name="productAttribute">Product attribute</param>- Task InsertProductAttribute(ProductAttribute productAttribute);-- /// <summary>- /// Updates the product attribute- /// </summary>- /// <param name="productAttribute">Product attribute</param>- Task UpdateProductAttribute(ProductAttribute productAttribute);-- #endregion-- #region Product attributes mappings--- /// <summary>- /// Inserts a product attribute mapping- /// </summary>- /// <param name="productAttributeMapping">The product attribute mapping</param>- /// <param name="productId">Product ident</param>- Task InsertProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId);-- /// <summary>- /// Updates the product attribute mapping- /// </summary>- /// <param name="productAttributeMapping">The product attribute mapping</param>- /// <param name="productId">Product ident</param>- /// <param name="values">Update values</param>- Task UpdateProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId, bool values = false);-- /// <summary>- /// Deletes a product attribute mapping- /// </summary>- /// <param name="productAttributeMapping">Product attribute mapping</param>- /// <param name="productId">Product ident</param>- Task DeleteProductAttributeMapping(ProductAttributeMapping productAttributeMapping, string productId);-- #endregion-- #region Product attribute values-- /// <summary>- /// Deletes a product attribute value- /// </summary>- /// <param name="productAttributeValue">Product attribute value</param>- /// <param name="productId">Product ident</param>- /// <param name="productAttributeMappingId">Product attr mapping ident</param>- Task DeleteProductAttributeValue(ProductAttributeValue productAttributeValue, string productId, string productAttributeMappingId);-- /// <summary>- /// Inserts a product attribute value- /// </summary>- /// <param name="productAttributeValue">The product attribute value</param>- /// <param name="productId">Product ident</param>- /// <param name="productAttributeMappingId">Product attr mapping ident</param>- Task InsertProductAttributeValue(ProductAttributeValue productAttributeValue, string productId, string productAttributeMappingId);-- /// <summary>- /// Updates the product attribute value- /// </summary>- /// <param name="productAttributeValue">The product attribute value</param>- /// <param name="productId">Product ident</param>- /// <param name="productAttributeMappingId">Product attr mapping ident</param>- Task UpdateProductAttributeValue(ProductAttributeValue productAttributeValue, string productId, string productAttributeMappingId);-- #endregion-- #region Product attribute combinations-- /// <summary>- /// Deletes a product attribute combination- /// </summary>- /// <param name="combination">Product attribute combination</param>- /// <param name="productId">Product ident</param>- Task DeleteProductAttributeCombination(ProductAttributeCombination combination, string productId);-- /// <summary>- /// Inserts a product attribute combination- /// </summary>- /// <param name="combination">Product attribute combination</param>- /// <param name="productId">Product ident</param>- Task InsertProductAttributeCombination(ProductAttributeCombination combination, string productId);-- /// <summary>- /// Updates a product attribute combination- /// </summary>- /// <param name="combination">Product attribute combination</param>- /// <param name="productId">Product ident</param>- Task UpdateProductAttributeCombination(ProductAttributeCombination combination, string productId);-- #endregion- }-}+ /// <param name="productAttributeValue">The product attribute value</param>+ /// <param name="productId">Product ident</param>+ /// <param name="productAttributeMappingId">Product attr mapping ident</param>+ Task UpdateProductAttributeValue(ProductAttributeValue productAttributeValue, string productId,+ string productAttributeMappingId);++ #endregion++ #region Product attribute combinations++ /// <summary>+ /// Deletes a product attribute combination+ /// </summary>+ /// <param name="combination">Product attribute combination</param>+ /// <param name="productId">Product ident</param>+ Task DeleteProductAttributeCombination(ProductAttributeCombination combination, string productId);++ /// <summary>+ /// Inserts a product attribute combination+ /// </summary>+ /// <param name="combination">Product attribute combination</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductAttributeCombination(ProductAttributeCombination combination, string productId);++ /// <summary>+ /// Updates a product attribute combination+ /// </summary>+ /// <param name="combination">Product attribute combination</param>+ /// <param name="productId">Product ident</param>+ Task UpdateProductAttributeCombination(ProductAttributeCombination combination, string productId);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductCourseService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductCourseService.csindex 7c9a63f1b..f3201973a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductCourseService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductCourseService.cs@@ -1,12 +1,11 @@using Grand.Domain.Catalog;using Grand.Domain.Courses;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++public interface IProductCourseService{- public interface IProductCourseService- {- Task<Product> GetProductByCourseId(string courseId);- Task<Course> GetCourseByProductId(string productId);- Task UpdateCourseOnProduct(string productId, string courseId);- }-}+ Task<Product> GetProductByCourseId(string courseId);+ Task<Course> GetCourseByProductId(string productId);+ Task UpdateCourseOnProduct(string productId, string courseId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductLayoutService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductLayoutService.csindex b23fb7145..a8c34c8d3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductLayoutService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductLayoutService.cs@@ -1,43 +1,40 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product layout interface+/// </summary>+public interface IProductLayoutService{/// <summary>- /// Product layout interface+ /// Gets all product layout/// </summary>- public interface IProductLayoutService- {-- /// <summary>- /// Gets all product layout- /// </summary>- /// <returns>Product layouts</returns>- Task<IList<ProductLayout>> GetAllProductLayouts();-- /// <summary>- /// Gets a product layout- /// </summary>- /// <param name="productLayoutId">Product layout identifier</param>- /// <returns>Product layout</returns>- Task<ProductLayout> GetProductLayoutById(string productLayoutId);+ /// <returns>Product layouts</returns>+ Task<IList<ProductLayout>> GetAllProductLayouts();- /// <summary>- /// Inserts product layout- /// </summary>- /// <param name="productLayout">Product layout</param>- Task InsertProductLayout(ProductLayout productLayout);+ /// <summary>+ /// Gets a product layout+ /// </summary>+ /// <param name="productLayoutId">Product layout identifier</param>+ /// <returns>Product layout</returns>+ Task<ProductLayout> GetProductLayoutById(string productLayoutId);- /// <summary>- /// Updates the product layout- /// </summary>- /// <param name="productLayout">Product layout</param>- Task UpdateProductLayout(ProductLayout productLayout);+ /// <summary>+ /// Inserts product layout+ /// </summary>+ /// <param name="productLayout">Product layout</param>+ Task InsertProductLayout(ProductLayout productLayout);- /// <summary>- /// Delete product layout- /// </summary>- /// <param name="productLayout">Product layout</param>- Task DeleteProductLayout(ProductLayout productLayout);+ /// <summary>+ /// Updates the product layout+ /// </summary>+ /// <param name="productLayout">Product layout</param>+ Task UpdateProductLayout(ProductLayout productLayout);- }-}+ /// <summary>+ /// Delete product layout+ /// </summary>+ /// <param name="productLayout">Product layout</param>+ Task DeleteProductLayout(ProductLayout productLayout);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReservationService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReservationService.csindex daa54ad19..ce53a6e09 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReservationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReservationService.cs@@ -1,88 +1,88 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product reservation service interface+/// </summary>+public interface IProductReservationService{/// <summary>- /// Product reservation service interface+ /// Adds product reservation/// </summary>- public interface IProductReservationService- {-- /// <summary>- /// Adds product reservation- /// </summary>- /// <param name="productReservation">Product reservation</param>- Task InsertProductReservation(ProductReservation productReservation);+ /// <param name="productReservation">Product reservation</param>+ Task InsertProductReservation(ProductReservation productReservation);- /// <summary>- /// Updates product reservation- /// </summary>- /// <param name="productReservation">Product reservation</param>- Task UpdateProductReservation(ProductReservation productReservation);+ /// <summary>+ /// Updates product reservation+ /// </summary>+ /// <param name="productReservation">Product reservation</param>+ Task UpdateProductReservation(ProductReservation productReservation);- /// <summary>- /// Deletes a product reservation- /// </summary>- /// <param name="productReservation">Product reservation</param>- Task DeleteProductReservation(ProductReservation productReservation);+ /// <summary>+ /// Deletes a product reservation+ /// </summary>+ /// <param name="productReservation">Product reservation</param>+ Task DeleteProductReservation(ProductReservation productReservation);- /// <summary>- /// Gets product reservations for product Id- /// </summary>- /// <param name="productId">Product Id</param>- /// <param name="showVacant">Show vacant</param>- /// <param name="date">Date</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Product reservations</returns>- Task<IPagedList<ProductReservation>> GetProductReservationsByProductId(string productId, bool? showVacant, DateTime? date,- int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets product reservations for product Id+ /// </summary>+ /// <param name="productId">Product Id</param>+ /// <param name="showVacant">Show vacant</param>+ /// <param name="date">Date</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Product reservations</returns>+ Task<IPagedList<ProductReservation>> GetProductReservationsByProductId(string productId, bool? showVacant,+ DateTime? date,+ int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Gets product reservation for specified Id- /// </summary>- /// <param name="id">Product Id</param>- /// <returns>Product reservation</returns>- Task<ProductReservation> GetProductReservation(string id);+ /// <summary>+ /// Gets product reservation for specified Id+ /// </summary>+ /// <param name="id">Product Id</param>+ /// <returns>Product reservation</returns>+ Task<ProductReservation> GetProductReservation(string id);- /// <summary>- /// Adds customer reservations helper- /// </summary>- /// <param name="crh"></param>- Task InsertCustomerReservationsHelper(CustomerReservationsHelper crh);+ /// <summary>+ /// Adds customer reservations helper+ /// </summary>+ /// <param name="crh"></param>+ Task InsertCustomerReservationsHelper(CustomerReservationsHelper crh);- /// <summary>- /// Deletes customer reservations helper- /// </summary>- /// <param name="crh"></param>- Task DeleteCustomerReservationsHelper(CustomerReservationsHelper crh);+ /// <summary>+ /// Deletes customer reservations helper+ /// </summary>+ /// <param name="crh"></param>+ Task DeleteCustomerReservationsHelper(CustomerReservationsHelper crh);- /// <summary>- /// Cancel reservations by orderId- /// </summary>- /// <param name="orderId"></param>- Task CancelReservationsByOrderId(string orderId);+ /// <summary>+ /// Cancel reservations by orderId+ /// </summary>+ /// <param name="orderId"></param>+ Task CancelReservationsByOrderId(string orderId);- /// <summary>- /// Gets customer reservations helper by id- /// </summary>- /// <param name="id"></param>- /// <returns>CustomerReservationsHelper</returns>- Task<CustomerReservationsHelper> GetCustomerReservationsHelperById(string id);+ /// <summary>+ /// Gets customer reservations helper by id+ /// </summary>+ /// <param name="id"></param>+ /// <returns>CustomerReservationsHelper</returns>+ Task<CustomerReservationsHelper> GetCustomerReservationsHelperById(string id);- /// <summary>- /// Gets customer reservations helpers- /// </summary>- /// <param name="customerId">Customer ident</param>- /// <returns>List<CustomerReservationsHelper />- /// </returns>- Task<IList<CustomerReservationsHelper>> GetCustomerReservationsHelpers(string customerId);+ /// <summary>+ /// Gets customer reservations helpers+ /// </summary>+ /// <param name="customerId">Customer ident</param>+ /// <returns>+ /// List<CustomerReservationsHelper />+ /// </returns>+ Task<IList<CustomerReservationsHelper>> GetCustomerReservationsHelpers(string customerId);- /// <summary>- /// Gets customer reservations helper by Shopping Cart Item id- /// </summary>- /// <param name="sciId">Sci ident</param>- Task<IList<CustomerReservationsHelper>> GetCustomerReservationsHelperBySciId(string sciId);- }-}+ /// <summary>+ /// Gets customer reservations helper by Shopping Cart Item id+ /// </summary>+ /// <param name="sciId">Sci ident</param>+ Task<IList<CustomerReservationsHelper>> GetCustomerReservationsHelperBySciId(string sciId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReviewService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReviewService.csindex 257245fb4..9e7ee9e6f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReviewService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductReviewService.cs@@ -1,55 +1,53 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product review service+/// </summary>+public interface IProductReviewService{/// <summary>- /// Product review service+ /// Insert product review/// </summary>- public interface IProductReviewService- {- /// <summary>- /// Insert product review- /// </summary>- /// <param name="productReview">Product review</param>- Task InsertProductReview(ProductReview productReview);-- /// <summary>- /// Update product review- /// </summary>- /// <param name="productReview">Product review</param>- Task UpdateProductReview(ProductReview productReview);+ /// <param name="productReview">Product review</param>+ Task InsertProductReview(ProductReview productReview);- /// <summary>- /// Deletes a product review- /// </summary>- /// <param name="productReview">Product review</param>- Task DeleteProductReview(ProductReview productReview);+ /// <summary>+ /// Update product review+ /// </summary>+ /// <param name="productReview">Product review</param>+ Task UpdateProductReview(ProductReview productReview);- /// <summary>- /// Gets all product reviews- /// </summary>- /// <param name="customerId">Customer identifier; "" to load all records</param>- /// <param name="approved">A value indicating whether to content is approved; null to load all records</param>- /// <param name="fromUtc">Item creation from; null to load all records</param>- /// <param name="toUtc">Item item creation to; null to load all records</param>- /// <param name="message">Search title or review text; null to load all records</param>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="productId">Product identifier; "" to load all records</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Reviews</returns>- Task<IPagedList<ProductReview>> GetAllProductReviews(string customerId, bool? approved = null,- DateTime? fromUtc = null, DateTime? toUtc = null,- string message = null, string storeId = "", string productId = "", int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Deletes a product review+ /// </summary>+ /// <param name="productReview">Product review</param>+ Task DeleteProductReview(ProductReview productReview);- /// <summary>- /// Gets product review- /// </summary>- /// <param name="productReviewId">Product review identifier</param>- /// <returns>Product review</returns>- Task<ProductReview> GetProductReviewById(string productReviewId);+ /// <summary>+ /// Gets all product reviews+ /// </summary>+ /// <param name="customerId">Customer identifier; "" to load all records</param>+ /// <param name="approved">A value indicating whether to content is approved; null to load all records</param>+ /// <param name="fromUtc">Item creation from; null to load all records</param>+ /// <param name="toUtc">Item item creation to; null to load all records</param>+ /// <param name="message">Search title or review text; null to load all records</param>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="productId">Product identifier; "" to load all records</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Reviews</returns>+ Task<IPagedList<ProductReview>> GetAllProductReviews(string customerId, bool? approved = null,+ DateTime? fromUtc = null, DateTime? toUtc = null,+ string message = null, string storeId = "", string productId = "", int pageIndex = 0,+ int pageSize = int.MaxValue);-- }-}+ /// <summary>+ /// Gets product review+ /// </summary>+ /// <param name="productReviewId">Product review identifier</param>+ /// <returns>Product review</returns>+ Task<ProductReview> GetProductReviewById(string productReviewId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductService.csindex 745472cac..4fa7663af 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductService.cs@@ -4,427 +4,435 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using System.Linq.Expressions;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product service+/// </summary>+public interface IProductService{+ #region Products++ /// <summary>+ /// Gets all products displayed on the home page+ /// </summary>+ /// <returns>Products</returns>+ Task<IList<string>> GetAllProductsDisplayedOnHomePage();++ /// <summary>+ /// Gets all products displayed on the best seller+ /// </summary>+ /// <returns>Products</returns>+ Task<IList<string>> GetAllProductsDisplayedOnBestSeller();++ /// <summary>+ /// Gets product+ /// </summary>+ /// <param name="productId">Product identifier</param>+ /// <param name="fromDb">get data from db (not from cache)</param>+ /// <returns>Product</returns>+ Task<Product> GetProductById(string productId, bool fromDb = false);++ /// <summary>+ /// Gets product from product or product deleted+ /// </summary>+ /// <param name="productId">Product identifier</param>+ /// <returns>Product</returns>+ Task<Product> GetProductByIdIncludeArch(string productId);++ /// <summary>+ /// Gets products by identifier+ /// </summary>+ /// <param name="productIds">Product identifiers</param>+ /// <param name="showHidden">Show hidden</param>+ /// <returns>Products</returns>+ Task<IList<Product>> GetProductsByIds(string[] productIds, bool showHidden = false);++ /// <summary>+ /// Gets products by discount+ /// </summary>+ /// <param name="discountId">Product identifiers</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Products</returns>+ Task<IPagedList<Product>> GetProductsByDiscount(string discountId, int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Inserts a product+ /// </summary>+ /// <param name="product">Product</param>+ Task InsertProduct(Product product);++ /// <summary>+ /// Updates the product+ /// </summary>+ /// <param name="product">Product</param>+ Task UpdateProduct(Product product);++ /// <summary>+ /// Delete a product+ /// </summary>+ /// <param name="product">Product</param>+ Task DeleteProduct(Product product);++ /// <summary>+ /// Set product as unpublished+ /// </summary>+ /// <param name="product"></param>+ Task UnPublishProduct(Product product);++ /// <summary>+ /// Updates the product field+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="expression"></param>+ /// <param name="value"></param>+ Task UpdateProductField<T>(Product product,+ Expression<Func<Product, T>> expression, T value);+++ /// <summary>+ /// Increment the product field+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="expression"></param>+ /// <param name="value"></param>+ Task IncrementProductField<T>(Product product,+ Expression<Func<Product, T>> expression, T value);+/// <summary>- /// Product service- /// </summary>- public interface IProductService- {- #region Products-- /// <summary>- /// Gets all products displayed on the home page- /// </summary>- /// <returns>Products</returns>- Task<IList<string>> GetAllProductsDisplayedOnHomePage();-- /// <summary>- /// Gets all products displayed on the best seller- /// </summary>- /// <returns>Products</returns>- Task<IList<string>> GetAllProductsDisplayedOnBestSeller();-- /// <summary>- /// Gets product- /// </summary>- /// <param name="productId">Product identifier</param>- /// <param name="fromDb">get data from db (not from cache)</param>- /// <returns>Product</returns>- Task<Product> GetProductById(string productId, bool fromDb = false);-- /// <summary>- /// Gets product from product or product deleted- /// </summary>- /// <param name="productId">Product identifier</param>- /// <returns>Product</returns>- Task<Product> GetProductByIdIncludeArch(string productId);-- /// <summary>- /// Gets products by identifier- /// </summary>- /// <param name="productIds">Product identifiers</param>- /// <param name="showHidden">Show hidden</param>- /// <returns>Products</returns>- Task<IList<Product>> GetProductsByIds(string[] productIds, bool showHidden = false);-- /// <summary>- /// Gets products by discount- /// </summary>- /// <param name="discountId">Product identifiers</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Products</returns>- Task<IPagedList<Product>> GetProductsByDiscount(string discountId, int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Inserts a product- /// </summary>- /// <param name="product">Product</param>- Task InsertProduct(Product product);-- /// <summary>- /// Updates the product- /// </summary>- /// <param name="product">Product</param>- Task UpdateProduct(Product product);-- /// <summary>- /// Delete a product- /// </summary>- /// <param name="product">Product</param>- Task DeleteProduct(Product product);-- /// <summary>- /// Set product as unpublished- /// </summary>- /// <param name="product"></param>- Task UnPublishProduct(Product product);-- /// <summary>- /// Updates the product field- /// </summary>- /// <param name="product">Product</param>- /// <param name="expression"></param>- /// <param name="value"></param>- Task UpdateProductField<T>(Product product,- Expression<Func<Product, T>> expression, T value);--- /// <summary>- /// Increment the product field- /// </summary>- /// <param name="product">Product</param>- /// <param name="expression"></param>- /// <param name="value"></param>- Task IncrementProductField<T>(Product product,- Expression<Func<Product, T>> expression, T value);-- /// <summary>- /// Get (visible) product number in certain category- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="categoryIds">Category identifiers</param>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="ignoreAcl">Ignore acl</param>- /// <param name="ignoreStore">Ignore store</param>- /// <returns>Product number</returns>- int GetCategoryProductNumber(Customer customer, IList<string> categoryIds = null, string storeId = "", bool ignoreAcl = true, bool ignoreStore = true);-- /// <summary>- /// Search products- /// </summary>- /// <param name="loadFilterableSpecificationAttributeOptionIds">A value indicating whether we should load the specification attribute option identifiers applied to loaded products (all pages)</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="categoryIds">Category identifiers</param>- /// <param name="brandId">Brand ident</param>- /// <param name="collectionId">Collection identifier; "" to load all records</param>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="warehouseId">Warehouse identifier; "" to load all records</param>- /// <param name="productType">Product type; "" to load all records</param>- /// <param name="visibleIndividuallyOnly">A values indicating whether to load only products marked as "visible individually"; "false" to load all records; "true" to load "visible individually" only</param>- /// <param name="markedAsNewOnly">Marked as new</param>- /// <param name="showOnHomePage">A value indicating whether loaded products show on homepage</param>- /// <param name="featuredProducts">A value indicating whether loaded products are marked as featured (relates only to categories and collections). 0 to load featured products only, 1 to load not featured products only, null to load all products</param>- /// <param name="priceMin">Minimum price; null to load all records</param>- /// <param name="priceMax">Maximum price; null to load all records</param>- /// <param name="productTag">Product tag name; "" to load all records</param>- /// <param name="keywords">Keywords</param>- /// <param name="searchDescriptions">A value indicating whether to search by a specified "keyword" in product descriptions</param>- /// <param name="searchSku">A value indicating whether to search by a specified "keyword" in product SKU</param>- /// <param name="searchProductTags">A value indicating whether to search by a specified "keyword" in product tags</param>- /// <param name="languageId">Language identifier (search for text searching)</param>- /// <param name="filteredSpecs">Filtered product specification identifiers</param>- /// <param name="specificationOptions">Specification options identifiers</param>- /// <param name="orderBy">Order by</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <param name="overridePublished">- /// null - process "Published" property according to "showHidden" parameter- /// true - load only "Published" products- /// false - load only "Unpublished" products- /// </param>- /// <returns>Products</returns>- Task<(IPagedList<Product> products, IList<string> filterableSpecificationAttributeOptionIds)> SearchProducts(- bool loadFilterableSpecificationAttributeOptionIds = false,- int pageIndex = 0,- int pageSize = int.MaxValue,- IList<string> categoryIds = null,- string brandId = "",- string collectionId = "",- string storeId = "",- string vendorId = "",- string warehouseId = "",- ProductType? productType = null,- bool visibleIndividuallyOnly = false,- bool markedAsNewOnly = false,- bool? showOnHomePage = null,- bool? featuredProducts = null,- double? priceMin = null,- double? priceMax = null,- string productTag = "",- string keywords = null,- bool searchDescriptions = false,- bool searchSku = true,- bool searchProductTags = false,- string languageId = "",- IList<string> filteredSpecs = null,- IList<string> specificationOptions = null,- ProductSortingEnum orderBy = ProductSortingEnum.Position,- bool showHidden = false,- bool? overridePublished = null);-- /// <summary>- /// Gets products by product attribute- /// </summary>- /// <param name="productAttributeId">Product attribute identifier</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Products</returns>- Task<IPagedList<Product>> GetProductsByProductAttributeId(string productAttributeId,- int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets associated products- /// </summary>- /// <param name="parentGroupedProductId">Parent product identifier (used with grouped products)</param>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Products</returns>- Task<IList<Product>> GetAssociatedProducts(string parentGroupedProductId,- string storeId = "", string vendorId = "", bool showHidden = false);-- /// <summary>- /// Update product associated- /// </summary>- /// <param name="product">Product</param>- Task UpdateAssociatedProduct(Product product);-- /// <summary>- /// Gets a product by SKU- /// </summary>- /// <param name="sku">SKU</param>- /// <returns>Product</returns>- Task<Product> GetProductBySku(string sku);-- #endregion-- #region Related products-- /// <summary>- /// Inserts a related product- /// </summary>- /// <param name="relatedProduct">Related product</param>- /// <param name="productId">Product ident</param>- Task InsertRelatedProduct(RelatedProduct relatedProduct, string productId);-- /// <summary>- /// Updates a related product- /// </summary>- /// <param name="relatedProduct">Related product</param>- /// <param name="productId">Product ident</param>- Task UpdateRelatedProduct(RelatedProduct relatedProduct, string productId);-- /// <summary>- /// Deletes a related product- /// </summary>- /// <param name="relatedProduct">Related product</param>- /// <param name="productId">Product ident</param>- Task DeleteRelatedProduct(RelatedProduct relatedProduct, string productId);-- #endregion-- #region Similar products-- /// <summary>- /// Inserts a similar product- /// </summary>- /// <param name="similarProduct">Similar product</param>- Task InsertSimilarProduct(SimilarProduct similarProduct);-- /// <summary>- /// Updates a similar product- /// </summary>- /// <param name="similarProduct">Similar product</param>- Task UpdateSimilarProduct(SimilarProduct similarProduct);-- /// <summary>- /// Deletes a similar product- /// </summary>- /// <param name="similarProduct">Similar product</param>- Task DeleteSimilarProduct(SimilarProduct similarProduct);-- #endregion-- #region Cross-sell products-- /// <summary>- /// Inserts a cross-sell product- /// </summary>- /// <param name="crossSellProduct">Cross-sell product</param>- Task InsertCrossSellProduct(CrossSellProduct crossSellProduct);-- /// <summary>- /// Deletes a cross-sell product- /// </summary>- /// <param name="crossSellProduct">Cross-sell</param>- Task DeleteCrossSellProduct(CrossSellProduct crossSellProduct);-- /// <summary>- /// Gets a cross-sells- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <param name="numberOfProducts">Number of products to return</param>- /// <returns>Cross-sells</returns>- Task<IList<Product>> GetCrossSellProductsByShoppingCart(IList<ShoppingCartItem> cart, int numberOfProducts);-- #endregion-- #region Recommmended products-- /// <summary>- /// Insert a recommended product- /// </summary>- Task InsertRecommendedProduct(string productId, string recommendedProductId);-- /// <summary>- /// Delete a recommended product- /// </summary>- Task DeleteRecommendedProduct(string productId, string recommendedProductId);-- #endregion-- #region Bundle products-- /// <summary>- /// Inserts a bundle product- /// </summary>- /// <param name="bundleProduct">Bundle product</param>- /// <param name="productBundleId">Product bundle ident</param>- Task InsertBundleProduct(BundleProduct bundleProduct, string productBundleId);-- /// <summary>- /// Updates a bundle product- /// </summary>- /// <param name="bundleProduct">Bundle product</param>- /// <param name="productBundleId">Product bundle ident</param>- Task UpdateBundleProduct(BundleProduct bundleProduct, string productBundleId);-- /// <summary>- /// Deletes a bundle product- /// </summary>- /// <param name="bundleProduct">Bundle product</param>- /// <param name="productBundleId">Product bundle ident</param>- Task DeleteBundleProduct(BundleProduct bundleProduct, string productBundleId);- #endregion-- #region Tier prices-- /// <summary>- /// Inserts a tier price- /// </summary>- /// <param name="tierPrice">Tier price</param>- /// <param name="productId">Product ident</param>- Task InsertTierPrice(TierPrice tierPrice, string productId);-- /// <summary>- /// Updates the tier price- /// </summary>- /// <param name="tierPrice">Tier price</param>- /// <param name="productId">Product ident</param>- Task UpdateTierPrice(TierPrice tierPrice, string productId);-- /// <summary>- /// Deletes a tier price- /// </summary>- /// <param name="tierPrice">Tier price</param>- /// <param name="productId">Product ident</param>- Task DeleteTierPrice(TierPrice tierPrice, string productId);--- #endregion-- #region Product prices-- /// <summary>- /// Inserts a product price- /// </summary>- /// <param name="productPrice">Product price</param>- Task InsertProductPrice(ProductPrice productPrice);-- /// <summary>- /// Updates the product price- /// </summary>- /// <param name="productPrice">Product price</param>- Task UpdateProductPrice(ProductPrice productPrice);-- /// <summary>- /// Deletes a product price- /// </summary>- /// <param name="productPrice">Product price</param>- Task DeleteProductPrice(ProductPrice productPrice);-- #endregion-- #region Product pictures-- /// <summary>- /// Inserts a product picture- /// </summary>- /// <param name="productPicture">Product picture</param>- /// <param name="productId">Product ident</param>- Task InsertProductPicture(ProductPicture productPicture, string productId);-- /// <summary>- /// Updates a product picture- /// </summary>- /// <param name="productPicture">Product picture</param>- /// <param name="productId">Product ident</param>- Task UpdateProductPicture(ProductPicture productPicture, string productId);-- /// <summary>- /// Deletes a product picture- /// </summary>- /// <param name="productPicture">Product picture</param>- /// <param name="productId">Product ident</param>- Task DeleteProductPicture(ProductPicture productPicture, string productId);-- #endregion-- #region Product warehouse inventory--- /// <summary>- /// Insert a ProductWarehouseInventory- /// </summary>- /// <param name="pwi">ProductWarehouseInventory</param>- /// <param name="productId">Product ident</param>- Task InsertProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);-- /// <summary>- /// Update a ProductWarehouseInventory- /// </summary>- /// <param name="pwi">ProductWarehouseInventory</param>- /// <param name="productId">Product ident</param>- Task UpdateProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);-- /// <summary>- /// Deletes a ProductWarehouseInventory- /// </summary>- /// <param name="pwi">ProductWarehouseInventory</param>- /// <param name="productId">Product ident</param>- Task DeleteProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);--- #endregion-- #region Discounts-- Task InsertDiscount(string discountId, string productId);- Task DeleteDiscount(string discountId, string productId);-- #endregion- }-}+ /// Get (visible) product number in certain category+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="categoryIds">Category identifiers</param>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="ignoreAcl">Ignore acl</param>+ /// <param name="ignoreStore">Ignore store</param>+ /// <returns>Product number</returns>+ int GetCategoryProductNumber(Customer customer, IList<string> categoryIds = null, string storeId = "",+ bool ignoreAcl = true, bool ignoreStore = true);++ /// <summary>+ /// Search products+ /// </summary>+ /// <param name="loadFilterableSpecificationAttributeOptionIds">+ /// A value indicating whether we should load the specification+ /// attribute option identifiers applied to loaded products (all pages)+ /// </param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="categoryIds">Category identifiers</param>+ /// <param name="brandId">Brand ident</param>+ /// <param name="collectionId">Collection identifier; "" to load all records</param>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="warehouseId">Warehouse identifier; "" to load all records</param>+ /// <param name="productType">Product type; "" to load all records</param>+ /// <param name="visibleIndividuallyOnly">+ /// A values indicating whether to load only products marked as "visible+ /// individually"; "false" to load all records; "true" to load "visible individually" only+ /// </param>+ /// <param name="markedAsNewOnly">Marked as new</param>+ /// <param name="showOnHomePage">A value indicating whether loaded products show on homepage</param>+ /// <param name="featuredProducts">+ /// A value indicating whether loaded products are marked as featured (relates only to+ /// categories and collections). 0 to load featured products only, 1 to load not featured products only, null to load+ /// all products+ /// </param>+ /// <param name="priceMin">Minimum price; null to load all records</param>+ /// <param name="priceMax">Maximum price; null to load all records</param>+ /// <param name="productTag">Product tag name; "" to load all records</param>+ /// <param name="keywords">Keywords</param>+ /// <param name="searchDescriptions">A value indicating whether to search by a specified "keyword" in product descriptions</param>+ /// <param name="searchSku">A value indicating whether to search by a specified "keyword" in product SKU</param>+ /// <param name="searchProductTags">A value indicating whether to search by a specified "keyword" in product tags</param>+ /// <param name="languageId">Language identifier (search for text searching)</param>+ /// <param name="filteredSpecs">Filtered product specification identifiers</param>+ /// <param name="specificationOptions">Specification options identifiers</param>+ /// <param name="orderBy">Order by</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <param name="overridePublished">+ /// null - process "Published" property according to "showHidden" parameter+ /// true - load only "Published" products+ /// false - load only "Unpublished" products+ /// </param>+ /// <returns>Products</returns>+ Task<(IPagedList<Product> products, IList<string> filterableSpecificationAttributeOptionIds)> SearchProducts(+ bool loadFilterableSpecificationAttributeOptionIds = false,+ int pageIndex = 0,+ int pageSize = int.MaxValue,+ IList<string> categoryIds = null,+ string brandId = "",+ string collectionId = "",+ string storeId = "",+ string vendorId = "",+ string warehouseId = "",+ ProductType? productType = null,+ bool visibleIndividuallyOnly = false,+ bool markedAsNewOnly = false,+ bool? showOnHomePage = null,+ bool? featuredProducts = null,+ double? priceMin = null,+ double? priceMax = null,+ string productTag = "",+ string keywords = null,+ bool searchDescriptions = false,+ bool searchSku = true,+ bool searchProductTags = false,+ string languageId = "",+ IList<string> filteredSpecs = null,+ IList<string> specificationOptions = null,+ ProductSortingEnum orderBy = ProductSortingEnum.Position,+ bool showHidden = false,+ bool? overridePublished = null);++ /// <summary>+ /// Gets products by product attribute+ /// </summary>+ /// <param name="productAttributeId">Product attribute identifier</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Products</returns>+ Task<IPagedList<Product>> GetProductsByProductAttributeId(string productAttributeId,+ int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Gets associated products+ /// </summary>+ /// <param name="parentGroupedProductId">Parent product identifier (used with grouped products)</param>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Products</returns>+ Task<IList<Product>> GetAssociatedProducts(string parentGroupedProductId,+ string storeId = "", string vendorId = "", bool showHidden = false);++ /// <summary>+ /// Update product associated+ /// </summary>+ /// <param name="product">Product</param>+ Task UpdateAssociatedProduct(Product product);++ /// <summary>+ /// Gets a product by SKU+ /// </summary>+ /// <param name="sku">SKU</param>+ /// <returns>Product</returns>+ Task<Product> GetProductBySku(string sku);++ #endregion++ #region Related products++ /// <summary>+ /// Inserts a related product+ /// </summary>+ /// <param name="relatedProduct">Related product</param>+ /// <param name="productId">Product ident</param>+ Task InsertRelatedProduct(RelatedProduct relatedProduct, string productId);++ /// <summary>+ /// Updates a related product+ /// </summary>+ /// <param name="relatedProduct">Related product</param>+ /// <param name="productId">Product ident</param>+ Task UpdateRelatedProduct(RelatedProduct relatedProduct, string productId);++ /// <summary>+ /// Deletes a related product+ /// </summary>+ /// <param name="relatedProduct">Related product</param>+ /// <param name="productId">Product ident</param>+ Task DeleteRelatedProduct(RelatedProduct relatedProduct, string productId);++ #endregion++ #region Similar products++ /// <summary>+ /// Inserts a similar product+ /// </summary>+ /// <param name="similarProduct">Similar product</param>+ Task InsertSimilarProduct(SimilarProduct similarProduct);++ /// <summary>+ /// Updates a similar product+ /// </summary>+ /// <param name="similarProduct">Similar product</param>+ Task UpdateSimilarProduct(SimilarProduct similarProduct);++ /// <summary>+ /// Deletes a similar product+ /// </summary>+ /// <param name="similarProduct">Similar product</param>+ Task DeleteSimilarProduct(SimilarProduct similarProduct);++ #endregion++ #region Cross-sell products++ /// <summary>+ /// Inserts a cross-sell product+ /// </summary>+ /// <param name="crossSellProduct">Cross-sell product</param>+ Task InsertCrossSellProduct(CrossSellProduct crossSellProduct);++ /// <summary>+ /// Deletes a cross-sell product+ /// </summary>+ /// <param name="crossSellProduct">Cross-sell</param>+ Task DeleteCrossSellProduct(CrossSellProduct crossSellProduct);++ /// <summary>+ /// Gets a cross-sells+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <param name="numberOfProducts">Number of products to return</param>+ /// <returns>Cross-sells</returns>+ Task<IList<Product>> GetCrossSellProductsByShoppingCart(IList<ShoppingCartItem> cart, int numberOfProducts);++ #endregion++ #region Recommmended products++ /// <summary>+ /// Insert a recommended product+ /// </summary>+ Task InsertRecommendedProduct(string productId, string recommendedProductId);++ /// <summary>+ /// Delete a recommended product+ /// </summary>+ Task DeleteRecommendedProduct(string productId, string recommendedProductId);++ #endregion++ #region Bundle products++ /// <summary>+ /// Inserts a bundle product+ /// </summary>+ /// <param name="bundleProduct">Bundle product</param>+ /// <param name="productBundleId">Product bundle ident</param>+ Task InsertBundleProduct(BundleProduct bundleProduct, string productBundleId);++ /// <summary>+ /// Updates a bundle product+ /// </summary>+ /// <param name="bundleProduct">Bundle product</param>+ /// <param name="productBundleId">Product bundle ident</param>+ Task UpdateBundleProduct(BundleProduct bundleProduct, string productBundleId);++ /// <summary>+ /// Deletes a bundle product+ /// </summary>+ /// <param name="bundleProduct">Bundle product</param>+ /// <param name="productBundleId">Product bundle ident</param>+ Task DeleteBundleProduct(BundleProduct bundleProduct, string productBundleId);++ #endregion++ #region Tier prices++ /// <summary>+ /// Inserts a tier price+ /// </summary>+ /// <param name="tierPrice">Tier price</param>+ /// <param name="productId">Product ident</param>+ Task InsertTierPrice(TierPrice tierPrice, string productId);++ /// <summary>+ /// Updates the tier price+ /// </summary>+ /// <param name="tierPrice">Tier price</param>+ /// <param name="productId">Product ident</param>+ Task UpdateTierPrice(TierPrice tierPrice, string productId);++ /// <summary>+ /// Deletes a tier price+ /// </summary>+ /// <param name="tierPrice">Tier price</param>+ /// <param name="productId">Product ident</param>+ Task DeleteTierPrice(TierPrice tierPrice, string productId);++ #endregion++ #region Product prices++ /// <summary>+ /// Inserts a product price+ /// </summary>+ /// <param name="productPrice">Product price</param>+ Task InsertProductPrice(ProductPrice productPrice);++ /// <summary>+ /// Updates the product price+ /// </summary>+ /// <param name="productPrice">Product price</param>+ Task UpdateProductPrice(ProductPrice productPrice);++ /// <summary>+ /// Deletes a product price+ /// </summary>+ /// <param name="productPrice">Product price</param>+ Task DeleteProductPrice(ProductPrice productPrice);++ #endregion++ #region Product pictures++ /// <summary>+ /// Inserts a product picture+ /// </summary>+ /// <param name="productPicture">Product picture</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductPicture(ProductPicture productPicture, string productId);++ /// <summary>+ /// Updates a product picture+ /// </summary>+ /// <param name="productPicture">Product picture</param>+ /// <param name="productId">Product ident</param>+ Task UpdateProductPicture(ProductPicture productPicture, string productId);++ /// <summary>+ /// Deletes a product picture+ /// </summary>+ /// <param name="productPicture">Product picture</param>+ /// <param name="productId">Product ident</param>+ Task DeleteProductPicture(ProductPicture productPicture, string productId);++ #endregion++ #region Product warehouse inventory++ /// <summary>+ /// Insert a ProductWarehouseInventory+ /// </summary>+ /// <param name="pwi">ProductWarehouseInventory</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);++ /// <summary>+ /// Update a ProductWarehouseInventory+ /// </summary>+ /// <param name="pwi">ProductWarehouseInventory</param>+ /// <param name="productId">Product ident</param>+ Task UpdateProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);++ /// <summary>+ /// Deletes a ProductWarehouseInventory+ /// </summary>+ /// <param name="pwi">ProductWarehouseInventory</param>+ /// <param name="productId">Product ident</param>+ Task DeleteProductWarehouseInventory(ProductWarehouseInventory pwi, string productId);++ #endregion++ #region Discounts++ Task InsertDiscount(string discountId, string productId);+ Task DeleteDiscount(string discountId, string productId);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductTagService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductTagService.csindex 9713f775b..f4f9ff096 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductTagService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IProductTagService.cs@@ -1,77 +1,75 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Product tag service interface+/// </summary>+public interface IProductTagService{/// <summary>- /// Product tag service interface+ /// Gets all product tags/// </summary>- public interface IProductTagService- {-- /// <summary>- /// Gets all product tags- /// </summary>- /// <returns>Product tags</returns>- Task<IList<ProductTag>> GetAllProductTags();+ /// <returns>Product tags</returns>+ Task<IList<ProductTag>> GetAllProductTags();- /// <summary>- /// Gets product tag- /// </summary>- /// <param name="productTagId">Product tag identifier</param>- /// <returns>Product tag</returns>- Task<ProductTag> GetProductTagById(string productTagId);+ /// <summary>+ /// Gets product tag+ /// </summary>+ /// <param name="productTagId">Product tag identifier</param>+ /// <returns>Product tag</returns>+ Task<ProductTag> GetProductTagById(string productTagId);- /// <summary>- /// Gets product tag by name- /// </summary>- /// <param name="name">Product tag name</param>- /// <returns>Product tag</returns>- Task<ProductTag> GetProductTagByName(string name);+ /// <summary>+ /// Gets product tag by name+ /// </summary>+ /// <param name="name">Product tag name</param>+ /// <returns>Product tag</returns>+ Task<ProductTag> GetProductTagByName(string name);- /// <summary>- /// Gets product tag by se-name- /// </summary>- /// <param name="sename">Product tag se-name</param>- /// <returns>Product tag</returns>- Task<ProductTag> GetProductTagBySeName(string sename);+ /// <summary>+ /// Gets product tag by se-name+ /// </summary>+ /// <param name="sename">Product tag se-name</param>+ /// <returns>Product tag</returns>+ Task<ProductTag> GetProductTagBySeName(string sename);- /// <summary>- /// Inserts a product tag- /// </summary>- /// <param name="productTag">Product tag</param>- Task InsertProductTag(ProductTag productTag);+ /// <summary>+ /// Inserts a product tag+ /// </summary>+ /// <param name="productTag">Product tag</param>+ Task InsertProductTag(ProductTag productTag);- /// <summary>- /// Update a product tag- /// </summary>- /// <param name="productTag">Product tag</param>- Task UpdateProductTag(ProductTag productTag);+ /// <summary>+ /// Update a product tag+ /// </summary>+ /// <param name="productTag">Product tag</param>+ Task UpdateProductTag(ProductTag productTag);- /// <summary>- /// Delete a product tag- /// </summary>- /// <param name="productTag">Product tag</param>- Task DeleteProductTag(ProductTag productTag);+ /// <summary>+ /// Delete a product tag+ /// </summary>+ /// <param name="productTag">Product tag</param>+ Task DeleteProductTag(ProductTag productTag);- /// <summary>- /// Assign a tag to the product- /// </summary>- /// <param name="productTag">Product Tag</param>- /// <param name="productId">Product ident</param>- Task AttachProductTag(ProductTag productTag, string productId);+ /// <summary>+ /// Assign a tag to the product+ /// </summary>+ /// <param name="productTag">Product Tag</param>+ /// <param name="productId">Product ident</param>+ Task AttachProductTag(ProductTag productTag, string productId);- /// <summary>- /// Detach a tag from the product- /// </summary>- /// <param name="productTag">Product Tag</param>- /// <param name="productId">Product ident</param>- Task DetachProductTag(ProductTag productTag, string productId);+ /// <summary>+ /// Detach a tag from the product+ /// </summary>+ /// <param name="productTag">Product Tag</param>+ /// <param name="productId">Product ident</param>+ Task DetachProductTag(ProductTag productTag, string productId);- /// <summary>- /// Get number of products- /// </summary>- /// <param name="productTagId">Product tag identifier</param>- /// <returns>Number of products</returns>- Task<int> GetProductCount(string productTagId);- }-}+ /// <summary>+ /// Get number of products+ /// </summary>+ /// <param name="productTagId">Product tag identifier</param>+ /// <returns>Number of products</returns>+ Task<int> GetProductCount(string productTagId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IRecentlyViewedProductsService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IRecentlyViewedProductsService.csindex 0263d1b8e..7510508cc 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IRecentlyViewedProductsService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IRecentlyViewedProductsService.cs@@ -1,25 +1,24 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Recently viewed products service+/// </summary>+public interface IRecentlyViewedProductsService{/// <summary>- /// Recently viewed products service+ /// Gets a "recently viewed products" list/// </summary>- public interface IRecentlyViewedProductsService- {- /// <summary>- /// Gets a "recently viewed products" list- /// </summary>- /// <param name="customerId">Customer ident</param>- /// <param name="number">Number of products to load</param>- /// <returns>"recently viewed products" list</returns>- Task<IList<Product>> GetRecentlyViewedProducts(string customerId, int number);+ /// <param name="customerId">Customer ident</param>+ /// <param name="number">Number of products to load</param>+ /// <returns>"recently viewed products" list</returns>+ Task<IList<Product>> GetRecentlyViewedProducts(string customerId, int number);- /// <summary>- /// Adds a product to a recently viewed products list- /// </summary>- /// <param name="customerId">Customer ident</param>- /// <param name="productId">Product identifier</param>- Task AddProductToRecentlyViewedList(string customerId, string productId);- }-}+ /// <summary>+ /// Adds a product to a recently viewed products list+ /// </summary>+ /// <param name="customerId">Customer ident</param>+ /// <param name="productId">Product identifier</param>+ Task AddProductToRecentlyViewedList(string customerId, string productId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ISpecificationAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ISpecificationAttributeService.csindex 8cd71684b..a7b43632e 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ISpecificationAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/ISpecificationAttributeService.cs@@ -1,105 +1,107 @@using Grand.Domain;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++/// <summary>+/// Specification attribute service interface+/// </summary>+public interface ISpecificationAttributeService{+ #region Specification attribute++ /// <summary>+ /// Gets a specification attribute+ /// </summary>+ /// <param name="specificationAttributeId">The specification attribute identifier</param>+ /// <returns>Specification attribute</returns>+ Task<SpecificationAttribute> GetSpecificationAttributeById(string specificationAttributeId);++ /// <summary>+ /// Gets a specification attribute by se-name+ /// </summary>+ /// <param name="sename">Se-name</param>+ /// <returns>Specification attribute</returns>+ Task<SpecificationAttribute> GetSpecificationAttributeBySeName(string sename);++ /// <summary>+ /// Gets specification attributes+ /// </summary>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Specification attributes</returns>+ Task<IPagedList<SpecificationAttribute>> GetSpecificationAttributes(int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Inserts a specification attribute+ /// </summary>+ /// <param name="specificationAttribute">The specification attribute</param>+ Task InsertSpecificationAttribute(SpecificationAttribute specificationAttribute);++ /// <summary>+ /// Updates the specification attribute+ /// </summary>+ /// <param name="specificationAttribute">The specification attribute</param>+ Task UpdateSpecificationAttribute(SpecificationAttribute specificationAttribute);++ /// <summary>+ /// Deletes a specification attribute+ /// </summary>+ /// <param name="specificationAttribute">The specification attribute</param>+ Task DeleteSpecificationAttribute(SpecificationAttribute specificationAttribute);++ #endregion++ #region Specification attribute option++ /// <summary>+ /// Gets a specification attribute option+ /// </summary>+ /// <param name="specificationAttributeOption">The specification attribute option</param>+ /// <returns>Specification attribute option</returns>+ Task<SpecificationAttribute> GetSpecificationAttributeByOptionId(string specificationAttributeOption);++ /// <summary>+ /// Deletes a specification attribute option+ /// </summary>+ /// <param name="specificationAttributeOption">The specification attribute option</param>+ Task DeleteSpecificationAttributeOption(SpecificationAttributeOption specificationAttributeOption);++ #endregion++ #region Product specification attribute+/// <summary>- /// Specification attribute service interface+ /// Inserts a product specification attribute mapping/// </summary>- public interface ISpecificationAttributeService- {- #region Specification attribute-- /// <summary>- /// Gets a specification attribute- /// </summary>- /// <param name="specificationAttributeId">The specification attribute identifier</param>- /// <returns>Specification attribute</returns>- Task<SpecificationAttribute> GetSpecificationAttributeById(string specificationAttributeId);-- /// <summary>- /// Gets a specification attribute by se-name- /// </summary>- /// <param name="sename">Se-name</param>- /// <returns>Specification attribute</returns>- Task<SpecificationAttribute> GetSpecificationAttributeBySeName(string sename);-- /// <summary>- /// Gets specification attributes- /// </summary>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Specification attributes</returns>- Task<IPagedList<SpecificationAttribute>> GetSpecificationAttributes(int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Inserts a specification attribute- /// </summary>- /// <param name="specificationAttribute">The specification attribute</param>- Task InsertSpecificationAttribute(SpecificationAttribute specificationAttribute);-- /// <summary>- /// Updates the specification attribute- /// </summary>- /// <param name="specificationAttribute">The specification attribute</param>- Task UpdateSpecificationAttribute(SpecificationAttribute specificationAttribute);-- /// <summary>- /// Deletes a specification attribute- /// </summary>- /// <param name="specificationAttribute">The specification attribute</param>- Task DeleteSpecificationAttribute(SpecificationAttribute specificationAttribute);-- #endregion-- #region Specification attribute option-- /// <summary>- /// Gets a specification attribute option- /// </summary>- /// <param name="specificationAttributeOption">The specification attribute option</param>- /// <returns>Specification attribute option</returns>- Task<SpecificationAttribute> GetSpecificationAttributeByOptionId(string specificationAttributeOption);-- /// <summary>- /// Deletes a specification attribute option- /// </summary>- /// <param name="specificationAttributeOption">The specification attribute option</param>- Task DeleteSpecificationAttributeOption(SpecificationAttributeOption specificationAttributeOption);-- #endregion-- #region Product specification attribute-- /// <summary>- /// Inserts a product specification attribute mapping- /// </summary>- /// <param name="productSpecificationAttribute">Product specification attribute mapping</param>- /// <param name="productId">Product ident</param>- Task InsertProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute, string productId);-- /// <summary>- /// Updates the product specification attribute mapping- /// </summary>- /// <param name="productSpecificationAttribute">Product specification attribute mapping</param>- /// <param name="productId">Product ident</param>- Task UpdateProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute, string productId);-- /// <summary>- /// Deletes a product specification attribute mapping- /// </summary>- /// <param name="productSpecificationAttribute">Product specification attribute</param>- /// <param name="productId">Product ident</param>- Task DeleteProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute, string productId);-- /// <summary>- /// Gets a count of product specification attribute mapping records- /// </summary>- /// <param name="productId">Product identifier; "" to load all records</param>- /// <param name="specificationAttributeOptionId">The specification attribute option identifier; "" to load all records</param>- /// <returns>Count</returns>- int GetProductSpecificationAttributeCount(string productId = "", string specificationAttributeOptionId = "");-- #endregion- }-}+ /// <param name="productSpecificationAttribute">Product specification attribute mapping</param>+ /// <param name="productId">Product ident</param>+ Task InsertProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute,+ string productId);++ /// <summary>+ /// Updates the product specification attribute mapping+ /// </summary>+ /// <param name="productSpecificationAttribute">Product specification attribute mapping</param>+ /// <param name="productId">Product ident</param>+ Task UpdateProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute,+ string productId);++ /// <summary>+ /// Deletes a product specification attribute mapping+ /// </summary>+ /// <param name="productSpecificationAttribute">Product specification attribute</param>+ /// <param name="productId">Product ident</param>+ Task DeleteProductSpecificationAttribute(ProductSpecificationAttribute productSpecificationAttribute,+ string productId);++ /// <summary>+ /// Gets a count of product specification attribute mapping records+ /// </summary>+ /// <param name="productId">Product identifier; "" to load all records</param>+ /// <param name="specificationAttributeOptionId">The specification attribute option identifier; "" to load all records</param>+ /// <returns>Count</returns>+ int GetProductSpecificationAttributeCount(string productId = "", string specificationAttributeOptionId = "");++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IStockQuantityService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IStockQuantityService.csindex bf5266491..2f8096f42 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IStockQuantityService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Products/IStockQuantityService.cs@@ -2,17 +2,17 @@using Grand.Domain.Catalog;using Grand.Domain.Common;-namespace Grand.Business.Core.Interfaces.Catalog.Products+namespace Grand.Business.Core.Interfaces.Catalog.Products;++public interface IStockQuantityService{- public interface IStockQuantityService- {- int GetTotalStockQuantity(Product product,- bool useReservedQuantity = true,- string warehouseId = "", bool total = false);+ int GetTotalStockQuantity(Product product,+ bool useReservedQuantity = true,+ string warehouseId = "", bool total = false);- int GetTotalStockQuantityForCombination(Product product, ProductAttributeCombination combination,- bool useReservedQuantity = true, string warehouseId = "");+ int GetTotalStockQuantityForCombination(Product product, ProductAttributeCombination combination,+ bool useReservedQuantity = true, string warehouseId = "");- (string resource, object? arg0) FormatStockMessage(Product product, string warehouseId, IList<CustomAttribute> attributes);- }-}+ (string resource, object? arg0) FormatStockMessage(Product product, string warehouseId,+ IList<CustomAttribute> attributes);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxCategoryService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxCategoryService.csindex 6a9d4b2da..a8b1c5adf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxCategoryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxCategoryService.cs@@ -1,42 +1,40 @@using Grand.Domain.Tax;-namespace Grand.Business.Core.Interfaces.Catalog.Tax+namespace Grand.Business.Core.Interfaces.Catalog.Tax;++/// <summary>+/// Tax category service interface+/// </summary>+public interface ITaxCategoryService{/// <summary>- /// Tax category service interface+ /// Gets all tax categories/// </summary>- public interface ITaxCategoryService- {-- /// <summary>- /// Gets all tax categories- /// </summary>- /// <returns>Tax categories</returns>- Task<IList<TaxCategory>> GetAllTaxCategories();+ /// <returns>Tax categories</returns>+ Task<IList<TaxCategory>> GetAllTaxCategories();- /// <summary>- /// Gets a tax category- /// </summary>- /// <param name="taxCategoryId">Tax category identifier</param>- /// <returns>Tax category</returns>- Task<TaxCategory> GetTaxCategoryById(string taxCategoryId);+ /// <summary>+ /// Gets a tax category+ /// </summary>+ /// <param name="taxCategoryId">Tax category identifier</param>+ /// <returns>Tax category</returns>+ Task<TaxCategory> GetTaxCategoryById(string taxCategoryId);- /// <summary>- /// Inserts a tax category- /// </summary>- /// <param name="taxCategory">Tax category</param>- Task InsertTaxCategory(TaxCategory taxCategory);+ /// <summary>+ /// Inserts a tax category+ /// </summary>+ /// <param name="taxCategory">Tax category</param>+ Task InsertTaxCategory(TaxCategory taxCategory);- /// <summary>- /// Updates the tax category- /// </summary>- /// <param name="taxCategory">Tax category</param>- Task UpdateTaxCategory(TaxCategory taxCategory);- /// <summary>- /// Deletes a tax category- /// </summary>- /// <param name="taxCategory">Tax category</param>- Task DeleteTaxCategory(TaxCategory taxCategory);+ /// <summary>+ /// Updates the tax category+ /// </summary>+ /// <param name="taxCategory">Tax category</param>+ Task UpdateTaxCategory(TaxCategory taxCategory);- }-}+ /// <summary>+ /// Deletes a tax category+ /// </summary>+ /// <param name="taxCategory">Tax category</param>+ Task DeleteTaxCategory(TaxCategory taxCategory);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxProvider.csindex 3d51be814..1fd5bdb9e 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxProvider.cs@@ -1,19 +1,17 @@using Grand.Business.Core.Utilities.Catalog;using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Catalog.Tax+namespace Grand.Business.Core.Interfaces.Catalog.Tax;++/// <summary>+/// Provides an interface for creating tax providers+/// </summary>+public interface ITaxProvider : IProvider{/// <summary>- /// Provides an interface for creating tax providers+ /// Gets tax rate/// </summary>- public interface ITaxProvider : IProvider- {- /// <summary>- /// Gets tax rate- /// </summary>- /// <param name="calculateTaxRequest">Tax calculation request</param>- /// <returns>Tax</returns>- Task<TaxResult> GetTaxRate(TaxRequest calculateTaxRequest);-- }-}+ /// <param name="calculateTaxRequest">Tax calculation request</param>+ /// <returns>Tax</returns>+ Task<TaxResult> GetTaxRate(TaxRequest calculateTaxRequest);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxService.csindex 041572ebe..d1e33db6c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/ITaxService.cs@@ -4,173 +4,178 @@ using Grand.Domain.Common;using Grand.Domain.Customers;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Catalog.Tax+namespace Grand.Business.Core.Interfaces.Catalog.Tax;++/// <summary>+/// Tax service+/// </summary>+public interface ITaxService{/// <summary>- /// Tax service- /// </summary>- public interface ITaxService- {- /// <summary>- /// Load active tax provider- /// </summary>- /// <returns>Active tax provider</returns>- ITaxProvider LoadActiveTaxProvider();-- /// <summary>- /// Load tax provider by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found tax provider</returns>- ITaxProvider LoadTaxProviderBySystemName(string systemName);-- /// <summary>- /// Load all tax providers- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="storeId">Store ident</param>- /// <returns>Tax providers</returns>- IList<ITaxProvider> LoadAllTaxProviders(Customer customer = null, string storeId = "");--- /// <summary>- /// Gets price- /// </summary>- /// <param name="product">Product</param>- /// <param name="price">Price</param>- /// <returns>Price</returns>- Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price);-- /// <summary>- /// Gets price- /// </summary>- /// <param name="product">Product</param>- /// <param name="price">Price</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, Customer customer);-- /// <summary>- /// Gets price- /// </summary>- /// <param name="product">Product</param>- /// <param name="price">Price</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, bool includingTax, Customer customer);-- /// <summary>- /// Gets price- /// </summary>- /// <param name="product">Product</param>- /// <param name="taxCategoryId">Tax category identifier</param>- /// <param name="price">Price</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <param name="customer">Customer</param>- /// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>- /// <returns>Price</returns>- Task<(double productprice, double taxRate)> GetProductPrice(Product product, string taxCategoryId, double price, bool includingTax, Customer customer, bool priceIncludesTax);--- /// <summary>- /// Gets price- /// </summary>- /// <param name="product">Product</param>- /// <param name="customer">Customer</param>- /// <param name="unitPrice">Unit Price</param>- /// <param name="unitPriceWithoutDisc">Unit price without discount</param>- /// <param name="quantity">Quantity</param>- /// <param name="subTotal">Sub-Total</param>- /// <param name="discountAmount">Discount amount</param>- /// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>- /// <returns>TaxProductPrice</returns>- Task<TaxProductPrice> GetTaxProductPrice(- Product product,- Customer customer,- double unitPrice,- double unitPriceWithoutDisc,- int quantity,- double subTotal,- double discountAmount,- bool priceIncludesTax- );-- /// <summary>- /// Gets shipping price- /// </summary>- /// <param name="price">Price</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, Customer customer);-- /// <summary>- /// Gets shipping price- /// </summary>- /// <param name="price">Price</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, bool includingTax, Customer customer);-- /// <summary>- /// Gets payment method additional handling fee- /// </summary>- /// <param name="price">Price</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, Customer customer);-- /// <summary>- /// Gets payment method additional handling fee- /// </summary>- /// <param name="price">Price</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, bool includingTax, Customer customer);-- /// <summary>- /// Gets checkout attribute value price- /// </summary>- /// <param name="ca">Checkout attribute</param>- /// <param name="cav">Checkout attribute value</param>- /// <returns>Price</returns>- Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav);-- /// <summary>- /// Gets checkout attribute value price- /// </summary>- /// <param name="ca">Checkout attribute</param>- /// <param name="cav">Checkout attribute value</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, Customer customer);-- /// <summary>- /// Gets checkout attribute value price- /// </summary>- /// <param name="ca">Checkout attribute</param>- /// <param name="cav">Checkout attribute value</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <param name="customer">Customer</param>- /// <returns>Price</returns>- Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, bool includingTax, Customer customer);-- /// <summary>- /// Gets a value indicating whether a product is tax exempt- /// </summary>- /// <param name="product">Product</param>- /// <param name="customer">Customer</param>- /// <returns>A value indicating whether a product is tax exempt</returns>- Task<bool> IsTaxExempt(Product product, Customer customer);-- /// <summary>- /// Gets a value indicating whether EU VAT exempt (the European Union Value Added Tax)- /// </summary>- /// <param name="address">Address</param>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsVatExempt(Address address, Customer customer);- }-}+ /// Load active tax provider+ /// </summary>+ /// <returns>Active tax provider</returns>+ ITaxProvider LoadActiveTaxProvider();++ /// <summary>+ /// Load tax provider by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found tax provider</returns>+ ITaxProvider LoadTaxProviderBySystemName(string systemName);++ /// <summary>+ /// Load all tax providers+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="storeId">Store ident</param>+ /// <returns>Tax providers</returns>+ IList<ITaxProvider> LoadAllTaxProviders(Customer customer = null, string storeId = "");+++ /// <summary>+ /// Gets price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="price">Price</param>+ /// <returns>Price</returns>+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price);++ /// <summary>+ /// Gets price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="price">Price</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, Customer customer);++ /// <summary>+ /// Gets price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="price">Price</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, bool includingTax,+ Customer customer);++ /// <summary>+ /// Gets price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="taxCategoryId">Tax category identifier</param>+ /// <param name="price">Price</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <param name="customer">Customer</param>+ /// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>+ /// <returns>Price</returns>+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, string taxCategoryId, double price,+ bool includingTax, Customer customer, bool priceIncludesTax);+++ /// <summary>+ /// Gets price+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="customer">Customer</param>+ /// <param name="unitPrice">Unit Price</param>+ /// <param name="unitPriceWithoutDisc">Unit price without discount</param>+ /// <param name="quantity">Quantity</param>+ /// <param name="subTotal">Sub-Total</param>+ /// <param name="discountAmount">Discount amount</param>+ /// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>+ /// <returns>TaxProductPrice</returns>+ Task<TaxProductPrice> GetTaxProductPrice(+ Product product,+ Customer customer,+ double unitPrice,+ double unitPriceWithoutDisc,+ int quantity,+ double subTotal,+ double discountAmount,+ bool priceIncludesTax+ );++ /// <summary>+ /// Gets shipping price+ /// </summary>+ /// <param name="price">Price</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, Customer customer);++ /// <summary>+ /// Gets shipping price+ /// </summary>+ /// <param name="price">Price</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, bool includingTax, Customer customer);++ /// <summary>+ /// Gets payment method additional handling fee+ /// </summary>+ /// <param name="price">Price</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, Customer customer);++ /// <summary>+ /// Gets payment method additional handling fee+ /// </summary>+ /// <param name="price">Price</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, bool includingTax,+ Customer customer);++ /// <summary>+ /// Gets checkout attribute value price+ /// </summary>+ /// <param name="ca">Checkout attribute</param>+ /// <param name="cav">Checkout attribute value</param>+ /// <returns>Price</returns>+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca,+ CheckoutAttributeValue cav);++ /// <summary>+ /// Gets checkout attribute value price+ /// </summary>+ /// <param name="ca">Checkout attribute</param>+ /// <param name="cav">Checkout attribute value</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca,+ CheckoutAttributeValue cav, Customer customer);++ /// <summary>+ /// Gets checkout attribute value price+ /// </summary>+ /// <param name="ca">Checkout attribute</param>+ /// <param name="cav">Checkout attribute value</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <param name="customer">Customer</param>+ /// <returns>Price</returns>+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca,+ CheckoutAttributeValue cav, bool includingTax, Customer customer);++ /// <summary>+ /// Gets a value indicating whether a product is tax exempt+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="customer">Customer</param>+ /// <returns>A value indicating whether a product is tax exempt</returns>+ Task<bool> IsTaxExempt(Product product, Customer customer);++ /// <summary>+ /// Gets a value indicating whether EU VAT exempt (the European Union Value Added Tax)+ /// </summary>+ /// <param name="address">Address</param>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsVatExempt(Address address, Customer customer);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/IVatService.cs b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/IVatService.csindex 0a9d51dac..b3f39eb79 100644--- a/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/IVatService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Catalog/Tax/IVatService.cs@@ -1,39 +1,41 @@using Grand.Business.Core.Utilities.Catalog;using Grand.Domain.Tax;-namespace Grand.Business.Core.Interfaces.Catalog.Tax+namespace Grand.Business.Core.Interfaces.Catalog.Tax;++public interface IVatService{- public interface IVatService- {- /// <summary>- /// Gets VAT Number status- /// </summary>- /// <param name="fullVatNumber">Two letter ISO code of a country and VAT number (e.g. GB 111 1111 111)</param>- /// <returns>VAT Number status</returns>- Task<(VatNumberStatus status, string name, string address, Exception exception)> GetVatNumberStatus(string fullVatNumber);+ /// <summary>+ /// Gets VAT Number status+ /// </summary>+ /// <param name="fullVatNumber">Two letter ISO code of a country and VAT number (e.g. GB 111 1111 111)</param>+ /// <returns>VAT Number status</returns>+ Task<(VatNumberStatus status, string name, string address, Exception exception)> GetVatNumberStatus(+ string fullVatNumber);- /// <summary>- /// Gets VAT Number status- /// </summary>- /// <param name="twoLetterIsoCode">Two letter ISO code of a country</param>- /// <param name="vatNumber">VAT number</param>- /// <returns>VAT Number status</returns>- Task<(VatNumberStatus status, string name, string address, Exception exception)> GetVatNumberStatus(string twoLetterIsoCode, string vatNumber);+ /// <summary>+ /// Gets VAT Number status+ /// </summary>+ /// <param name="twoLetterIsoCode">Two letter ISO code of a country</param>+ /// <param name="vatNumber">VAT number</param>+ /// <returns>VAT Number status</returns>+ Task<(VatNumberStatus status, string name, string address, Exception exception)> GetVatNumberStatus(+ string twoLetterIsoCode, string vatNumber);- /// <summary>- /// Performs a basic check of a VAT number for validity- /// </summary>- /// <param name="twoLetterIsoCode">Two letter ISO code of a country</param>- /// <param name="vatNumber">VAT number</param>- /// <returns>VAT number status</returns>- Task<(VatNumberStatus status, string name, string address, Exception exception)> DoVatCheck(string twoLetterIsoCode, string vatNumber);+ /// <summary>+ /// Performs a basic check of a VAT number for validity+ /// </summary>+ /// <param name="twoLetterIsoCode">Two letter ISO code of a country</param>+ /// <param name="vatNumber">VAT number</param>+ /// <returns>VAT number status</returns>+ Task<(VatNumberStatus status, string name, string address, Exception exception)> DoVatCheck(string twoLetterIsoCode,+ string vatNumber);- /// <summary>- /// Check Vat request- /// </summary>- /// <param name="checkVatRequest"></param>- /// <returns>CheckVatResponse</returns>- Task<VatResponse> CheckVatRequest(VatRequest checkVatRequest);- }-}+ /// <summary>+ /// Check Vat request+ /// </summary>+ /// <param name="checkVatRequest"></param>+ /// <returns>CheckVatResponse</returns>+ Task<VatResponse> CheckVatRequest(VatRequest checkVatRequest);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeFormatter.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeFormatter.csindex 098bfa9bd..d25bb9ec1 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeFormatter.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeFormatter.cs@@ -1,28 +1,27 @@using Grand.Domain.Common;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes+namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes;++/// <summary>+/// Checkout attribute helper+/// </summary>+public interface ICheckoutAttributeFormatter{/// <summary>- /// Checkout attribute helper+ /// Formats attributes/// </summary>- public interface ICheckoutAttributeFormatter- {- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="customer">Customer</param>- /// <param name="separator">Separator</param>- /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>- /// <param name="renderPrices">A value indicating whether to render prices</param>- /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(IList<CustomAttribute> customAttributes,- Customer customer,- string separator = "<br />",- bool htmlEncode = true,- bool renderPrices = true,- bool allowHyperlinks = true);- }-}+ /// <param name="customAttributes">Attributes</param>+ /// <param name="customer">Customer</param>+ /// <param name="separator">Separator</param>+ /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>+ /// <param name="renderPrices">A value indicating whether to render prices</param>+ /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(IList<CustomAttribute> customAttributes,+ Customer customer,+ string separator = "<br />",+ bool htmlEncode = true,+ bool renderPrices = true,+ bool allowHyperlinks = true);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeParser.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeParser.csindex 7ee874c7b..7e66cf76f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeParser.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeParser.cs@@ -1,65 +1,68 @@using Grand.Domain.Common;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes+namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes;++/// <summary>+/// Checkout attribute parser interface+/// </summary>+public interface ICheckoutAttributeParser{/// <summary>- /// Checkout attribute parser interface+ /// Gets selected checkout attributes/// </summary>- public interface ICheckoutAttributeParser- {- /// <summary>- /// Gets selected checkout attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Selected checkout attributes</returns>- Task<IList<CheckoutAttribute>> ParseCheckoutAttributes(IList<CustomAttribute> customAttributes);+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Selected checkout attributes</returns>+ Task<IList<CheckoutAttribute>> ParseCheckoutAttributes(IList<CustomAttribute> customAttributes);- /// <summary>- /// Get checkout attribute values- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Checkout attribute values</returns>- Task<IList<CheckoutAttributeValue>> ParseCheckoutAttributeValues(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Get checkout attribute values+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Checkout attribute values</returns>+ Task<IList<CheckoutAttributeValue>> ParseCheckoutAttributeValues(IList<CustomAttribute> customAttributes);- /// <summary>- /// Get checkout attribute values with checkout attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Checkout attribute values with checkout attribute </returns>- Task<IList<(CheckoutAttribute ca, CheckoutAttributeValue cav)>> ParseCheckoutAttributeValue(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Get checkout attribute values with checkout attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Checkout attribute values with checkout attribute </returns>+ Task<IList<(CheckoutAttribute ca, CheckoutAttributeValue cav)>> ParseCheckoutAttributeValue(+ IList<CustomAttribute> customAttributes);- /// <summary>- /// Adds an attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="ca">Checkout attribute</param>- /// <param name="value">Value</param>- /// <returns>Attributes</returns>- IList<CustomAttribute> AddCheckoutAttribute(IList<CustomAttribute> customAttributes, CheckoutAttribute ca, string value);+ /// <summary>+ /// Adds an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="ca">Checkout attribute</param>+ /// <param name="value">Value</param>+ /// <returns>Attributes</returns>+ IList<CustomAttribute> AddCheckoutAttribute(IList<CustomAttribute> customAttributes, CheckoutAttribute ca,+ string value);- /// <summary>- /// Removes checkout attributes which cannot be applied to the current cart and returns an update attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="cart">Shopping cart items</param>- /// <returns>Updated attributes</returns>- Task<IList<CustomAttribute>> EnsureOnlyActiveAttributes(IList<CustomAttribute> customAttributes, IList<ShoppingCartItem> cart);+ /// <summary>+ /// Removes checkout attributes which cannot be applied to the current cart and returns an update attributes+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="cart">Shopping cart items</param>+ /// <returns>Updated attributes</returns>+ Task<IList<CustomAttribute>> EnsureOnlyActiveAttributes(IList<CustomAttribute> customAttributes,+ IList<ShoppingCartItem> cart);- /// <summary>- /// Check whether condition of some attribute is met (if specified). Return "null" if not condition is specified- /// </summary>- /// <param name="attribute">Checkout attribute</param>- /// <param name="customAttributes">Selected attributes</param>- /// <returns>Result</returns>- Task<bool?> IsConditionMet(CheckoutAttribute attribute, IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Check whether condition of some attribute is met (if specified). Return "null" if not condition is specified+ /// </summary>+ /// <param name="attribute">Checkout attribute</param>+ /// <param name="customAttributes">Selected attributes</param>+ /// <returns>Result</returns>+ Task<bool?> IsConditionMet(CheckoutAttribute attribute, IList<CustomAttribute> customAttributes);- /// <summary>- /// Remove an attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="attribute">Checkout attribute</param>- /// <returns>Updated result</returns>- IList<CustomAttribute> RemoveCheckoutAttribute(IList<CustomAttribute> customAttributes, CheckoutAttribute attribute);- }-}+ /// <summary>+ /// Remove an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="attribute">Checkout attribute</param>+ /// <returns>Updated result</returns>+ IList<CustomAttribute>+ RemoveCheckoutAttribute(IList<CustomAttribute> customAttributes, CheckoutAttribute attribute);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeService.csindex 732c52a5b..a6897ba1a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/CheckoutAttributes/ICheckoutAttributeService.cs@@ -1,48 +1,48 @@using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes+namespace Grand.Business.Core.Interfaces.Checkout.CheckoutAttributes;++/// <summary>+/// Checkout attribute service+/// </summary>+public interface ICheckoutAttributeService{+ #region Checkout attributes++ /// <summary>+ /// Gets all checkout attributes+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="excludeShippableAttributes">A value indicating whether we should exclude shippable attributes</param>+ /// <param name="ignoreAcl"></param>+ /// <returns>Checkout attributes</returns>+ Task<IList<CheckoutAttribute>> GetAllCheckoutAttributes(string storeId = "",+ bool excludeShippableAttributes = false, bool ignoreAcl = false);++ /// <summary>+ /// Gets a checkout attribute+ /// </summary>+ /// <param name="checkoutAttributeId">Checkout attribute identifier</param>+ /// <returns>Checkout attribute</returns>+ Task<CheckoutAttribute> GetCheckoutAttributeById(string checkoutAttributeId);+/// <summary>- /// Checkout attribute service+ /// Inserts a checkout attribute/// </summary>- public interface ICheckoutAttributeService- {- #region Checkout attributes-- /// <summary>- /// Gets all checkout attributes- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="excludeShippableAttributes">A value indicating whether we should exclude shippable attributes</param>- /// <param name="ignoreAcl"></param>- /// <returns>Checkout attributes</returns>- Task<IList<CheckoutAttribute>> GetAllCheckoutAttributes(string storeId = "", bool excludeShippableAttributes = false, bool ignoreAcl = false);-- /// <summary>- /// Gets a checkout attribute- /// </summary>- /// <param name="checkoutAttributeId">Checkout attribute identifier</param>- /// <returns>Checkout attribute</returns>- Task<CheckoutAttribute> GetCheckoutAttributeById(string checkoutAttributeId);-- /// <summary>- /// Inserts a checkout attribute- /// </summary>- /// <param name="checkoutAttribute">Checkout attribute</param>- Task InsertCheckoutAttribute(CheckoutAttribute checkoutAttribute);-- /// <summary>- /// Updates the checkout attribute- /// </summary>- /// <param name="checkoutAttribute">Checkout attribute</param>- Task UpdateCheckoutAttribute(CheckoutAttribute checkoutAttribute);-- /// <summary>- /// Deletes a checkout attribute- /// </summary>- /// <param name="checkoutAttribute">Checkout attribute</param>- Task DeleteCheckoutAttribute(CheckoutAttribute checkoutAttribute);-- #endregion- }-}+ /// <param name="checkoutAttribute">Checkout attribute</param>+ Task InsertCheckoutAttribute(CheckoutAttribute checkoutAttribute);++ /// <summary>+ /// Updates the checkout attribute+ /// </summary>+ /// <param name="checkoutAttribute">Checkout attribute</param>+ Task UpdateCheckoutAttribute(CheckoutAttribute checkoutAttribute);++ /// <summary>+ /// Deletes a checkout attribute+ /// </summary>+ /// <param name="checkoutAttribute">Checkout attribute</param>+ Task DeleteCheckoutAttribute(CheckoutAttribute checkoutAttribute);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/GiftVouchers/IGiftVoucherService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/GiftVouchers/IGiftVoucherService.csindex c74842df6..0d675e239 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/GiftVouchers/IGiftVoucherService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/GiftVouchers/IGiftVoucherService.cs@@ -1,74 +1,72 @@using Grand.Domain;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.GiftVouchers+namespace Grand.Business.Core.Interfaces.Checkout.GiftVouchers;++/// <summary>+/// Gift voucher service interface+/// </summary>+public interface IGiftVoucherService{/// <summary>- /// Gift voucher service interface+ /// Gets a gift voucher/// </summary>- public interface IGiftVoucherService- {-- /// <summary>- /// Gets a gift voucher- /// </summary>- /// <param name="giftVoucherId">Gift voucher identifier</param>- /// <returns>Gift voucher entry</returns>- Task<GiftVoucher> GetGiftVoucherById(string giftVoucherId);+ /// <param name="giftVoucherId">Gift voucher identifier</param>+ /// <returns>Gift voucher entry</returns>+ Task<GiftVoucher> GetGiftVoucherById(string giftVoucherId);- /// <summary>- /// Gets all gift vouchers- /// </summary>- /// <param name="purchasedWithOrderItemId">Associated order ID; null to load all records</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="isGiftVoucherActivated">Value indicating whether gift voucher is activated; null to load all records</param>- /// <param name="giftVoucherCouponCode">Gift voucher coupon code; null to load all records</param>- /// <param name="recipientName">Recipient name; null to load all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Gift vouchers</returns>- Task<IPagedList<GiftVoucher>> GetAllGiftVouchers(string purchasedWithOrderItemId = "",- DateTime? createdFromUtc = null, DateTime? createdToUtc = null,- bool? isGiftVoucherActivated = null, string giftVoucherCouponCode = null,- string recipientName = null,- int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets all gift vouchers+ /// </summary>+ /// <param name="purchasedWithOrderItemId">Associated order ID; null to load all records</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="isGiftVoucherActivated">Value indicating whether gift voucher is activated; null to load all records</param>+ /// <param name="giftVoucherCouponCode">Gift voucher coupon code; null to load all records</param>+ /// <param name="recipientName">Recipient name; null to load all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Gift vouchers</returns>+ Task<IPagedList<GiftVoucher>> GetAllGiftVouchers(string purchasedWithOrderItemId = "",+ DateTime? createdFromUtc = null, DateTime? createdToUtc = null,+ bool? isGiftVoucherActivated = null, string giftVoucherCouponCode = null,+ string recipientName = null,+ int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Gets all gift vouchers usage history for orderId- /// </summary>- Task<IList<GiftVoucherUsageHistory>> GetAllGiftVoucherUsageHistory(string orderId = "");+ /// <summary>+ /// Gets all gift vouchers usage history for orderId+ /// </summary>+ Task<IList<GiftVoucherUsageHistory>> GetAllGiftVoucherUsageHistory(string orderId = "");- /// <summary>- /// Inserts a gift voucher- /// </summary>- /// <param name="giftVoucher">Gift voucher</param>- Task InsertGiftVoucher(GiftVoucher giftVoucher);+ /// <summary>+ /// Inserts a gift voucher+ /// </summary>+ /// <param name="giftVoucher">Gift voucher</param>+ Task InsertGiftVoucher(GiftVoucher giftVoucher);- /// <summary>- /// Updates the gift voucher- /// </summary>- /// <param name="giftVoucher">Gift voucher</param>- Task UpdateGiftVoucher(GiftVoucher giftVoucher);+ /// <summary>+ /// Updates the gift voucher+ /// </summary>+ /// <param name="giftVoucher">Gift voucher</param>+ Task UpdateGiftVoucher(GiftVoucher giftVoucher);- /// <summary>- /// Deletes a gift voucher- /// </summary>- /// <param name="giftVoucher">Gift voucher</param>- Task DeleteGiftVoucher(GiftVoucher giftVoucher);+ /// <summary>+ /// Deletes a gift voucher+ /// </summary>+ /// <param name="giftVoucher">Gift voucher</param>+ Task DeleteGiftVoucher(GiftVoucher giftVoucher);- /// <summary>- /// Gets gift vouchers by 'PurchasedWithOrderItemId'- /// </summary>- /// <param name="purchasedWithOrderItemId">Purchased with order item identifier</param>- /// <returns>Gift voucher entries</returns>- Task<IList<GiftVoucher>> GetGiftVouchersByPurchasedWithOrderItemId(string purchasedWithOrderItemId);+ /// <summary>+ /// Gets gift vouchers by 'PurchasedWithOrderItemId'+ /// </summary>+ /// <param name="purchasedWithOrderItemId">Purchased with order item identifier</param>+ /// <returns>Gift voucher entries</returns>+ Task<IList<GiftVoucher>> GetGiftVouchersByPurchasedWithOrderItemId(string purchasedWithOrderItemId);- /// <summary>- /// Generate new gift voucher code- /// </summary>- /// <returns>Result</returns>- string GenerateGiftVoucherCode();- }-}+ /// <summary>+ /// Generate new gift voucher code+ /// </summary>+ /// <returns>Result</returns>+ string GenerateGiftVoucherCode();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/ILoyaltyPointsService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/ILoyaltyPointsService.csindex 6ccd9db9f..14375badf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/ILoyaltyPointsService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/ILoyaltyPointsService.cs@@ -1,41 +1,40 @@using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// LoyaltyPoints service interface+/// </summary>+public interface ILoyaltyPointsService{/// <summary>- /// LoyaltyPoints service interface+ /// Gets loyalty points balance/// </summary>- public interface ILoyaltyPointsService- {-- /// <summary>- /// Gets loyalty points balance- /// </summary>- /// <param name="customerId">Customer identifier</param>- /// <param name="storeId">Store identifier; pass </param>- /// <returns>Balance</returns>- Task<int> GetLoyaltyPointsBalance(string customerId, string storeId);+ /// <param name="customerId">Customer identifier</param>+ /// <param name="storeId">Store identifier; pass </param>+ /// <returns>Balance</returns>+ Task<int> GetLoyaltyPointsBalance(string customerId, string storeId);- /// <summary>- /// Add loyalty points history record- /// </summary>- /// <param name="customerId">Customer ident</param>- /// <param name="points">Number of points to add</param>- /// <param name="storeId">Store identifier</param>- /// <param name="message">Message</param>- /// <param name="usedWithOrderId">the order for which points were redeemed as a payment</param>- /// <param name="usedAmount">Used amount</param>- Task<LoyaltyPointsHistory> AddLoyaltyPointsHistory(string customerId, int points, string storeId, string message = "",- string usedWithOrderId = "", double usedAmount = 0);-- /// <summary>- /// Load loyalty point history records- /// </summary>- /// <param name="customerId">Customer identifier; "" to load all records</param>- /// <param name="storeId">Store ident</param>- /// <param name="showAll">A value indicating whether to show for all store(filter by current store if possible)</param>- /// <returns>Loyalty point history records</returns>- Task<IList<LoyaltyPointsHistory>> GetLoyaltyPointsHistory(string customerId = "", string storeId = "", bool showAll = false);+ /// <summary>+ /// Add loyalty points history record+ /// </summary>+ /// <param name="customerId">Customer ident</param>+ /// <param name="points">Number of points to add</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="message">Message</param>+ /// <param name="usedWithOrderId">the order for which points were redeemed as a payment</param>+ /// <param name="usedAmount">Used amount</param>+ Task<LoyaltyPointsHistory> AddLoyaltyPointsHistory(string customerId, int points, string storeId,+ string message = "",+ string usedWithOrderId = "", double usedAmount = 0);- }-}+ /// <summary>+ /// Load loyalty point history records+ /// </summary>+ /// <param name="customerId">Customer identifier; "" to load all records</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="showAll">A value indicating whether to show for all store(filter by current store if possible)</param>+ /// <returns>Loyalty point history records</returns>+ Task<IList<LoyaltyPointsHistory>> GetLoyaltyPointsHistory(string customerId = "", string storeId = "",+ bool showAll = false);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IMerchandiseReturnService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IMerchandiseReturnService.csindex 5ecc6c8fe..711d1ea93 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IMerchandiseReturnService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IMerchandiseReturnService.cs@@ -1,151 +1,153 @@using Grand.Domain;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// Merchandise return service interface+/// </summary>+public interface IMerchandiseReturnService{/// <summary>- /// Merchandise return service interface- /// </summary>- public interface IMerchandiseReturnService- {-- /// <summary>- /// Gets a merchandise return- /// </summary>- /// <param name="merchandiseReturnId">Merchandise return identifier</param>- /// <returns>Merchandise return</returns>- Task<MerchandiseReturn> GetMerchandiseReturnById(string merchandiseReturnId);-- /// <summary>- /// Gets a merchandise return- /// </summary>- /// <param name="id">Merchandise return number</param>t- /// <returns>Merchandise return</returns>- Task<MerchandiseReturn> GetMerchandiseReturnById(int id);-- /// <summary>- /// Search merchandise returns- /// </summary>- /// <param name="storeId">Store identifier; 0 to load all entries</param>- /// <param name="customerId">Customer identifier; 0 to load all entries</param>- /// <param name="orderItemId">Order item identifier; 0 to load all entries</param>- /// <param name="vendorId">Vendor identifier</param>- /// <param name="ownerId">Owner identifier</param>- /// <param name="rs">Merchandise return status; null to load all entries</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Merchandise returns</returns>- Task<IPagedList<MerchandiseReturn>> SearchMerchandiseReturns(string storeId = "", string customerId = "",- string orderItemId = "", string vendorId = "", string ownerId = "", MerchandiseReturnStatus? rs = null,- int pageIndex = 0, int pageSize = int.MaxValue, DateTime? createdFromUtc = null, DateTime? createdToUtc = null);-- /// <summary>- /// Inserts a merchandise return- /// </summary>- /// <param name="merchandiseReturn">Merchandise return </param>- Task InsertMerchandiseReturn(MerchandiseReturn merchandiseReturn);- /// <summary>- /// Update the merchandise return- /// </summary>- /// <param name="merchandiseReturn"></param>- Task UpdateMerchandiseReturn(MerchandiseReturn merchandiseReturn);- /// <summary>- /// Deletes a merchandise return- /// </summary>- /// <param name="merchandiseReturn">Merchandise return</param>- Task DeleteMerchandiseReturn(MerchandiseReturn merchandiseReturn);-- /// <summary>- /// Gets all merchandise return actions- /// </summary>- /// <returns>Merchandise return actions</returns>- Task<IList<MerchandiseReturnAction>> GetAllMerchandiseReturnActions();-- /// <summary>- /// Gets a merchandise return action- /// </summary>- /// <param name="merchandiseReturnActionId">Merchandise return action identifier</param>- /// <returns>Merchandise return action</returns>- Task<MerchandiseReturnAction> GetMerchandiseReturnActionById(string merchandiseReturnActionId);-- /// <summary>- /// Inserts a merchandise return action- /// </summary>- /// <param name="merchandiseReturnAction">Merchandise return action</param>- Task InsertMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);-- /// <summary>- /// Delete a merchandise return action- /// </summary>- /// <param name="merchandiseReturnAction">Merchandise return action</param>- Task DeleteMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);-- /// <summary>- /// Updates the merchandise return action- /// </summary>- /// <param name="merchandiseReturnAction">Merchandise return action</param>- Task UpdateMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);-- /// <summary>- /// Gets all merchandise return reasons- /// </summary>- /// <returns>Merchandise return reasons</returns>- Task<IList<MerchandiseReturnReason>> GetAllMerchandiseReturnReasons();-- /// <summary>- /// Gets a merchandise return reasons- /// </summary>- /// <param name="merchandiseReturnReasonId">Merchandise return reason identifier</param>- /// <returns>Merchandise return reasons</returns>- Task<MerchandiseReturnReason> GetMerchandiseReturnReasonById(string merchandiseReturnReasonId);-- /// <summary>- /// Inserts a merchandise return reasons- /// </summary>- /// <param name="merchandiseReturnReason">Merchandise return reason</param>- Task InsertMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);-- /// <summary>- /// Updates the merchandise return reasons- /// </summary>- /// <param name="merchandiseReturnReason">Merchandise return reason</param>- Task UpdateMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);- /// <summary>- /// Delete a merchandise return reasons- /// </summary>- /// <param name="merchandiseReturnReason">Merchandise return reason</param>- Task DeleteMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);-- #region Merchandise return notes--- /// <summary>- /// Insert a merchandise return note- /// </summary>- /// <param name="merchandiseReturnNote">The merchandise return note</param>- Task InsertMerchandiseReturnNote(MerchandiseReturnNote merchandiseReturnNote);- /// <summary>- /// Deletes a merchandise return note- /// </summary>- /// <param name="merchandiseReturnNote">The merchandise return note</param>- Task DeleteMerchandiseReturnNote(MerchandiseReturnNote merchandiseReturnNote);-- /// <summary>- /// Get notes for merchandise return- /// </summary>- /// <param name="merchandiseReturnId">Merchandise return identifier</param>- /// <returns>MerchandiseReturnNote</returns>- Task<IList<MerchandiseReturnNote>> GetMerchandiseReturnNotes(string merchandiseReturnId);-- /// <summary>- /// Get merchandise return note by id- /// </summary>- /// <param name="merchandiseReturnNoteId">Merchandise return note identifier</param>- /// <returns>MerchandiseReturnNote</returns>- Task<MerchandiseReturnNote> GetMerchandiseReturnNote(string merchandiseReturnNoteId);-- #endregion- }-}+ /// Gets a merchandise return+ /// </summary>+ /// <param name="merchandiseReturnId">Merchandise return identifier</param>+ /// <returns>Merchandise return</returns>+ Task<MerchandiseReturn> GetMerchandiseReturnById(string merchandiseReturnId);++ /// <summary>+ /// Gets a merchandise return+ /// </summary>+ /// <param name="id">Merchandise return number</param>+ /// t+ /// <returns>Merchandise return</returns>+ Task<MerchandiseReturn> GetMerchandiseReturnById(int id);++ /// <summary>+ /// Search merchandise returns+ /// </summary>+ /// <param name="storeId">Store identifier; 0 to load all entries</param>+ /// <param name="customerId">Customer identifier; 0 to load all entries</param>+ /// <param name="orderItemId">Order item identifier; 0 to load all entries</param>+ /// <param name="vendorId">Vendor identifier</param>+ /// <param name="ownerId">Owner identifier</param>+ /// <param name="rs">Merchandise return status; null to load all entries</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Merchandise returns</returns>+ Task<IPagedList<MerchandiseReturn>> SearchMerchandiseReturns(string storeId = "", string customerId = "",+ string orderItemId = "", string vendorId = "", string ownerId = "", MerchandiseReturnStatus? rs = null,+ int pageIndex = 0, int pageSize = int.MaxValue, DateTime? createdFromUtc = null, DateTime? createdToUtc = null);++ /// <summary>+ /// Inserts a merchandise return+ /// </summary>+ /// <param name="merchandiseReturn">Merchandise return </param>+ Task InsertMerchandiseReturn(MerchandiseReturn merchandiseReturn);++ /// <summary>+ /// Update the merchandise return+ /// </summary>+ /// <param name="merchandiseReturn"></param>+ Task UpdateMerchandiseReturn(MerchandiseReturn merchandiseReturn);++ /// <summary>+ /// Deletes a merchandise return+ /// </summary>+ /// <param name="merchandiseReturn">Merchandise return</param>+ Task DeleteMerchandiseReturn(MerchandiseReturn merchandiseReturn);++ /// <summary>+ /// Gets all merchandise return actions+ /// </summary>+ /// <returns>Merchandise return actions</returns>+ Task<IList<MerchandiseReturnAction>> GetAllMerchandiseReturnActions();++ /// <summary>+ /// Gets a merchandise return action+ /// </summary>+ /// <param name="merchandiseReturnActionId">Merchandise return action identifier</param>+ /// <returns>Merchandise return action</returns>+ Task<MerchandiseReturnAction> GetMerchandiseReturnActionById(string merchandiseReturnActionId);++ /// <summary>+ /// Inserts a merchandise return action+ /// </summary>+ /// <param name="merchandiseReturnAction">Merchandise return action</param>+ Task InsertMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);++ /// <summary>+ /// Delete a merchandise return action+ /// </summary>+ /// <param name="merchandiseReturnAction">Merchandise return action</param>+ Task DeleteMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);++ /// <summary>+ /// Updates the merchandise return action+ /// </summary>+ /// <param name="merchandiseReturnAction">Merchandise return action</param>+ Task UpdateMerchandiseReturnAction(MerchandiseReturnAction merchandiseReturnAction);++ /// <summary>+ /// Gets all merchandise return reasons+ /// </summary>+ /// <returns>Merchandise return reasons</returns>+ Task<IList<MerchandiseReturnReason>> GetAllMerchandiseReturnReasons();++ /// <summary>+ /// Gets a merchandise return reasons+ /// </summary>+ /// <param name="merchandiseReturnReasonId">Merchandise return reason identifier</param>+ /// <returns>Merchandise return reasons</returns>+ Task<MerchandiseReturnReason> GetMerchandiseReturnReasonById(string merchandiseReturnReasonId);++ /// <summary>+ /// Inserts a merchandise return reasons+ /// </summary>+ /// <param name="merchandiseReturnReason">Merchandise return reason</param>+ Task InsertMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);++ /// <summary>+ /// Updates the merchandise return reasons+ /// </summary>+ /// <param name="merchandiseReturnReason">Merchandise return reason</param>+ Task UpdateMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);++ /// <summary>+ /// Delete a merchandise return reasons+ /// </summary>+ /// <param name="merchandiseReturnReason">Merchandise return reason</param>+ Task DeleteMerchandiseReturnReason(MerchandiseReturnReason merchandiseReturnReason);++ #region Merchandise return notes++ /// <summary>+ /// Insert a merchandise return note+ /// </summary>+ /// <param name="merchandiseReturnNote">The merchandise return note</param>+ Task InsertMerchandiseReturnNote(MerchandiseReturnNote merchandiseReturnNote);++ /// <summary>+ /// Deletes a merchandise return note+ /// </summary>+ /// <param name="merchandiseReturnNote">The merchandise return note</param>+ Task DeleteMerchandiseReturnNote(MerchandiseReturnNote merchandiseReturnNote);++ /// <summary>+ /// Get notes for merchandise return+ /// </summary>+ /// <param name="merchandiseReturnId">Merchandise return identifier</param>+ /// <returns>MerchandiseReturnNote</returns>+ Task<IList<MerchandiseReturnNote>> GetMerchandiseReturnNotes(string merchandiseReturnId);++ /// <summary>+ /// Get merchandise return note by id+ /// </summary>+ /// <param name="merchandiseReturnNoteId">Merchandise return note identifier</param>+ /// <returns>MerchandiseReturnNote</returns>+ Task<MerchandiseReturnNote> GetMerchandiseReturnNote(string merchandiseReturnNoteId);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderCalculationService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderCalculationService.csindex 9bcfa4275..ffaa3d0a5 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderCalculationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderCalculationService.cs@@ -2,99 +2,113 @@ using Grand.Business.Core.Utilities.Catalog;using Grand.Business.Core.Utilities.Checkout;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// Order service interface+/// </summary>+public interface IOrderCalculationService{/// <summary>- /// Order service interface+ /// Gets shopping cart subtotal/// </summary>- public interface IOrderCalculationService- {- /// <summary>- /// Gets shopping cart subtotal- /// </summary>- /// <param name="cart">Cart</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- Task<(double discountAmount, List<ApplyDiscount> appliedDiscounts, double subTotalWithoutDiscount, double subTotalWithDiscount, SortedDictionary<double, double> taxRates)>- GetShoppingCartSubTotal(IList<ShoppingCartItem> cart,+ /// <param name="cart">Cart</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ Task<(double discountAmount, List<ApplyDiscount> appliedDiscounts, double subTotalWithoutDiscount, double+ subTotalWithDiscount, SortedDictionary<double, double> taxRates)>+ GetShoppingCartSubTotal(IList<ShoppingCartItem> cart,bool includingTax);- /// <summary>- /// Adjust shipping rate (free shipping, additional charges, discounts)- /// </summary>- /// <param name="shippingRate">Shipping rate to adjust</param>- /// <param name="cart">Cart</param>- /// <returns>Adjusted shipping rate</returns>- Task<(double shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(double shippingRate, IList<ShoppingCartItem> cart);+ /// <summary>+ /// Adjust shipping rate (free shipping, additional charges, discounts)+ /// </summary>+ /// <param name="shippingRate">Shipping rate to adjust</param>+ /// <param name="cart">Cart</param>+ /// <returns>Adjusted shipping rate</returns>+ Task<(double shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(double shippingRate,+ IList<ShoppingCartItem> cart);- /// <summary>- /// Gets shopping cart additional shipping charge- /// </summary>- /// <param name="cart">Cart</param>- /// <returns>Additional shipping charge</returns>- Task<double> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart);+ /// <summary>+ /// Gets shopping cart additional shipping charge+ /// </summary>+ /// <param name="cart">Cart</param>+ /// <returns>Additional shipping charge</returns>+ Task<double> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart);- /// <summary>- /// Gets a value indicating whether shipping is free- /// </summary>- /// <param name="cart">Cart</param>- /// <returns>A value indicating whether shipping is free</returns>- Task<bool> IsFreeShipping(IList<ShoppingCartItem> cart);+ /// <summary>+ /// Gets a value indicating whether shipping is free+ /// </summary>+ /// <param name="cart">Cart</param>+ /// <returns>A value indicating whether shipping is free</returns>+ Task<bool> IsFreeShipping(IList<ShoppingCartItem> cart);- /// <summary>- /// Gets shopping cart shipping total- /// </summary>- /// <param name="cart">Cart</param>- /// <returns>Shipping total</returns>- Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart);+ /// <summary>+ /// Gets shopping cart shipping total+ /// </summary>+ /// <param name="cart">Cart</param>+ /// <returns>Shipping total</returns>+ Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)>+ GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart);- /// <summary>- /// Gets shopping cart shipping total- /// </summary>- /// <param name="cart">Cart</param>- /// <param name="includingTax">A value indicating whether calculated price should include tax</param>- /// <returns>Shipping total</returns>- Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax);+ /// <summary>+ /// Gets shopping cart shipping total+ /// </summary>+ /// <param name="cart">Cart</param>+ /// <param name="includingTax">A value indicating whether calculated price should include tax</param>+ /// <returns>Shipping total</returns>+ Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)>+ GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax);- /// <summary>- /// Gets tax- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee when calculating tax</param>- /// <returns>Tax total</returns>- Task<(double taxtotal, SortedDictionary<double, double> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart, bool usePaymentMethodAdditionalFee = true);+ /// <summary>+ /// Gets tax+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <param name="usePaymentMethodAdditionalFee">+ /// A value indicating whether we should use payment method additional fee when+ /// calculating tax+ /// </param>+ /// <returns>Tax total</returns>+ Task<(double taxtotal, SortedDictionary<double, double> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart,+ bool usePaymentMethodAdditionalFee = true);- /// <summary>- /// Gets shopping cart total- /// </summary>- /// <param name="cart">Cart</param>- /// <param name="useLoyaltyPoints">A value indicating loyalty points should be used; null to detect current choice of the customer</param>- /// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee when calculating order total</param>- /// <returns>Shopping cart total;Null if shopping cart total couldn't be calculated now</returns>- Task<(double? shoppingCartTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts, List<AppliedGiftVoucher> appliedGiftVouchers,+ /// <summary>+ /// Gets shopping cart total+ /// </summary>+ /// <param name="cart">Cart</param>+ /// <param name="useLoyaltyPoints">+ /// A value indicating loyalty points should be used; null to detect current choice of the+ /// customer+ /// </param>+ /// <param name="usePaymentMethodAdditionalFee">+ /// A value indicating whether we should use payment method additional fee when+ /// calculating order total+ /// </param>+ /// <returns>Shopping cart total;Null if shopping cart total couldn't be calculated now</returns>+ Task<(double? shoppingCartTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts,+ List<AppliedGiftVoucher> appliedGiftVouchers,int redeemedLoyaltyPoints, double redeemedLoyaltyPointsAmount)>- GetShoppingCartTotal(IList<ShoppingCartItem> cart, bool? useLoyaltyPoints = null, bool usePaymentMethodAdditionalFee = true);-- /// <summary>- /// Converts existing loyalty points to amount- /// </summary>- /// <param name="loyaltyPoints">Loyalty points</param>- /// <returns>Converted value</returns>- Task<double> ConvertLoyaltyPointsToAmount(int loyaltyPoints);+ GetShoppingCartTotal(IList<ShoppingCartItem> cart, bool? useLoyaltyPoints = null,+ bool usePaymentMethodAdditionalFee = true);- /// <summary>- /// Converts an amount to loyalty points- /// </summary>- /// <param name="amount">Amount</param>- /// <returns>Converted value</returns>- int ConvertAmountToLoyaltyPoints(double amount);+ /// <summary>+ /// Converts existing loyalty points to amount+ /// </summary>+ /// <param name="loyaltyPoints">Loyalty points</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertLoyaltyPointsToAmount(int loyaltyPoints);- /// <summary>- /// Gets a value indicating whether a customer has minimum amount of loyalty points to use (if enabled)- /// </summary>- /// <param name="loyaltyPoints">Loyalty points to check</param>- /// <returns>true - loyalty points could use; false - cannot be used.</returns>- bool CheckMinimumLoyaltyPointsToUseRequirement(int loyaltyPoints);+ /// <summary>+ /// Converts an amount to loyalty points+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <returns>Converted value</returns>+ int ConvertAmountToLoyaltyPoints(double amount);- }-}+ /// <summary>+ /// Gets a value indicating whether a customer has minimum amount of loyalty points to use (if enabled)+ /// </summary>+ /// <param name="loyaltyPoints">Loyalty points to check</param>+ /// <returns>true - loyalty points could use; false - cannot be used.</returns>+ bool CheckMinimumLoyaltyPointsToUseRequirement(int loyaltyPoints);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderService.csindex a38d735ea..f9a96e33e 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderService.cs@@ -3,154 +3,159 @@ using Grand.Domain.Orders;using Grand.Domain.Payments;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// Order service interface+/// </summary>+public interface IOrderService{+ #region Orders items++ /// <summary>+ /// Gets an order item+ /// </summary>+ /// <param name="orderItemGuid">Order item identifier</param>+ /// <returns>Order item</returns>+ Task<OrderItem> GetOrderItemByGuid(Guid orderItemGuid);++ #endregion++ #region Orders++ /// <summary>+ /// Gets an order+ /// </summary>+ /// <param name="orderId">The order identifier</param>+ /// <returns>Order</returns>+ Task<Order> GetOrderById(string orderId);++ /// <summary>+ /// Gets an order+ /// </summary>+ /// <param name="orderItemId">The order item identifier</param>+ /// <returns>Order</returns>+ Task<Order> GetOrderByOrderItemId(string orderItemId);+/// <summary>- /// Order service interface+ /// Gets an order/// </summary>- public interface IOrderService- {- #region Orders-- /// <summary>- /// Gets an order- /// </summary>- /// <param name="orderId">The order identifier</param>- /// <returns>Order</returns>- Task<Order> GetOrderById(string orderId);-- /// <summary>- /// Gets an order- /// </summary>- /// <param name="orderItemId">The order item identifier</param>- /// <returns>Order</returns>- Task<Order> GetOrderByOrderItemId(string orderItemId);-- /// <summary>- /// Gets an order- /// </summary>- /// <param name="orderNumber">The order number</param>- /// <returns>Order</returns>- Task<Order> GetOrderByNumber(int orderNumber);-- /// <summary>- /// Gets orders by code- /// </summary>- /// <param name="code">The order code</param>- /// <returns>Order</returns>- Task<IList<Order>> GetOrdersByCode(string code);-- /// <summary>- /// Get orders by identifiers- /// </summary>- /// <param name="orderIds">Order identifiers</param>- /// <returns>Order</returns>- Task<IList<Order>> GetOrdersByIds(string[] orderIds);-- /// <summary>- /// Gets an order- /// </summary>- /// <param name="orderGuid">The order identifier</param>- /// <returns>Order</returns>- Task<Order> GetOrderByGuid(Guid orderGuid);-- /// <summary>- /// Search orders- /// </summary>- /// <param name="storeId">Store identifier; null to load all orders</param>- /// <param name="vendorId">Vendor identifier; null to load all orders</param>- /// <param name="customerId">Customer identifier; null to load all orders</param>- /// <param name="productId">Product identifier which was purchased in an order; 0 to load all orders</param>- /// <param name="affiliateId">Affiliate identifier; 0 to load all orders</param>- /// <param name="warehouseId">Warehouse identifier, only orders with products from a specified warehouse will be loaded; 0 to load all orders</param>- /// <param name="billingCountryId">Billing country identifier; 0 to load all orders</param>- /// <param name="ownerId">Owner identifier</param>- /// <param name="salesEmployeeId">Sales ident</param>- /// <param name="paymentMethodSystemName">Payment method system name; null to load all records</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="os">Order status; null to load all orders</param>- /// <param name="ps">Order payment status; null to load all orders</param>- /// <param name="ss">Order shipment status; null to load all orders</param>- /// <param name="billingEmail">Billing email. Leave empty to load all records.</param>- /// <param name="billingLastName"></param>- /// <param name="orderGuid">Search by order GUID (Global unique identifier) or part of GUID. Leave empty to load all records.</param>- /// <param name="orderCode">Search by order code.</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="orderTagId">Order tag identifier</param>- /// <returns>Orders</returns>- Task<IPagedList<Order>> SearchOrders(string storeId = "",- string vendorId = "", string customerId = "",- string productId = "", string affiliateId = "", string warehouseId = "",- string billingCountryId = "", string ownerId = "", string salesEmployeeId = "", string paymentMethodSystemName = null,- DateTime? createdFromUtc = null, DateTime? createdToUtc = null,- int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,- string billingEmail = null, string billingLastName = "", string orderGuid = null,- string orderCode = null, int pageIndex = 0, int pageSize = int.MaxValue, string orderTagId = "");-- /// <summary>- /// Inserts an order- /// </summary>- /// <param name="order">Order</param>- Task InsertOrder(Order order);-- /// <summary>- /// Updates the order- /// </summary>- /// <param name="order">The order</param>- Task UpdateOrder(Order order);-- #endregion-- #region Orders items-- /// <summary>- /// Gets an order item- /// </summary>- /// <param name="orderItemGuid">Order item identifier</param>- /// <returns>Order item</returns>- Task<OrderItem> GetOrderItemByGuid(Guid orderItemGuid);-- #endregion-- #region Order notes-- /// <summary>- /// Deletes an order note- /// </summary>- /// <param name="orderNote">The order note</param>- Task DeleteOrderNote(OrderNote orderNote);-- /// <summary>- /// Insert an order note- /// </summary>- /// <param name="orderNote">The order note</param>- Task InsertOrderNote(OrderNote orderNote);--- /// <summary>- /// Get order notes for order- /// </summary>- /// <param name="orderId">Order identifier</param>- /// <returns>OrderNote</returns>- Task<IList<OrderNote>> GetOrderNotes(string orderId);-- /// <summary>- /// Get order note by id- /// </summary>- /// <param name="orderNoteId">Order note identifier</param>- /// <returns>OrderNote</returns>- Task<OrderNote> GetOrderNote(string orderNoteId);--- /// <summary>- /// Cancel Expired UnPaid Orders- /// </summary>- /// <param name="expirationDateUtc">Date at which all unPaid orders and has pending status Would be Canceled</param>- Task CancelExpiredOrders(DateTime expirationDateUtc);-- #endregion-- }-}+ /// <param name="orderNumber">The order number</param>+ /// <returns>Order</returns>+ Task<Order> GetOrderByNumber(int orderNumber);++ /// <summary>+ /// Gets orders by code+ /// </summary>+ /// <param name="code">The order code</param>+ /// <returns>Order</returns>+ Task<IList<Order>> GetOrdersByCode(string code);++ /// <summary>+ /// Get orders by identifiers+ /// </summary>+ /// <param name="orderIds">Order identifiers</param>+ /// <returns>Order</returns>+ Task<IList<Order>> GetOrdersByIds(string[] orderIds);++ /// <summary>+ /// Gets an order+ /// </summary>+ /// <param name="orderGuid">The order identifier</param>+ /// <returns>Order</returns>+ Task<Order> GetOrderByGuid(Guid orderGuid);++ /// <summary>+ /// Search orders+ /// </summary>+ /// <param name="storeId">Store identifier; null to load all orders</param>+ /// <param name="vendorId">Vendor identifier; null to load all orders</param>+ /// <param name="customerId">Customer identifier; null to load all orders</param>+ /// <param name="productId">Product identifier which was purchased in an order; 0 to load all orders</param>+ /// <param name="affiliateId">Affiliate identifier; 0 to load all orders</param>+ /// <param name="warehouseId">+ /// Warehouse identifier, only orders with products from a specified warehouse will be loaded; 0+ /// to load all orders+ /// </param>+ /// <param name="billingCountryId">Billing country identifier; 0 to load all orders</param>+ /// <param name="ownerId">Owner identifier</param>+ /// <param name="salesEmployeeId">Sales ident</param>+ /// <param name="paymentMethodSystemName">Payment method system name; null to load all records</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="os">Order status; null to load all orders</param>+ /// <param name="ps">Order payment status; null to load all orders</param>+ /// <param name="ss">Order shipment status; null to load all orders</param>+ /// <param name="billingEmail">Billing email. Leave empty to load all records.</param>+ /// <param name="billingLastName"></param>+ /// <param name="orderGuid">+ /// Search by order GUID (Global unique identifier) or part of GUID. Leave empty to load all+ /// records.+ /// </param>+ /// <param name="orderCode">Search by order code.</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="orderTagId">Order tag identifier</param>+ /// <returns>Orders</returns>+ Task<IPagedList<Order>> SearchOrders(string storeId = "",+ string vendorId = "", string customerId = "",+ string productId = "", string affiliateId = "", string warehouseId = "",+ string billingCountryId = "", string ownerId = "", string salesEmployeeId = "",+ string paymentMethodSystemName = null,+ DateTime? createdFromUtc = null, DateTime? createdToUtc = null,+ int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,+ string billingEmail = null, string billingLastName = "", string orderGuid = null,+ string orderCode = null, int pageIndex = 0, int pageSize = int.MaxValue, string orderTagId = "");++ /// <summary>+ /// Inserts an order+ /// </summary>+ /// <param name="order">Order</param>+ Task InsertOrder(Order order);++ /// <summary>+ /// Updates the order+ /// </summary>+ /// <param name="order">The order</param>+ Task UpdateOrder(Order order);++ #endregion++ #region Order notes++ /// <summary>+ /// Deletes an order note+ /// </summary>+ /// <param name="orderNote">The order note</param>+ Task DeleteOrderNote(OrderNote orderNote);++ /// <summary>+ /// Insert an order note+ /// </summary>+ /// <param name="orderNote">The order note</param>+ Task InsertOrderNote(OrderNote orderNote);+++ /// <summary>+ /// Get order notes for order+ /// </summary>+ /// <param name="orderId">Order identifier</param>+ /// <returns>OrderNote</returns>+ Task<IList<OrderNote>> GetOrderNotes(string orderId);++ /// <summary>+ /// Get order note by id+ /// </summary>+ /// <param name="orderNoteId">Order note identifier</param>+ /// <returns>OrderNote</returns>+ Task<OrderNote> GetOrderNote(string orderNoteId);+++ /// <summary>+ /// Cancel Expired UnPaid Orders+ /// </summary>+ /// <param name="expirationDateUtc">Date at which all unPaid orders and has pending status Would be Canceled</param>+ Task CancelExpiredOrders(DateTime expirationDateUtc);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderStatusService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderStatusService.csindex 17b14fa89..e526c6014 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderStatusService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderStatusService.cs@@ -1,14 +1,13 @@using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++public interface IOrderStatusService{- public interface IOrderStatusService- {- Task<IList<OrderStatus>> GetAll();- Task<OrderStatus> GetById(string id);- Task<OrderStatus> GetByStatusId(int statusId);- Task Insert(OrderStatus orderStatus);- Task Update(OrderStatus orderStatus);- Task Delete(OrderStatus orderStatus);- }-}+ Task<IList<OrderStatus>> GetAll();+ Task<OrderStatus> GetById(string id);+ Task<OrderStatus> GetByStatusId(int statusId);+ Task Insert(OrderStatus orderStatus);+ Task Update(OrderStatus orderStatus);+ Task Delete(OrderStatus orderStatus);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderTagService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderTagService.csindex 3bd1e54a4..0b9ab7aca 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderTagService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IOrderTagService.cs@@ -1,70 +1,69 @@using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// Order's tag service interface+/// </summary>+public interface IOrderTagService{/// <summary>- /// Order's tag service interface+ /// Gets all order's tags/// </summary>- public interface IOrderTagService- {-- /// <summary>- /// Gets all order's tags- /// </summary>- /// <returns>order's tags</returns>- Task<IList<OrderTag>> GetAllOrderTags();+ /// <returns>order's tags</returns>+ Task<IList<OrderTag>> GetAllOrderTags();- /// <summary>- /// Gets order's tag- /// </summary>- /// <param name="orderTagId">order's tag identifier</param>- /// <returns>order's tag</returns>- Task<OrderTag> GetOrderTagById(string orderTagId);+ /// <summary>+ /// Gets order's tag+ /// </summary>+ /// <param name="orderTagId">order's tag identifier</param>+ /// <returns>order's tag</returns>+ Task<OrderTag> GetOrderTagById(string orderTagId);- /// <summary>- /// Gets order tag by name- /// </summary>- /// <param name="name">order tag name</param>- /// <returns>order tag</returns>- Task<OrderTag> GetOrderTagByName(string name);+ /// <summary>+ /// Gets order tag by name+ /// </summary>+ /// <param name="name">order tag name</param>+ /// <returns>order tag</returns>+ Task<OrderTag> GetOrderTagByName(string name);- /// <summary>- /// Inserts a order tag- /// </summary>- /// <param name="orderTag">order tag</param>- Task InsertOrderTag(OrderTag orderTag);+ /// <summary>+ /// Inserts a order tag+ /// </summary>+ /// <param name="orderTag">order tag</param>+ Task InsertOrderTag(OrderTag orderTag);++ /// <summary>+ /// Update a order tag+ /// </summary>+ /// <param name="orderTag">order tag</param>+ Task UpdateOrderTag(OrderTag orderTag);- /// <summary>- /// Update a order tag- /// </summary>- /// <param name="orderTag">order tag</param>- Task UpdateOrderTag(OrderTag orderTag);- /// <summary>- /// Delete a order's tag- /// </summary>- /// <param name="orderTag">Order's tag</param>- Task DeleteOrderTag(OrderTag orderTag);+ /// <summary>+ /// Delete a order's tag+ /// </summary>+ /// <param name="orderTag">Order's tag</param>+ Task DeleteOrderTag(OrderTag orderTag);- /// <summary>- /// Assign a tag to the order- /// </summary>- /// <param name="orderTagId">order Tag</param>- /// <param name="orderId"></param>- Task AttachOrderTag(string orderTagId, string orderId);+ /// <summary>+ /// Assign a tag to the order+ /// </summary>+ /// <param name="orderTagId">order Tag</param>+ /// <param name="orderId"></param>+ Task AttachOrderTag(string orderTagId, string orderId);- /// <summary>- /// Detach a tag from the order- /// </summary>- /// <param name="orderTagId">order Tag</param>- /// <param name="orderId"></param>- Task DetachOrderTag(string orderTagId, string orderId);+ /// <summary>+ /// Detach a tag from the order+ /// </summary>+ /// <param name="orderTagId">order Tag</param>+ /// <param name="orderId"></param>+ Task DetachOrderTag(string orderTagId, string orderId);- /// <summary>- /// Get number of orders- /// </summary>- /// <param name="orderTagId">order tag identifier</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Number of orders</returns>- Task<int> GetOrderCount(string orderTagId, string storeId);- }-}+ /// <summary>+ /// Get number of orders+ /// </summary>+ /// <param name="orderTagId">order tag identifier</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Number of orders</returns>+ Task<int> GetOrderCount(string orderTagId, string storeId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartService.csindex d4fb9bdea..ae62d61c9 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartService.cs@@ -3,107 +3,113 @@ using Grand.Domain.Common;using Grand.Domain.Customers;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++/// <summary>+/// Shopping cart service+/// </summary>+public interface IShoppingCartService{/// <summary>- /// Shopping cart service+ /// Gets shopping cart/// </summary>- public interface IShoppingCartService- {-- /// <summary>- /// Gets shopping cart- /// </summary>- /// <param name="storeId">Store identifier; pass null to load all records</param>- /// <param name="shoppingCartType">Shopping cart type; pass null to load all records</param>- /// <returns>Shopping Cart</returns>- Task<IList<ShoppingCartItem>> GetShoppingCart(string storeId = null, params ShoppingCartType[] shoppingCartType);+ /// <param name="storeId">Store identifier; pass null to load all records</param>+ /// <param name="shoppingCartType">Shopping cart type; pass null to load all records</param>+ /// <returns>Shopping Cart</returns>+ Task<IList<ShoppingCartItem>> GetShoppingCart(string storeId = null, params ShoppingCartType[] shoppingCartType);- /// <summary>- /// Finds a shopping cart item in the cart- /// </summary>- /// <param name="shoppingCart">Shopping cart</param>- /// <param name="shoppingCartType">Shopping cart type</param>- /// <param name="productId">Product ident</param>- /// <param name="warehouseId">Warehouse ident</param>- /// <param name="attributes">Attributes</param>- /// <param name="customerEnteredPrice">Price entered by a customer</param>- /// <param name="rentalStartDate">Rental start date</param>- /// <param name="rentalEndDate">Rental end date</param>- /// <returns>Found shopping cart item</returns>- Task<ShoppingCartItem> FindShoppingCartItem(IList<ShoppingCartItem> shoppingCart,- ShoppingCartType shoppingCartType,- string productId,- string warehouseId = null,- IList<CustomAttribute> attributes = null,- double? customerEnteredPrice = null,- DateTime? rentalStartDate = null,- DateTime? rentalEndDate = null);+ /// <summary>+ /// Finds a shopping cart item in the cart+ /// </summary>+ /// <param name="shoppingCart">Shopping cart</param>+ /// <param name="shoppingCartType">Shopping cart type</param>+ /// <param name="productId">Product ident</param>+ /// <param name="warehouseId">Warehouse ident</param>+ /// <param name="attributes">Attributes</param>+ /// <param name="customerEnteredPrice">Price entered by a customer</param>+ /// <param name="rentalStartDate">Rental start date</param>+ /// <param name="rentalEndDate">Rental end date</param>+ /// <returns>Found shopping cart item</returns>+ Task<ShoppingCartItem> FindShoppingCartItem(IList<ShoppingCartItem> shoppingCart,+ ShoppingCartType shoppingCartType,+ string productId,+ string warehouseId = null,+ IList<CustomAttribute> attributes = null,+ double? customerEnteredPrice = null,+ DateTime? rentalStartDate = null,+ DateTime? rentalEndDate = null);- /// <summary>- /// Add a product to shopping cart- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="productId">Product id</param>- /// <param name="shoppingCartType">ShoppingCartType</param>- /// <param name="storeId">Store id</param>- /// <param name="warehouseId">Warehouse id</param>- /// <param name="attributes">Attributes</param>- /// <param name="customerEnteredPrice">EnteredPrice</param>- /// <param name="rentalStartDate">RentalStartDate</param>- /// <param name="rentalEndDate">RentalEndDate</param>- /// <param name="quantity">Quantity</param>- /// <param name="automaticallyAddRequiredProductsIfEnabled">AutomaticallyAddRequiredProductsIfEnabled</param>- /// <param name="reservationId">ReservationId</param>- /// <param name="parameter">Parameter for reservation</param>- /// <param name="duration">Duration for reservation</param>- /// <param name="validator">ShoppingCartValidatorOptions</param>- /// <returns>(warnings, shoppingCartItem)</returns>- Task<(IList<string> warnings, ShoppingCartItem shoppingCartItem)> AddToCart(Customer customer, string productId,- ShoppingCartType shoppingCartType, string storeId, string warehouseId = null, IList<CustomAttribute> attributes = null,- double? customerEnteredPrice = null,- DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,- int quantity = 1,- bool automaticallyAddRequiredProductsIfEnabled = true, string reservationId = "", string parameter = "", string duration = "",- ShoppingCartValidatorOptions validator = null);+ /// <summary>+ /// Add a product to shopping cart+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="productId">Product id</param>+ /// <param name="shoppingCartType">ShoppingCartType</param>+ /// <param name="storeId">Store id</param>+ /// <param name="warehouseId">Warehouse id</param>+ /// <param name="attributes">Attributes</param>+ /// <param name="customerEnteredPrice">EnteredPrice</param>+ /// <param name="rentalStartDate">RentalStartDate</param>+ /// <param name="rentalEndDate">RentalEndDate</param>+ /// <param name="quantity">Quantity</param>+ /// <param name="automaticallyAddRequiredProductsIfEnabled">AutomaticallyAddRequiredProductsIfEnabled</param>+ /// <param name="reservationId">ReservationId</param>+ /// <param name="parameter">Parameter for reservation</param>+ /// <param name="duration">Duration for reservation</param>+ /// <param name="validator">ShoppingCartValidatorOptions</param>+ /// <returns>(warnings, shoppingCartItem)</returns>+ Task<(IList<string> warnings, ShoppingCartItem shoppingCartItem)> AddToCart(Customer customer, string productId,+ ShoppingCartType shoppingCartType, string storeId, string warehouseId = null,+ IList<CustomAttribute> attributes = null,+ double? customerEnteredPrice = null,+ DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,+ int quantity = 1,+ bool automaticallyAddRequiredProductsIfEnabled = true, string reservationId = "", string parameter = "",+ string duration = "",+ ShoppingCartValidatorOptions validator = null);- /// <summary>- /// Updates the shopping cart item- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="shoppingCartItemId">Shopping cart item identifier</param>- /// <param name="warehouseId">Warehouse ident</param>- /// <param name="attributes">Attributes</param>- /// <param name="customerEnteredPrice">New customer entered price</param>- /// <param name="rentalStartDate">Rental start date</param>- /// <param name="rentalEndDate">Rental end date</param>- /// <param name="quantity">New shopping cart item quantity</param>- /// <param name="resetCheckoutData">A value indicating whether to reset checkout data</param>- /// <param name="reservationId">Reservation ident</param>- /// <param name="sciId"></param>- /// <returns>Warnings</returns>- Task<IList<string>> UpdateShoppingCartItem(Customer customer,- string shoppingCartItemId, string warehouseId, IList<CustomAttribute> attributes,- double? customerEnteredPrice = null,- DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,- int quantity = 1, bool resetCheckoutData = true, string reservationId = "", string sciId = "");+ /// <summary>+ /// Updates the shopping cart item+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="shoppingCartItemId">Shopping cart item identifier</param>+ /// <param name="warehouseId">Warehouse ident</param>+ /// <param name="attributes">Attributes</param>+ /// <param name="customerEnteredPrice">New customer entered price</param>+ /// <param name="rentalStartDate">Rental start date</param>+ /// <param name="rentalEndDate">Rental end date</param>+ /// <param name="quantity">New shopping cart item quantity</param>+ /// <param name="resetCheckoutData">A value indicating whether to reset checkout data</param>+ /// <param name="reservationId">Reservation ident</param>+ /// <param name="sciId"></param>+ /// <returns>Warnings</returns>+ Task<IList<string>> UpdateShoppingCartItem(Customer customer,+ string shoppingCartItemId, string warehouseId, IList<CustomAttribute> attributes,+ double? customerEnteredPrice = null,+ DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,+ int quantity = 1, bool resetCheckoutData = true, string reservationId = "", string sciId = "");- /// <summary>- /// Delete shopping cart item- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="shoppingCartItem">Shopping cart item</param>- /// <param name="resetCheckoutData">A value indicating whether to reset checkout data</param>- /// <param name="ensureOnlyActiveCheckoutAttributes">A value indicating whether to ensure that only active checkout attributes are attached to the current customer</param>- Task DeleteShoppingCartItem(Customer customer, ShoppingCartItem shoppingCartItem, bool resetCheckoutData = true,- bool ensureOnlyActiveCheckoutAttributes = false);+ /// <summary>+ /// Delete shopping cart item+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="shoppingCartItem">Shopping cart item</param>+ /// <param name="resetCheckoutData">A value indicating whether to reset checkout data</param>+ /// <param name="ensureOnlyActiveCheckoutAttributes">+ /// A value indicating whether to ensure that only active checkout+ /// attributes are attached to the current customer+ /// </param>+ Task DeleteShoppingCartItem(Customer customer, ShoppingCartItem shoppingCartItem, bool resetCheckoutData = true,+ bool ensureOnlyActiveCheckoutAttributes = false);- /// <summary>- /// Migrate shopping cart- /// </summary>- /// <param name="fromCustomer">From customer</param>- /// <param name="toCustomer">To customer</param>- /// <param name="includeCouponCodes">A value indicating whether to coupon codes (discount and gift voucher) should be also re-applied</param>- Task MigrateShoppingCart(Customer fromCustomer, Customer toCustomer, bool includeCouponCodes);- }-}+ /// <summary>+ /// Migrate shopping cart+ /// </summary>+ /// <param name="fromCustomer">From customer</param>+ /// <param name="toCustomer">To customer</param>+ /// <param name="includeCouponCodes">+ /// A value indicating whether to coupon codes (discount and gift voucher) should be also+ /// re-applied+ /// </param>+ Task MigrateShoppingCart(Customer fromCustomer, Customer toCustomer, bool includeCouponCodes);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartValidator.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartValidator.csindex 7695a66c3..8edaf3c76 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartValidator.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Orders/IShoppingCartValidator.cs@@ -4,115 +4,117 @@ using Grand.Domain.Common;using Grand.Domain.Customers;using Grand.Domain.Orders;-namespace Grand.Business.Core.Interfaces.Checkout.Orders+namespace Grand.Business.Core.Interfaces.Checkout.Orders;++public interface IShoppingCartValidator{- public interface IShoppingCartValidator- {- /// <summary>- /// Validates a product for standard properties- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">Product</param>- /// <param name="shoppingCartItem">Shopping cart item</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetStandardWarnings(Customer customer, Product product, ShoppingCartItem shoppingCartItem);+ /// <summary>+ /// Validates a product for standard properties+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">Product</param>+ /// <param name="shoppingCartItem">Shopping cart item</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetStandardWarnings(Customer customer, Product product, ShoppingCartItem shoppingCartItem);- /// <summary>- /// Validates shopping cart item attributes- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">Product</param>- /// <param name="shoppingCartItem">Shopping cart item</param>- /// <param name="ignoreNonCombinableAttributes">A value indicating whether we should ignore non-combinable attributes</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetShoppingCartItemAttributeWarnings(Customer customer,- Product product, ShoppingCartItem shoppingCartItem,- bool ignoreNonCombinableAttributes = false);+ /// <summary>+ /// Validates shopping cart item attributes+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">Product</param>+ /// <param name="shoppingCartItem">Shopping cart item</param>+ /// <param name="ignoreNonCombinableAttributes">A value indicating whether we should ignore non-combinable attributes</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetShoppingCartItemAttributeWarnings(Customer customer,+ Product product, ShoppingCartItem shoppingCartItem,+ bool ignoreNonCombinableAttributes = false);- /// <summary>- /// Validates shopping cart item (gift voucher)- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">Product</param>- /// <param name="shoppingCartItem">Shopping cart item</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetShoppingCartItemGiftVoucherWarnings(Customer customer,- Product product, ShoppingCartItem shoppingCartItem);+ /// <summary>+ /// Validates shopping cart item (gift voucher)+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">Product</param>+ /// <param name="shoppingCartItem">Shopping cart item</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetShoppingCartItemGiftVoucherWarnings(Customer customer,+ Product product, ShoppingCartItem shoppingCartItem);- /// <summary>- /// Validate bid- /// </summary>- /// <param name="bid"></param>- /// <param name="product"></param>- /// <param name="customer"></param>- /// <returns></returns>- Task<IList<string>> GetAuctionProductWarning(double bid, Product product, Customer customer);+ /// <summary>+ /// Validate bid+ /// </summary>+ /// <param name="bid"></param>+ /// <param name="product"></param>+ /// <param name="customer"></param>+ /// <returns></returns>+ Task<IList<string>> GetAuctionProductWarning(double bid, Product product, Customer customer);- /// <summary>- /// Validates shopping cart item- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="shoppingCartItem">Shopping cart type</param>- /// <param name="product">Product</param>- /// <param name="options">Options</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetShoppingCartItemWarnings(Customer customer, ShoppingCartItem shoppingCartItem,- Product product, ShoppingCartValidatorOptions options);+ /// <summary>+ /// Validates shopping cart item+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="shoppingCartItem">Shopping cart type</param>+ /// <param name="product">Product</param>+ /// <param name="options">Options</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetShoppingCartItemWarnings(Customer customer, ShoppingCartItem shoppingCartItem,+ Product product, ShoppingCartValidatorOptions options);- /// <summary>- /// Validates whether this shopping cart is valid- /// </summary>- /// <param name="shoppingCart">Shopping cart</param>- /// <param name="checkoutAttributes">Checkout attributes</param>- /// <param name="validateCheckoutAttributes">A value indicating whether to validate checkout attributes</param>- /// <param name="validateAmount">A value indicating whether to validate subtotal/total attributes</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetShoppingCartWarnings(IList<ShoppingCartItem> shoppingCart,- IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes, bool validateAmount);+ /// <summary>+ /// Validates whether this shopping cart is valid+ /// </summary>+ /// <param name="shoppingCart">Shopping cart</param>+ /// <param name="checkoutAttributes">Checkout attributes</param>+ /// <param name="validateCheckoutAttributes">A value indicating whether to validate checkout attributes</param>+ /// <param name="validateAmount">A value indicating whether to validate subtotal/total attributes</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetShoppingCartWarnings(IList<ShoppingCartItem> shoppingCart,+ IList<CustomAttribute> checkoutAttributes, bool validateCheckoutAttributes, bool validateAmount);- /// <summary>- /// Validates shopping cart item for reservation products- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">product</param>- /// <param name="shoppingCartItem">ShoppingCartItem</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetReservationProductWarnings(Customer customer, Product product, ShoppingCartItem shoppingCartItem);+ /// <summary>+ /// Validates shopping cart item for reservation products+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">product</param>+ /// <param name="shoppingCartItem">ShoppingCartItem</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetReservationProductWarnings(Customer customer, Product product,+ ShoppingCartItem shoppingCartItem);- /// <summary>- /// Validates shopping cart item for inventory- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">product</param>- /// <param name="shoppingCartItem">ShoppingCartItem</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetInventoryProductWarnings(Customer customer, Product product, ShoppingCartItem shoppingCartItem);+ /// <summary>+ /// Validates shopping cart item for inventory+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">product</param>+ /// <param name="shoppingCartItem">ShoppingCartItem</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetInventoryProductWarnings(Customer customer, Product product,+ ShoppingCartItem shoppingCartItem);- /// <summary>- /// Validates common problems- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="currentCart">Current cart</param>- /// <param name="product">product</param>- /// <param name="shoppingCartType">cart type</param>- /// <param name="rentalStartDate">rental start date</param>- /// <param name="rentalEndDate">rental end date</param>- /// <param name="quantity">quantity</param>- /// <param name="reservationId">reservation Id</param>- /// <returns>Warnings</returns>- Task<IList<string>> CheckCommonWarnings(Customer customer, IList<ShoppingCartItem> currentCart, Product product,- ShoppingCartType shoppingCartType, DateTime? rentalStartDate, DateTime? rentalEndDate, int quantity, string reservationId);+ /// <summary>+ /// Validates common problems+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="currentCart">Current cart</param>+ /// <param name="product">product</param>+ /// <param name="shoppingCartType">cart type</param>+ /// <param name="rentalStartDate">rental start date</param>+ /// <param name="rentalEndDate">rental end date</param>+ /// <param name="quantity">quantity</param>+ /// <param name="reservationId">reservation Id</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> CheckCommonWarnings(Customer customer, IList<ShoppingCartItem> currentCart, Product product,+ ShoppingCartType shoppingCartType, DateTime? rentalStartDate, DateTime? rentalEndDate, int quantity,+ string reservationId);- /// <summary>- /// Validates required products (products which require some other products to be added to the cart)- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="shoppingCartItem">Shopping cart type</param>- /// <param name="product">Product</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetRequiredProductWarnings(Customer customer,- ShoppingCartItem shoppingCartItem, Product product,- string storeId);- }-}+ /// <summary>+ /// Validates required products (products which require some other products to be added to the cart)+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="shoppingCartItem">Shopping cart type</param>+ /// <param name="product">Product</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetRequiredProductWarnings(Customer customer,+ ShoppingCartItem shoppingCartItem, Product product,+ string storeId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentProvider.csindex f4513db56..864c940b7 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentProvider.cs@@ -1,155 +1,154 @@using Grand.Business.Core.Enums.Checkout;using Grand.Business.Core.Utilities.Checkout;-using Grand.Infrastructure.Plugins;using Grand.Domain.Orders;using Grand.Domain.Payments;+using Grand.Infrastructure.Plugins;++namespace Grand.Business.Core.Interfaces.Checkout.Payments;-namespace Grand.Business.Core.Interfaces.Checkout.Payments+/// <summary>+/// Provides an interface for creating payment gateways & methods+/// </summary>+public interface IPaymentProvider : IProvider{+ #region Methods++ /// <summary>+ /// Init a process a payment transaction+ /// </summary>+ /// <returns>Payment transaction</returns>+ Task<PaymentTransaction> InitPaymentTransaction();++ /// <summary>+ /// Process a payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Process payment result</returns>+ Task<ProcessPaymentResult> ProcessPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Post process payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ Task PostProcessPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Post redirect payment (used by payment gateways that redirecting to a another URL)+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ Task PostRedirectPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Returns a value indicating whether payment method should be hidden during checkout+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <returns>true - hide; false - display.</returns>+ Task<bool> HidePaymentMethod(IList<ShoppingCartItem> cart);++ /// <summary>+ /// Gets additional handling fee+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <returns>Additional handling fee</returns>+ Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart);++ /// <summary>+ /// Captures payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Capture payment result</returns>+ Task<CapturePaymentResult> Capture(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Refunds a payment+ /// </summary>+ /// <param name="refundPaymentRequest">Request</param>+ /// <returns>Result</returns>+ Task<RefundPaymentResult> Refund(RefundPaymentRequest refundPaymentRequest);+/// <summary>- /// Provides an interface for creating payment gateways & methods- /// </summary>- public interface IPaymentProvider : IProvider- {- #region Methods-- /// <summary>- /// Init a process a payment transaction- /// </summary>- /// <returns>Payment transaction</returns>- Task<PaymentTransaction> InitPaymentTransaction();-- /// <summary>- /// Process a payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Process payment result</returns>- Task<ProcessPaymentResult> ProcessPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Post process payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- Task PostProcessPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Post redirect payment (used by payment gateways that redirecting to a another URL)- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- Task PostRedirectPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Returns a value indicating whether payment method should be hidden during checkout- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <returns>true - hide; false - display.</returns>- Task<bool> HidePaymentMethod(IList<ShoppingCartItem> cart);-- /// <summary>- /// Gets additional handling fee- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <returns>Additional handling fee</returns>- Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart);-- /// <summary>- /// Captures payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Capture payment result</returns>- Task<CapturePaymentResult> Capture(PaymentTransaction paymentTransaction);-- /// <summary>- /// Refunds a payment- /// </summary>- /// <param name="refundPaymentRequest">Request</param>- /// <returns>Result</returns>- Task<RefundPaymentResult> Refund(RefundPaymentRequest refundPaymentRequest);-- /// <summary>- /// Voids a payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Result</returns>- Task<VoidPaymentResult> Void(PaymentTransaction paymentTransaction);-- /// <summary>- /// Cancel payment transaction- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- Task CancelPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Gets a value indicating whether customers can complete a payment after order is placed but not completed (for redirection payment methods)- /// </summary>- /// <param name="paymentTransaction">PaymentTransaction</param>- /// <returns>Result</returns>- Task<bool> CanRePostRedirectPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Validate payment form- /// </summary>- /// <param name="model">Dictionary</param>- /// <returns>List of validating errors</returns>- Task<IList<string>> ValidatePaymentForm(IDictionary<string, string> model);-- /// <summary>- /// Get payment information- /// </summary>- /// <param name="model">Dictionary</param>- /// <returns>Payment info holder</returns>- Task<PaymentTransaction> SavePaymentInfo(IDictionary<string, string> model);-- /// <summary>- /// Gets a route url for displaying plugin in public store ("payment info" checkout step)- /// </summary>- Task<string> GetControllerRouteName();-- #endregion-- #region Properties--- /// <summary>- /// Gets a payment method type- /// </summary>- PaymentMethodType PaymentMethodType { get; }-- /// <summary>- /// Gets a value indicating whether we should display a payment information page for this plugin- /// </summary>- Task<bool> SkipPaymentInfo();-- /// <summary>- /// Gets a payment method description that will be displayed on checkout pages in the public store- /// </summary>- Task<string> Description();-- /// <summary>- /// Gets a logo URL- /// </summary>- string LogoURL { get; }-- /// <summary>- /// Gets a value indicating whether capture is supported- /// </summary>- Task<bool> SupportCapture();-- /// <summary>- /// Gets a value indicating whether partial refund is supported- /// </summary>- Task<bool> SupportPartiallyRefund();-- /// <summary>- /// Gets a value indicating whether refund is supported- /// </summary>- Task<bool> SupportRefund();-- /// <summary>- /// Gets a value indicating whether void is supported- /// </summary>- Task<bool> SupportVoid();-- #endregion- }-}+ /// Voids a payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Result</returns>+ Task<VoidPaymentResult> Void(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Cancel payment transaction+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ Task CancelPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Gets a value indicating whether customers can complete a payment after order is placed but not completed (for+ /// redirection payment methods)+ /// </summary>+ /// <param name="paymentTransaction">PaymentTransaction</param>+ /// <returns>Result</returns>+ Task<bool> CanRePostRedirectPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Validate payment form+ /// </summary>+ /// <param name="model">Dictionary</param>+ /// <returns>List of validating errors</returns>+ Task<IList<string>> ValidatePaymentForm(IDictionary<string, string> model);++ /// <summary>+ /// Get payment information+ /// </summary>+ /// <param name="model">Dictionary</param>+ /// <returns>Payment info holder</returns>+ Task<PaymentTransaction> SavePaymentInfo(IDictionary<string, string> model);++ /// <summary>+ /// Gets a route url for displaying plugin in public store ("payment info" checkout step)+ /// </summary>+ Task<string> GetControllerRouteName();++ #endregion++ #region Properties++ /// <summary>+ /// Gets a payment method type+ /// </summary>+ PaymentMethodType PaymentMethodType { get; }++ /// <summary>+ /// Gets a value indicating whether we should display a payment information page for this plugin+ /// </summary>+ Task<bool> SkipPaymentInfo();++ /// <summary>+ /// Gets a payment method description that will be displayed on checkout pages in the public store+ /// </summary>+ Task<string> Description();++ /// <summary>+ /// Gets a logo URL+ /// </summary>+ string LogoURL { get; }++ /// <summary>+ /// Gets a value indicating whether capture is supported+ /// </summary>+ Task<bool> SupportCapture();++ /// <summary>+ /// Gets a value indicating whether partial refund is supported+ /// </summary>+ Task<bool> SupportPartiallyRefund();++ /// <summary>+ /// Gets a value indicating whether refund is supported+ /// </summary>+ Task<bool> SupportRefund();++ /// <summary>+ /// Gets a value indicating whether void is supported+ /// </summary>+ Task<bool> SupportVoid();++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentService.csindex 6aae81030..a9b3b2356 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentService.cs@@ -4,162 +4,163 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using Grand.Domain.Payments;-namespace Grand.Business.Core.Interfaces.Checkout.Payments+namespace Grand.Business.Core.Interfaces.Checkout.Payments;++/// <summary>+/// Payment service interface+/// </summary>+public interface IPaymentService{/// <summary>- /// Payment service interface- /// </summary>- public interface IPaymentService- {- /// <summary>- /// Load active payment methods- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="storeId">Store ident</param>- /// <param name="filterByCountryId">Specified country</param>- /// <returns>Payment methods</returns>- Task<IList<IPaymentProvider>> LoadActivePaymentMethods(Customer customer = null, string storeId = "", string filterByCountryId = "");-- /// <summary>- /// Load payment provider by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found payment provider</returns>- IPaymentProvider LoadPaymentMethodBySystemName(string systemName);-- /// <summary>- /// Load all payment providers- /// </summary>- /// <param name="storeId">Store ident</param>- /// <param name="customer">Customer</param>- /// <param name="filterByCountryId">Specified country</param>- /// <returns>Payment providers</returns>- IList<IPaymentProvider> LoadAllPaymentMethods(Customer customer = null, string storeId = "", string filterByCountryId = "");-- /// <summary>- /// Gets a list of country identifiers in which a certain payment method is now allowed- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <returns>A list of country identifiers</returns>- IList<string> GetRestrictedCountryIds(IPaymentProvider paymentMethod);-- /// <summary>- /// Gets a list of shipping identifiers in which a certain payment method is now allowed- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <returns>A list of role identifiers</returns>- IList<string> GetRestrictedShippingIds(IPaymentProvider paymentMethod);-- /// <summary>- /// Saves a list of country identifiers in which a certain payment method is now allowed- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <param name="countryIds">A list of country identifiers</param>- Task SaveRestrictedCountryIds(IPaymentProvider paymentMethod, List<string> countryIds);-- /// <summary>- /// Saves a list of shipping identifiers in which a certain payment method is now allowed- /// </summary>- /// <param name="paymentMethod">Payment method</param>- /// <param name="shippingIds">A list of shipping identifiers</param>- Task SaveRestrictedShippingIds(IPaymentProvider paymentMethod, List<string> shippingIds);-- /// <summary>- /// Process a payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Process payment result</returns>- Task<ProcessPaymentResult> ProcessPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Post process payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- Task PostProcessPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Post redirect payment (used by payment gateways that redirecting to a another URL)- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- Task PostRedirectPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Gets a value indicating whether customers can complete a payment after order is placed but not completed (for redirection payment methods)- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Result</returns>- Task<bool> CanRePostRedirectPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Gets an additional handling fee of a payment method- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>Additional handling fee</returns>- Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName);-- /// <summary>- /// Gets a value indicating whether capture is supported by payment method- /// </summary>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>A value indicating whether capture is supported</returns>- Task<bool> SupportCapture(string paymentMethodSystemName);-- /// <summary>- /// Captures payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Capture payment result</returns>- Task<CapturePaymentResult> Capture(PaymentTransaction paymentTransaction);-- /// <summary>- /// Gets a value indicating whether partial refund is supported by payment method- /// </summary>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>A value indicating whether partial refund is supported</returns>- Task<bool> SupportPartiallyRefund(string paymentMethodSystemName);-- /// <summary>- /// Gets a value indicating whether refund is supported by payment method- /// </summary>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>A value indicating whether refund is supported</returns>- Task<bool> SupportRefund(string paymentMethodSystemName);-- /// <summary>- /// Refunds a payment- /// </summary>- /// <param name="refundPaymentRequest">Request</param>- /// <returns>Result</returns>- Task<RefundPaymentResult> Refund(RefundPaymentRequest refundPaymentRequest);-- /// <summary>- /// Gets a value indicating whether void is supported by payment method- /// </summary>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>A value indicating whether void is supported</returns>- Task<bool> SupportVoid(string paymentMethodSystemName);-- /// <summary>- /// Voids a payment- /// </summary>- /// <param name="paymentTransaction">Payment transaction</param>- /// <returns>Result</returns>- Task<VoidPaymentResult> Void(PaymentTransaction paymentTransaction);-- /// <summary>- /// Cancel payment- /// </summary>- /// <param name="paymentTransaction"></param>- /// <returns></returns>- Task CancelPayment(PaymentTransaction paymentTransaction);-- /// <summary>- /// Gets a payment method type- /// </summary>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>A payment method type</returns>- PaymentMethodType GetPaymentMethodType(string paymentMethodSystemName);-- }-}+ /// Load active payment methods+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="filterByCountryId">Specified country</param>+ /// <returns>Payment methods</returns>+ Task<IList<IPaymentProvider>> LoadActivePaymentMethods(Customer customer = null, string storeId = "",+ string filterByCountryId = "");++ /// <summary>+ /// Load payment provider by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found payment provider</returns>+ IPaymentProvider LoadPaymentMethodBySystemName(string systemName);++ /// <summary>+ /// Load all payment providers+ /// </summary>+ /// <param name="storeId">Store ident</param>+ /// <param name="customer">Customer</param>+ /// <param name="filterByCountryId">Specified country</param>+ /// <returns>Payment providers</returns>+ IList<IPaymentProvider> LoadAllPaymentMethods(Customer customer = null, string storeId = "",+ string filterByCountryId = "");++ /// <summary>+ /// Gets a list of country identifiers in which a certain payment method is now allowed+ /// </summary>+ /// <param name="paymentMethod">Payment method</param>+ /// <returns>A list of country identifiers</returns>+ IList<string> GetRestrictedCountryIds(IPaymentProvider paymentMethod);++ /// <summary>+ /// Gets a list of shipping identifiers in which a certain payment method is now allowed+ /// </summary>+ /// <param name="paymentMethod">Payment method</param>+ /// <returns>A list of role identifiers</returns>+ IList<string> GetRestrictedShippingIds(IPaymentProvider paymentMethod);++ /// <summary>+ /// Saves a list of country identifiers in which a certain payment method is now allowed+ /// </summary>+ /// <param name="paymentMethod">Payment method</param>+ /// <param name="countryIds">A list of country identifiers</param>+ Task SaveRestrictedCountryIds(IPaymentProvider paymentMethod, List<string> countryIds);++ /// <summary>+ /// Saves a list of shipping identifiers in which a certain payment method is now allowed+ /// </summary>+ /// <param name="paymentMethod">Payment method</param>+ /// <param name="shippingIds">A list of shipping identifiers</param>+ Task SaveRestrictedShippingIds(IPaymentProvider paymentMethod, List<string> shippingIds);++ /// <summary>+ /// Process a payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Process payment result</returns>+ Task<ProcessPaymentResult> ProcessPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Post process payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ Task PostProcessPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Post redirect payment (used by payment gateways that redirecting to a another URL)+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ Task PostRedirectPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Gets a value indicating whether customers can complete a payment after order is placed but not completed (for+ /// redirection payment methods)+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Result</returns>+ Task<bool> CanRePostRedirectPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Gets an additional handling fee of a payment method+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>Additional handling fee</returns>+ Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName);++ /// <summary>+ /// Gets a value indicating whether capture is supported by payment method+ /// </summary>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>A value indicating whether capture is supported</returns>+ Task<bool> SupportCapture(string paymentMethodSystemName);++ /// <summary>+ /// Captures payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Capture payment result</returns>+ Task<CapturePaymentResult> Capture(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Gets a value indicating whether partial refund is supported by payment method+ /// </summary>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>A value indicating whether partial refund is supported</returns>+ Task<bool> SupportPartiallyRefund(string paymentMethodSystemName);++ /// <summary>+ /// Gets a value indicating whether refund is supported by payment method+ /// </summary>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>A value indicating whether refund is supported</returns>+ Task<bool> SupportRefund(string paymentMethodSystemName);++ /// <summary>+ /// Refunds a payment+ /// </summary>+ /// <param name="refundPaymentRequest">Request</param>+ /// <returns>Result</returns>+ Task<RefundPaymentResult> Refund(RefundPaymentRequest refundPaymentRequest);++ /// <summary>+ /// Gets a value indicating whether void is supported by payment method+ /// </summary>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>A value indicating whether void is supported</returns>+ Task<bool> SupportVoid(string paymentMethodSystemName);++ /// <summary>+ /// Voids a payment+ /// </summary>+ /// <param name="paymentTransaction">Payment transaction</param>+ /// <returns>Result</returns>+ Task<VoidPaymentResult> Void(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Cancel payment+ /// </summary>+ /// <param name="paymentTransaction"></param>+ /// <returns></returns>+ Task CancelPayment(PaymentTransaction paymentTransaction);++ /// <summary>+ /// Gets a payment method type+ /// </summary>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>A payment method type</returns>+ PaymentMethodType GetPaymentMethodType(string paymentMethodSystemName);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentTransactionService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentTransactionService.csindex fddaee4e3..79aaa3f83 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentTransactionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Payments/IPaymentTransactionService.cs@@ -1,81 +1,81 @@using Grand.Domain;using Grand.Domain.Payments;-namespace Grand.Business.Core.Interfaces.Checkout.Payments+namespace Grand.Business.Core.Interfaces.Checkout.Payments;++public interface IPaymentTransactionService{- public interface IPaymentTransactionService- {- /// <summary>- /// Inserts an payment transaction- /// </summary>- /// <param name="paymentTransaction">payment transaction</param>- Task InsertPaymentTransaction(PaymentTransaction paymentTransaction);+ /// <summary>+ /// Inserts an payment transaction+ /// </summary>+ /// <param name="paymentTransaction">payment transaction</param>+ Task InsertPaymentTransaction(PaymentTransaction paymentTransaction);- /// <summary>- /// Update an payment transaction- /// </summary>- /// <param name="paymentTransaction">payment transaction</param>- Task UpdatePaymentTransaction(PaymentTransaction paymentTransaction);+ /// <summary>+ /// Update an payment transaction+ /// </summary>+ /// <param name="paymentTransaction">payment transaction</param>+ Task UpdatePaymentTransaction(PaymentTransaction paymentTransaction);- /// <summary>- /// Delete an payment transaction- /// </summary>- /// <param name="paymentTransaction">payment transaction</param>- Task DeletePaymentTransaction(PaymentTransaction paymentTransaction);+ /// <summary>+ /// Delete an payment transaction+ /// </summary>+ /// <param name="paymentTransaction">payment transaction</param>+ Task DeletePaymentTransaction(PaymentTransaction paymentTransaction);- /// <summary>- /// Gets an payment transaction- /// </summary>- /// <param name="id">The identifier</param>- /// <returns>PaymentTransaction</returns>- Task<PaymentTransaction> GetById(string id);+ /// <summary>+ /// Gets an payment transaction+ /// </summary>+ /// <param name="id">The identifier</param>+ /// <returns>PaymentTransaction</returns>+ Task<PaymentTransaction> GetById(string id);- /// <summary>- /// Gets an payment transactions for order Ident- /// </summary>- /// <param name="orderCode">The order code</param>- /// <returns>PaymentTransaction</returns>- Task<IList<PaymentTransaction>> GetByOrderCode(string orderCode);+ /// <summary>+ /// Gets an payment transactions for order Ident+ /// </summary>+ /// <param name="orderCode">The order code</param>+ /// <returns>PaymentTransaction</returns>+ Task<IList<PaymentTransaction>> GetByOrderCode(string orderCode);- /// <summary>- /// Gets an payment transactions for order guid- /// </summary>- /// <param name="orderGuid">The order guid</param>- /// <returns>PaymentTransaction</returns>- Task<PaymentTransaction> GetOrderByGuid(Guid orderGuid);+ /// <summary>+ /// Gets an payment transactions for order guid+ /// </summary>+ /// <param name="orderGuid">The order guid</param>+ /// <returns>PaymentTransaction</returns>+ Task<PaymentTransaction> GetOrderByGuid(Guid orderGuid);- /// <summary>- /// Get an payment transactions by authorization transaction ID and payment method system name- /// </summary>- /// <param name="authorizationTransactionId">Authorization transaction ID</param>- /// <param name="paymentMethodSystemName">Payment method system name</param>- /// <returns>Order</returns>- Task<IList<PaymentTransaction>> GetByAuthorizationTransactionIdAndPaymentMethod(string authorizationTransactionId, string paymentMethodSystemName);+ /// <summary>+ /// Get an payment transactions by authorization transaction ID and payment method system name+ /// </summary>+ /// <param name="authorizationTransactionId">Authorization transaction ID</param>+ /// <param name="paymentMethodSystemName">Payment method system name</param>+ /// <returns>Order</returns>+ Task<IList<PaymentTransaction>> GetByAuthorizationTransactionIdAndPaymentMethod(string authorizationTransactionId,+ string paymentMethodSystemName);- /// <summary>- /// Search payment transactions- /// </summary>- /// <param name="orderGuid">Order ident by guid</param>- /// <param name="storeId">Store ident</param>- /// <param name="customerEmail">Customer email</param>- /// <param name="ts">Transaction status</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <returns>Page list payment transaction</returns>- Task<IPagedList<PaymentTransaction>> SearchPaymentTransactions(- Guid? orderGuid = null,- string storeId = "",- string customerEmail = "",- TransactionStatus? ts = null,- int pageIndex = 0, int pageSize = int.MaxValue,- DateTime? createdFromUtc = null,- DateTime? createdToUtc = null);+ /// <summary>+ /// Search payment transactions+ /// </summary>+ /// <param name="orderGuid">Order ident by guid</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="customerEmail">Customer email</param>+ /// <param name="ts">Transaction status</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <returns>Page list payment transaction</returns>+ Task<IPagedList<PaymentTransaction>> SearchPaymentTransactions(+ Guid? orderGuid = null,+ string storeId = "",+ string customerEmail = "",+ TransactionStatus? ts = null,+ int pageIndex = 0, int pageSize = int.MaxValue,+ DateTime? createdFromUtc = null,+ DateTime? createdToUtc = null);- /// <summary>- /// Set payment error for transaction- /// </summary>- Task SetError(string paymentTransactionId, List<string> errors);- }-}+ /// <summary>+ /// Set payment error for transaction+ /// </summary>+ Task SetError(string paymentTransactionId, List<string> errors);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IDeliveryDateService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IDeliveryDateService.csindex 94912de55..a045d1a17 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IDeliveryDateService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IDeliveryDateService.cs@@ -1,38 +1,37 @@using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;++public interface IDeliveryDateService{- public interface IDeliveryDateService- {- /// <summary>- /// Gets a delivery date- /// </summary>- /// <param name="deliveryDateId">The delivery date identifier</param>- /// <returns>Delivery date</returns>- Task<DeliveryDate> GetDeliveryDateById(string deliveryDateId);+ /// <summary>+ /// Gets a delivery date+ /// </summary>+ /// <param name="deliveryDateId">The delivery date identifier</param>+ /// <returns>Delivery date</returns>+ Task<DeliveryDate> GetDeliveryDateById(string deliveryDateId);- /// <summary>- /// Gets all delivery dates- /// </summary>- /// <returns>Delivery dates</returns>- Task<IList<DeliveryDate>> GetAllDeliveryDates();+ /// <summary>+ /// Gets all delivery dates+ /// </summary>+ /// <returns>Delivery dates</returns>+ Task<IList<DeliveryDate>> GetAllDeliveryDates();- /// <summary>- /// Inserts a delivery date- /// </summary>- /// <param name="deliveryDate">Delivery date</param>- Task InsertDeliveryDate(DeliveryDate deliveryDate);+ /// <summary>+ /// Inserts a delivery date+ /// </summary>+ /// <param name="deliveryDate">Delivery date</param>+ Task InsertDeliveryDate(DeliveryDate deliveryDate);- /// <summary>- /// Updates the delivery date- /// </summary>- /// <param name="deliveryDate">Delivery date</param>- Task UpdateDeliveryDate(DeliveryDate deliveryDate);+ /// <summary>+ /// Updates the delivery date+ /// </summary>+ /// <param name="deliveryDate">Delivery date</param>+ Task UpdateDeliveryDate(DeliveryDate deliveryDate);- /// <summary>- /// Deletes a delivery date- /// </summary>- /// <param name="deliveryDate">The delivery date</param>- Task DeleteDeliveryDate(DeliveryDate deliveryDate);- }-}+ /// <summary>+ /// Deletes a delivery date+ /// </summary>+ /// <param name="deliveryDate">The delivery date</param>+ Task DeleteDeliveryDate(DeliveryDate deliveryDate);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IPickupPointService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IPickupPointService.csindex d71861bed..51f2db5e3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IPickupPointService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IPickupPointService.cs@@ -1,45 +1,43 @@using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping-{- public interface IPickupPointService- {+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;- /// <summary>- /// Gets a warehouse- /// </summary>- /// <param name="pickupPointId">The pickup point identifier</param>- /// <returns>PickupPoint</returns>- Task<PickupPoint> GetPickupPointById(string pickupPointId);+public interface IPickupPointService+{+ /// <summary>+ /// Gets a warehouse+ /// </summary>+ /// <param name="pickupPointId">The pickup point identifier</param>+ /// <returns>PickupPoint</returns>+ Task<PickupPoint> GetPickupPointById(string pickupPointId);- /// <summary>- /// Gets all pickup points- /// </summary>- /// <returns>PickupPoints</returns>- Task<IList<PickupPoint>> GetAllPickupPoints();+ /// <summary>+ /// Gets all pickup points+ /// </summary>+ /// <returns>PickupPoints</returns>+ Task<IList<PickupPoint>> GetAllPickupPoints();- /// <summary>- /// Gets active pickup points- /// </summary>- /// <returns>PickupPoints</returns>- Task<IList<PickupPoint>> LoadActivePickupPoints(string storeId = "");+ /// <summary>+ /// Gets active pickup points+ /// </summary>+ /// <returns>PickupPoints</returns>+ Task<IList<PickupPoint>> LoadActivePickupPoints(string storeId = "");- /// <summary>- /// Inserts a pickupPoint- /// </summary>- /// <param name="pickupPoint">PickupPoint</param>- Task InsertPickupPoint(PickupPoint pickupPoint);+ /// <summary>+ /// Inserts a pickupPoint+ /// </summary>+ /// <param name="pickupPoint">PickupPoint</param>+ Task InsertPickupPoint(PickupPoint pickupPoint);- /// <summary>- /// Updates the pickupPoint- /// </summary>- /// <param name="pickupPoint">PickupPoint</param>- Task UpdatePickupPoint(PickupPoint pickupPoint);+ /// <summary>+ /// Updates the pickupPoint+ /// </summary>+ /// <param name="pickupPoint">PickupPoint</param>+ Task UpdatePickupPoint(PickupPoint pickupPoint);- /// <summary>- /// Deletes a pickupPoint- /// </summary>- /// <param name="pickupPoint">The pickupPoint</param>- Task DeletePickupPoint(PickupPoint pickupPoint);- }-}+ /// <summary>+ /// Deletes a pickupPoint+ /// </summary>+ /// <param name="pickupPoint">The pickupPoint</param>+ Task DeletePickupPoint(PickupPoint pickupPoint);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentService.csindex 73b37cdfc..10cd67a25 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentService.cs@@ -1,102 +1,103 @@using Grand.Domain;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;++/// <summary>+/// Shipment service interface+/// </summary>+public interface IShipmentService{/// <summary>- /// Shipment service interface+ /// Search shipments/// </summary>- public interface IShipmentService- {- /// <summary>- /// Search shipments- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="warehouseId">Warehouse identifier, only shipments with products from a specified warehouse will be loaded; 0 to load all orders</param>- /// <param name="shippingCountryId">Shipping country identifier; "" to load all records</param>- /// <param name="shippingStateId">Shipping state identifier; "" to load all records</param>- /// <param name="shippingCity">Shipping city; null to load all records</param>- /// <param name="trackingNumber">Search by tracking number</param>- /// <param name="loadNotShipped">A value indicating whether we should load only not shipped shipments</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Shipments</returns>- Task<IPagedList<Shipment>> GetAllShipments(string storeId = "", string vendorId = "", string warehouseId = "",- string shippingCountryId = "",- int shippingStateId = 0,- string shippingCity = null,- string trackingNumber = null,- bool loadNotShipped = false,- DateTime? createdFromUtc = null, DateTime? createdToUtc = null,- int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Get shipment by identifiers- /// </summary>- /// <param name="shipmentIds">Shipment identifiers</param>- /// <returns>Shipments</returns>- Task<IList<Shipment>> GetShipmentsByIds(string[] shipmentIds);+ /// <param name="storeId">Store identifier</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="warehouseId">+ /// Warehouse identifier, only shipments with products from a specified warehouse will be loaded;+ /// 0 to load all orders+ /// </param>+ /// <param name="shippingCountryId">Shipping country identifier; "" to load all records</param>+ /// <param name="shippingStateId">Shipping state identifier; "" to load all records</param>+ /// <param name="shippingCity">Shipping city; null to load all records</param>+ /// <param name="trackingNumber">Search by tracking number</param>+ /// <param name="loadNotShipped">A value indicating whether we should load only not shipped shipments</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Shipments</returns>+ Task<IPagedList<Shipment>> GetAllShipments(string storeId = "", string vendorId = "", string warehouseId = "",+ string shippingCountryId = "",+ int shippingStateId = 0,+ string shippingCity = null,+ string trackingNumber = null,+ bool loadNotShipped = false,+ DateTime? createdFromUtc = null, DateTime? createdToUtc = null,+ int pageIndex = 0, int pageSize = int.MaxValue);- Task<IList<Shipment>> GetShipmentsByOrder(string orderId);+ /// <summary>+ /// Get shipment by identifiers+ /// </summary>+ /// <param name="shipmentIds">Shipment identifiers</param>+ /// <returns>Shipments</returns>+ Task<IList<Shipment>> GetShipmentsByIds(string[] shipmentIds);- /// <summary>- /// Gets a shipment- /// </summary>- /// <param name="shipmentId">Shipment identifier</param>- /// <returns>Shipment</returns>- Task<Shipment> GetShipmentById(string shipmentId);+ Task<IList<Shipment>> GetShipmentsByOrder(string orderId);- /// <summary>- /// Inserts a shipment- /// </summary>- /// <param name="shipment">Shipment</param>- Task InsertShipment(Shipment shipment);+ /// <summary>+ /// Gets a shipment+ /// </summary>+ /// <param name="shipmentId">Shipment identifier</param>+ /// <returns>Shipment</returns>+ Task<Shipment> GetShipmentById(string shipmentId);- /// <summary>- /// Updates the shipment- /// </summary>- /// <param name="shipment">Shipment</param>- Task UpdateShipment(Shipment shipment);+ /// <summary>+ /// Inserts a shipment+ /// </summary>+ /// <param name="shipment">Shipment</param>+ Task InsertShipment(Shipment shipment);- /// <summary>- /// Deletes a shipment- /// </summary>- /// <param name="shipment">Shipment</param>- Task DeleteShipment(Shipment shipment);+ /// <summary>+ /// Updates the shipment+ /// </summary>+ /// <param name="shipment">Shipment</param>+ Task UpdateShipment(Shipment shipment);- #region Shipment notes+ /// <summary>+ /// Deletes a shipment+ /// </summary>+ /// <param name="shipment">Shipment</param>+ Task DeleteShipment(Shipment shipment);- /// <summary>- /// Deletes an shipment note- /// </summary>- /// <param name="shipmentNote">The shipment note</param>- Task DeleteShipmentNote(ShipmentNote shipmentNote);+ #region Shipment notes- /// <summary>- /// Insert an shipment note- /// </summary>- /// <param name="shipmentNote">The shipment note</param>- Task InsertShipmentNote(ShipmentNote shipmentNote);+ /// <summary>+ /// Deletes an shipment note+ /// </summary>+ /// <param name="shipmentNote">The shipment note</param>+ Task DeleteShipmentNote(ShipmentNote shipmentNote);+ /// <summary>+ /// Insert an shipment note+ /// </summary>+ /// <param name="shipmentNote">The shipment note</param>+ Task InsertShipmentNote(ShipmentNote shipmentNote);- /// <summary>- /// Get shipment notes for shipment- /// </summary>- /// <param name="shipmentId">Shipment identifier</param>- /// <returns>ShipmentNote</returns>- Task<IList<ShipmentNote>> GetShipmentNotes(string shipmentId);- /// <summary>- /// Get shipment note by id- /// </summary>- /// <param name="shipmentNoteId">Shipment note identifier</param>- /// <returns>ShipmentNote</returns>- Task<ShipmentNote> GetShipmentNote(string shipmentNoteId);+ /// <summary>+ /// Get shipment notes for shipment+ /// </summary>+ /// <param name="shipmentId">Shipment identifier</param>+ /// <returns>ShipmentNote</returns>+ Task<IList<ShipmentNote>> GetShipmentNotes(string shipmentId);- #endregion+ /// <summary>+ /// Get shipment note by id+ /// </summary>+ /// <param name="shipmentNoteId">Shipment note identifier</param>+ /// <returns>ShipmentNote</returns>+ Task<ShipmentNote> GetShipmentNote(string shipmentNoteId);- }-}+ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentTracker.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentTracker.csindex 480c48401..3036a7e09 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentTracker.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShipmentTracker.cs@@ -1,24 +1,23 @@using Grand.Business.Core.Enums.Checkout;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;++/// <summary>+/// Shipment tracker+/// </summary>+public interface IShipmentTracker{/// <summary>- /// Shipment tracker+ /// Gets a url for a page to show tracking info (third party tracking page)./// </summary>- public interface IShipmentTracker- {- /// <summary>- /// Gets a url for a page to show tracking info (third party tracking page).- /// </summary>- /// <param name="trackingNumber">The tracking number to track.</param>- /// <returns>A url to a tracking page.</returns>- Task<string> GetUrl(string trackingNumber);+ /// <param name="trackingNumber">The tracking number to track.</param>+ /// <returns>A url to a tracking page.</returns>+ Task<string> GetUrl(string trackingNumber);- /// <summary>- /// Gets all events for a tracking number.- /// </summary>- /// <param name="trackingNumber">The tracking number to track</param>- /// <returns>List of Shipment Events.</returns>- Task<IList<ShipmentStatusEvent>> GetShipmentEvents(string trackingNumber);- }-}+ /// <summary>+ /// Gets all events for a tracking number.+ /// </summary>+ /// <param name="trackingNumber">The tracking number to track</param>+ /// <returns>List of Shipment Events.</returns>+ Task<IList<ShipmentStatusEvent>> GetShipmentEvents(string trackingNumber);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingMethodService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingMethodService.csindex f3e033a7f..0c2db327a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingMethodService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingMethodService.cs@@ -1,42 +1,41 @@using Grand.Domain.Customers;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;++public interface IShippingMethodService{- public interface IShippingMethodService- {- /// <summary>- /// Gets a shipping method- /// </summary>- /// <param name="shippingMethodId">The shipping method identifier</param>- /// <returns>Shipping method</returns>- Task<ShippingMethod> GetShippingMethodById(string shippingMethodId);+ /// <summary>+ /// Gets a shipping method+ /// </summary>+ /// <param name="shippingMethodId">The shipping method identifier</param>+ /// <returns>Shipping method</returns>+ Task<ShippingMethod> GetShippingMethodById(string shippingMethodId);- /// <summary>- /// Gets all shipping methods- /// </summary>- /// <param name="filterByCountryId">The country identifier to filter by</param>- /// <param name="customer"></param>- /// <returns>Shipping methods</returns>- Task<IList<ShippingMethod>> GetAllShippingMethods(string filterByCountryId = "", Customer customer = null);+ /// <summary>+ /// Gets all shipping methods+ /// </summary>+ /// <param name="filterByCountryId">The country identifier to filter by</param>+ /// <param name="customer"></param>+ /// <returns>Shipping methods</returns>+ Task<IList<ShippingMethod>> GetAllShippingMethods(string filterByCountryId = "", Customer customer = null);- /// <summary>- /// Inserts a shipping method- /// </summary>- /// <param name="shippingMethod">Shipping method</param>- Task InsertShippingMethod(ShippingMethod shippingMethod);+ /// <summary>+ /// Inserts a shipping method+ /// </summary>+ /// <param name="shippingMethod">Shipping method</param>+ Task InsertShippingMethod(ShippingMethod shippingMethod);- /// <summary>- /// Updates the shipping method- /// </summary>- /// <param name="shippingMethod">Shipping method</param>- Task UpdateShippingMethod(ShippingMethod shippingMethod);+ /// <summary>+ /// Updates the shipping method+ /// </summary>+ /// <param name="shippingMethod">Shipping method</param>+ Task UpdateShippingMethod(ShippingMethod shippingMethod);- /// <summary>- /// Deletes a shipping method- /// </summary>- /// <param name="shippingMethod">The shipping method</param>- Task DeleteShippingMethod(ShippingMethod shippingMethod);- }-}+ /// <summary>+ /// Deletes a shipping method+ /// </summary>+ /// <param name="shippingMethod">The shipping method</param>+ Task DeleteShippingMethod(ShippingMethod shippingMethod);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingRateCalculationProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingRateCalculationProvider.csindex 0bab24c7d..1b4305c61 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingRateCalculationProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingRateCalculationProvider.cs@@ -1,52 +1,50 @@using Grand.Business.Core.Enums.Checkout;using Grand.Business.Core.Utilities.Checkout;-using Grand.Infrastructure.Plugins;using Grand.Domain.Orders;+using Grand.Infrastructure.Plugins;++namespace Grand.Business.Core.Interfaces.Checkout.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+/// <summary>+/// Provides an interface of Shipping rate method+/// </summary>+public interface IShippingRateCalculationProvider : IProvider{/// <summary>- /// Provides an interface of Shipping rate method+ /// Gets a Shipping rate method type+ /// </summary>+ ShippingRateCalculationType ShippingRateCalculationType { get; }++ /// <summary>+ /// Gets a shipment tracker+ /// </summary>+ IShipmentTracker ShipmentTracker { get; }++ /// <summary>+ /// Gets available shipping options+ /// </summary>+ /// <param name="getShippingOptionRequest">A request for getting shipping options</param>+ /// <returns>Represents a response of getting shipping rate options</returns>+ Task<GetShippingOptionResponse> GetShippingOptions(GetShippingOptionRequest getShippingOptionRequest);++ /// <summary>+ /// Returns a value indicating whether shipping methods should be hidden during checkout+ /// </summary>+ /// <param name="cart">Shopping cart</param>+ /// <returns>true - hide; false - display.</returns>+ Task<bool> HideShipmentMethods(IList<ShoppingCartItem> cart);++ /// <summary>+ /// Gets fixed shipping rate (if Shipping rate method allows it and the rate can be calculated before checkout).+ /// </summary>+ /// <param name="getShippingOptionRequest">A request for getting shipping options</param>+ /// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>+ Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest);++ Task<IList<string>> ValidateShippingForm(string shippingOption, IDictionary<string, string> data);++ /// <summary>+ /// Gets a route name for displaying plugin ("shipping" checkout step)/// </summary>- public interface IShippingRateCalculationProvider : IProvider- {- /// <summary>- /// Gets a Shipping rate method type- /// </summary>- ShippingRateCalculationType ShippingRateCalculationType { get; }-- /// <summary>- /// Gets available shipping options- /// </summary>- /// <param name="getShippingOptionRequest">A request for getting shipping options</param>- /// <returns>Represents a response of getting shipping rate options</returns>- Task<GetShippingOptionResponse> GetShippingOptions(GetShippingOptionRequest getShippingOptionRequest);-- /// <summary>- /// Returns a value indicating whether shipping methods should be hidden during checkout- /// </summary>- /// <param name="cart">Shopping cart</param>- /// <returns>true - hide; false - display.</returns>- Task<bool> HideShipmentMethods(IList<ShoppingCartItem> cart);-- /// <summary>- /// Gets fixed shipping rate (if Shipping rate method allows it and the rate can be calculated before checkout).- /// </summary>- /// <param name="getShippingOptionRequest">A request for getting shipping options</param>- /// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>- Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest);-- /// <summary>- /// Gets a shipment tracker- /// </summary>- IShipmentTracker ShipmentTracker { get; }-- Task<IList<string>> ValidateShippingForm(string shippingOption, IDictionary<string, string> data);-- /// <summary>- /// Gets a route name for displaying plugin ("shipping" checkout step)- /// </summary>- Task<string> GetControllerRouteName();-- }-}+ Task<string> GetControllerRouteName();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingService.csindex ff0fd6f64..a4a511df7 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IShippingService.cs@@ -4,58 +4,63 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;++/// <summary>+/// Shipping service interface+/// </summary>+public interface IShippingService{/// <summary>- /// Shipping service interface+ /// Load active Shipping rate providers/// </summary>- public interface IShippingService- {- /// <summary>- /// Load active Shipping rate providers- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="storeId">Store ident</param>- /// <param name="cart">Cart</param>- /// <returns>Shipping rate methods</returns>- Task<IList<IShippingRateCalculationProvider>> LoadActiveShippingRateCalculationProviders(Customer customer = null, string storeId = "", IList<ShoppingCartItem> cart = null);+ /// <param name="customer">Customer</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="cart">Cart</param>+ /// <returns>Shipping rate methods</returns>+ Task<IList<IShippingRateCalculationProvider>> LoadActiveShippingRateCalculationProviders(Customer customer = null,+ string storeId = "", IList<ShoppingCartItem> cart = null);- /// <summary>- /// Load Shipping rate provider by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found Shipping rate provider</returns>- IShippingRateCalculationProvider LoadShippingRateCalculationProviderBySystemName(string systemName);+ /// <summary>+ /// Load Shipping rate provider by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found Shipping rate provider</returns>+ IShippingRateCalculationProvider LoadShippingRateCalculationProviderBySystemName(string systemName);- /// <summary>- /// Load all Shipping rate providers- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="storeId">Store ident</param>- /// <returns>Shipping rate providers</returns>- IList<IShippingRateCalculationProvider> LoadAllShippingRateCalculationProviders(Customer customer = null, string storeId = "");+ /// <summary>+ /// Load all Shipping rate providers+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="storeId">Store ident</param>+ /// <returns>Shipping rate providers</returns>+ IList<IShippingRateCalculationProvider> LoadAllShippingRateCalculationProviders(Customer customer = null,+ string storeId = "");- /// <summary>- /// Create shipment packages (requests) from shopping cart- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="cart">Shopping cart</param>- /// <param name="shippingAddress">Shipping address</param>- /// <param name="store">Store</param>- /// <returns>Shipment packages</returns>- Task<GetShippingOptionRequest> CreateShippingOptionRequests(Customer customer,- IList<ShoppingCartItem> cart, Address shippingAddress, Store store);+ /// <summary>+ /// Create shipment packages (requests) from shopping cart+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="cart">Shopping cart</param>+ /// <param name="shippingAddress">Shipping address</param>+ /// <param name="store">Store</param>+ /// <returns>Shipment packages</returns>+ Task<GetShippingOptionRequest> CreateShippingOptionRequests(Customer customer,+ IList<ShoppingCartItem> cart, Address shippingAddress, Store store);- /// <summary>- /// Gets available shipping options- /// </summary>- /// <param name="customer"></param>- /// <param name="cart">Shopping cart</param>- /// <param name="shippingAddress">Shipping address</param>- /// <param name="allowedShippingRateMethodSystemName">Filter by Shipping rate method identifier; null to load shipping options of all Shipping rate methods</param>- /// <param name="store">Load records allowed only in a specified store; pass "" to load all records</param>- /// <returns>Shipping options</returns>- Task<GetShippingOptionResponse> GetShippingOptions(Customer customer, IList<ShoppingCartItem> cart, Address shippingAddress,- string allowedShippingRateMethodSystemName = "", Store store = null);- }-}+ /// <summary>+ /// Gets available shipping options+ /// </summary>+ /// <param name="customer"></param>+ /// <param name="cart">Shopping cart</param>+ /// <param name="shippingAddress">Shipping address</param>+ /// <param name="allowedShippingRateMethodSystemName">+ /// Filter by Shipping rate method identifier; null to load shipping+ /// options of all Shipping rate methods+ /// </param>+ /// <param name="store">Load records allowed only in a specified store; pass "" to load all records</param>+ /// <returns>Shipping options</returns>+ Task<GetShippingOptionResponse> GetShippingOptions(Customer customer, IList<ShoppingCartItem> cart,+ Address shippingAddress,+ string allowedShippingRateMethodSystemName = "", Store store = null);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IWarehouseService.cs b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IWarehouseService.csindex 14ef614f8..fd7cef34c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IWarehouseService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Checkout/Shipping/IWarehouseService.cs@@ -1,41 +1,37 @@using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Checkout.Shipping-{- public interface IWarehouseService- {-- /// <summary>- /// Gets a warehouse- /// </summary>- /// <param name="warehouseId">The warehouse identifier</param>- /// <returns>Warehouse</returns>- Task<Warehouse> GetWarehouseById(string warehouseId);-- /// <summary>- /// Gets all warehouses- /// </summary>- /// <returns>Warehouses</returns>- Task<IList<Warehouse>> GetAllWarehouses();-- /// <summary>- /// Inserts a warehouse- /// </summary>- /// <param name="warehouse">Warehouse</param>- Task InsertWarehouse(Warehouse warehouse);+namespace Grand.Business.Core.Interfaces.Checkout.Shipping;- /// <summary>- /// Updates the warehouse- /// </summary>- /// <param name="warehouse">Warehouse</param>- Task UpdateWarehouse(Warehouse warehouse);-- /// <summary>- /// Deletes a warehouse- /// </summary>- /// <param name="warehouse">The warehouse</param>- Task DeleteWarehouse(Warehouse warehouse);--- }-}+public interface IWarehouseService+{+ /// <summary>+ /// Gets a warehouse+ /// </summary>+ /// <param name="warehouseId">The warehouse identifier</param>+ /// <returns>Warehouse</returns>+ Task<Warehouse> GetWarehouseById(string warehouseId);++ /// <summary>+ /// Gets all warehouses+ /// </summary>+ /// <returns>Warehouses</returns>+ Task<IList<Warehouse>> GetAllWarehouses();++ /// <summary>+ /// Inserts a warehouse+ /// </summary>+ /// <param name="warehouse">Warehouse</param>+ Task InsertWarehouse(Warehouse warehouse);++ /// <summary>+ /// Updates the warehouse+ /// </summary>+ /// <param name="warehouse">Warehouse</param>+ Task UpdateWarehouse(Warehouse warehouse);++ /// <summary>+ /// Deletes a warehouse+ /// </summary>+ /// <param name="warehouse">The warehouse</param>+ Task DeleteWarehouse(Warehouse warehouse);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IBlogService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IBlogService.csindex 14755cddf..c5935deac 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IBlogService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IBlogService.cs@@ -1,176 +1,176 @@using Grand.Domain;using Grand.Domain.Blogs;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// Blog service interface+/// </summary>+public interface IBlogService{/// <summary>- /// Blog service interface- /// </summary>- public interface IBlogService- {-- /// <summary>- /// Gets a blog post- /// </summary>- /// <param name="blogPostId">Blog post identifier</param>- /// <returns>Blog post</returns>- Task<BlogPost> GetBlogPostById(string blogPostId);-- /// <summary>- /// Gets all blog posts- /// </summary>- /// <param name="storeId">The store identifier; pass "" to load all records</param>- /// <param name="dateFrom">Filter by created date; null if you want to get all records</param>- /// <param name="dateTo">Filter by created date; null if you want to get all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <param name="tag">Tag</param>- /// <param name="blogPostName">Blog post name</param>- /// <param name="categoryId">Category id</param>- /// <returns>Blog posts</returns>- Task<IPagedList<BlogPost>> GetAllBlogPosts(string storeId = "",- DateTime? dateFrom = null, DateTime? dateTo = null,- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false, string tag = null, string blogPostName = "", string categoryId = "");-- /// <summary>- /// Gets all blog posts- /// </summary>- /// <param name="storeId">The store identifier; pass "" to load all records</param>- /// <param name="tag">Tag</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Blog posts</returns>- Task<IPagedList<BlogPost>> GetAllBlogPostsByTag(string storeId = "",- string tag = "",- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);-- /// <summary>- /// Gets all blog post tags- /// </summary>- /// <param name="storeId">The store identifier; pass "" to load all records</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Blog post tags</returns>- Task<IList<BlogPostTag>> GetAllBlogPostTags(string storeId, bool showHidden = false);-- /// <summary>- /// Inserts an blog post- /// </summary>- /// <param name="blogPost">Blog post</param>- Task InsertBlogPost(BlogPost blogPost);-- /// <summary>- /// Updates the blog post- /// </summary>- /// <param name="blogPost">Blog post</param>- Task UpdateBlogPost(BlogPost blogPost);- /// <summary>- /// Deletes a blog post- /// </summary>- /// <param name="blogPost">Blog post</param>- Task DeleteBlogPost(BlogPost blogPost);-- /// <summary>- /// Gets all comments- /// </summary>- /// <param name="customerId">Customer identifier; "" to load all records</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Comments</returns>- Task<IList<BlogComment>> GetAllComments(string customerId, string storeId);-- /// <summary>- /// Gets a blog comment- /// </summary>- /// <param name="blogCommentId">Blog comment identifier</param>- /// <returns>Blog comment</returns>- Task<BlogComment> GetBlogCommentById(string blogCommentId);-- Task<IList<BlogComment>> GetBlogCommentsByBlogPostId(string blogPostId);-- /// <summary>- /// Inserts a blog post comment- /// </summary>- /// <param name="blogComment">Blog post comment</param>- Task InsertBlogComment(BlogComment blogComment);-- Task DeleteBlogComment(BlogComment blogComment);-- /// <summary>- /// Get category by id- /// </summary>- /// <param name="blogCategoryId">Blog category id</param>- /// <returns></returns>- Task<BlogCategory> GetBlogCategoryById(string blogCategoryId);-- /// <summary>- /// Get categories by post id- /// </summary>- /// <param name="blogPostId">Blog post id</param>- /// <returns></returns>- Task<IList<BlogCategory>> GetBlogCategoryByPostId(string blogPostId);-- /// <summary>- /// Get category by se name- /// </summary>- /// <param name="blogCategorySeName">Blog category se name</param>- /// <returns></returns>- Task<BlogCategory> GetBlogCategoryBySeName(string blogCategorySeName);-- /// <summary>- /// Get all blog categories- /// </summary>- /// <returns></returns>- Task<IList<BlogCategory>> GetAllBlogCategories(string storeId = "");-- /// <summary>- /// Inserts an blog category- /// </summary>- /// <param name="blogCategory">Blog category</param>- Task<BlogCategory> InsertBlogCategory(BlogCategory blogCategory);-- /// <summary>- /// Updates the blog category- /// </summary>- /// <param name="blogCategory">Blog category</param>- Task<BlogCategory> UpdateBlogCategory(BlogCategory blogCategory);-- /// <summary>- /// Delete blog category- /// </summary>- /// <param name="blogCategory">Blog category</param>- Task DeleteBlogCategory(BlogCategory blogCategory);-- /// <summary>- /// Gets a blog product- /// </summary>- /// <param name="id">id</param>- /// <returns>Blog product</returns>- Task<BlogProduct> GetBlogProductById(string id);-- /// <summary>- /// Insert an blog product- /// </summary>- /// <param name="blogProduct">Blog product</param>- Task InsertBlogProduct(BlogProduct blogProduct);-- /// <summary>- /// Update an blog product- /// </summary>- /// <param name="blogProduct">Blog product</param>- Task UpdateBlogProduct(BlogProduct blogProduct);-- /// <summary>- /// Delete an blog product- /// </summary>- /// <param name="blogProduct">Blog product</param>- Task DeleteBlogProduct(BlogProduct blogProduct);-- /// <summary>- /// Get all product by blog post id- /// </summary>- /// <returns></returns>- /// <param name="blogPostId">Blog post id</param>- Task<IList<BlogProduct>> GetProductsByBlogPostId(string blogPostId);- }-}+ /// Gets a blog post+ /// </summary>+ /// <param name="blogPostId">Blog post identifier</param>+ /// <returns>Blog post</returns>+ Task<BlogPost> GetBlogPostById(string blogPostId);++ /// <summary>+ /// Gets all blog posts+ /// </summary>+ /// <param name="storeId">The store identifier; pass "" to load all records</param>+ /// <param name="dateFrom">Filter by created date; null if you want to get all records</param>+ /// <param name="dateTo">Filter by created date; null if you want to get all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <param name="tag">Tag</param>+ /// <param name="blogPostName">Blog post name</param>+ /// <param name="categoryId">Category id</param>+ /// <returns>Blog posts</returns>+ Task<IPagedList<BlogPost>> GetAllBlogPosts(string storeId = "",+ DateTime? dateFrom = null, DateTime? dateTo = null,+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false, string tag = null,+ string blogPostName = "", string categoryId = "");++ /// <summary>+ /// Gets all blog posts+ /// </summary>+ /// <param name="storeId">The store identifier; pass "" to load all records</param>+ /// <param name="tag">Tag</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Blog posts</returns>+ Task<IPagedList<BlogPost>> GetAllBlogPostsByTag(string storeId = "",+ string tag = "",+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);++ /// <summary>+ /// Gets all blog post tags+ /// </summary>+ /// <param name="storeId">The store identifier; pass "" to load all records</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Blog post tags</returns>+ Task<IList<BlogPostTag>> GetAllBlogPostTags(string storeId, bool showHidden = false);++ /// <summary>+ /// Inserts an blog post+ /// </summary>+ /// <param name="blogPost">Blog post</param>+ Task InsertBlogPost(BlogPost blogPost);++ /// <summary>+ /// Updates the blog post+ /// </summary>+ /// <param name="blogPost">Blog post</param>+ Task UpdateBlogPost(BlogPost blogPost);++ /// <summary>+ /// Deletes a blog post+ /// </summary>+ /// <param name="blogPost">Blog post</param>+ Task DeleteBlogPost(BlogPost blogPost);++ /// <summary>+ /// Gets all comments+ /// </summary>+ /// <param name="customerId">Customer identifier; "" to load all records</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Comments</returns>+ Task<IList<BlogComment>> GetAllComments(string customerId, string storeId);++ /// <summary>+ /// Gets a blog comment+ /// </summary>+ /// <param name="blogCommentId">Blog comment identifier</param>+ /// <returns>Blog comment</returns>+ Task<BlogComment> GetBlogCommentById(string blogCommentId);++ Task<IList<BlogComment>> GetBlogCommentsByBlogPostId(string blogPostId);++ /// <summary>+ /// Inserts a blog post comment+ /// </summary>+ /// <param name="blogComment">Blog post comment</param>+ Task InsertBlogComment(BlogComment blogComment);++ Task DeleteBlogComment(BlogComment blogComment);++ /// <summary>+ /// Get category by id+ /// </summary>+ /// <param name="blogCategoryId">Blog category id</param>+ /// <returns></returns>+ Task<BlogCategory> GetBlogCategoryById(string blogCategoryId);++ /// <summary>+ /// Get categories by post id+ /// </summary>+ /// <param name="blogPostId">Blog post id</param>+ /// <returns></returns>+ Task<IList<BlogCategory>> GetBlogCategoryByPostId(string blogPostId);++ /// <summary>+ /// Get category by se name+ /// </summary>+ /// <param name="blogCategorySeName">Blog category se name</param>+ /// <returns></returns>+ Task<BlogCategory> GetBlogCategoryBySeName(string blogCategorySeName);++ /// <summary>+ /// Get all blog categories+ /// </summary>+ /// <returns></returns>+ Task<IList<BlogCategory>> GetAllBlogCategories(string storeId = "");++ /// <summary>+ /// Inserts an blog category+ /// </summary>+ /// <param name="blogCategory">Blog category</param>+ Task<BlogCategory> InsertBlogCategory(BlogCategory blogCategory);++ /// <summary>+ /// Updates the blog category+ /// </summary>+ /// <param name="blogCategory">Blog category</param>+ Task<BlogCategory> UpdateBlogCategory(BlogCategory blogCategory);++ /// <summary>+ /// Delete blog category+ /// </summary>+ /// <param name="blogCategory">Blog category</param>+ Task DeleteBlogCategory(BlogCategory blogCategory);++ /// <summary>+ /// Gets a blog product+ /// </summary>+ /// <param name="id">id</param>+ /// <returns>Blog product</returns>+ Task<BlogProduct> GetBlogProductById(string id);++ /// <summary>+ /// Insert an blog product+ /// </summary>+ /// <param name="blogProduct">Blog product</param>+ Task InsertBlogProduct(BlogProduct blogProduct);++ /// <summary>+ /// Update an blog product+ /// </summary>+ /// <param name="blogProduct">Blog product</param>+ Task UpdateBlogProduct(BlogProduct blogProduct);++ /// <summary>+ /// Delete an blog product+ /// </summary>+ /// <param name="blogProduct">Blog product</param>+ Task DeleteBlogProduct(BlogProduct blogProduct);++ /// <summary>+ /// Get all product by blog post id+ /// </summary>+ /// <returns></returns>+ /// <param name="blogPostId">Blog post id</param>+ Task<IList<BlogProduct>> GetProductsByBlogPostId(string blogPostId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IConsentCookie.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IConsentCookie.csindex 51560770a..885226cf4 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IConsentCookie.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IConsentCookie.cs@@ -1,12 +1,11 @@-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++public interface IConsentCookie{- public interface IConsentCookie- {- string SystemName { get; }- bool AllowToDisable { get; }- bool? DefaultState { get; }- int DisplayOrder { get; }- Task<string> Name();- Task<string> FullDescription();- }-}+ string SystemName { get; }+ bool AllowToDisable { get; }+ bool? DefaultState { get; }+ int DisplayOrder { get; }+ Task<string> Name();+ Task<string> FullDescription();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/ICookiePreference.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/ICookiePreference.csindex 156197c61..b1b48080f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/ICookiePreference.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/ICookiePreference.cs@@ -1,11 +1,10 @@using Grand.Domain.Customers;using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++public interface ICookiePreference{- public interface ICookiePreference- {- IList<IConsentCookie> GetConsentCookies();- Task<bool?> IsEnable(Customer customer, Store store, string cookieSystemName);- }-}+ IList<IConsentCookie> GetConsentCookies();+ Task<bool?> IsEnable(Customer customer, Store store, string cookieSystemName);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IKnowledgebaseService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IKnowledgebaseService.csindex 4d65ce08f..3977757a2 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IKnowledgebaseService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IKnowledgebaseService.cs@@ -1,151 +1,153 @@using Grand.Domain;using Grand.Domain.Knowledgebase;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++public interface IKnowledgebaseService{- public interface IKnowledgebaseService- {- /// <summary>- /// Gets knowledge base category- /// </summary>- /// <param name="id"></param>- /// <returns>knowledge base category</returns>- Task<KnowledgebaseCategory> GetKnowledgebaseCategory(string id);-- /// <summary>- /// Gets public knowledge base category- /// </summary>- /// <param name="id"></param>- /// <returns>knowledge base category</returns>- Task<KnowledgebaseCategory> GetPublicKnowledgebaseCategory(string id);-- /// <summary>- /// Gets knowledge base categories- /// </summary>- /// <returns>List of knowledge base categories</returns>- Task<List<KnowledgebaseCategory>> GetKnowledgebaseCategories();-- /// <summary>- /// Gets public(published etc) knowledge base categories- /// </summary>- /// <returns>List of public knowledge base categories</returns>- Task<List<KnowledgebaseCategory>> GetPublicKnowledgebaseCategories();-- /// <summary>- /// Inserts knowledge base category- /// </summary>- /// <param name="kc"></param>- Task InsertKnowledgebaseCategory(KnowledgebaseCategory kc);-- /// <summary>- /// Updates knowledge base category- /// </summary>- /// <param name="kc"></param>- Task UpdateKnowledgebaseCategory(KnowledgebaseCategory kc);-- /// <summary>- /// Deletes knowledge base category- /// </summary>- /// <param name="kc"></param>- Task DeleteKnowledgebaseCategory(KnowledgebaseCategory kc);-- /// <summary>- /// Gets knowledge base article- /// </summary>- /// <param name="id"></param>- /// <returns>knowledge base article</returns>- Task<KnowledgebaseArticle> GetKnowledgebaseArticle(string id);-- /// <summary>- /// Gets public knowledge base article- /// </summary>- /// <param name="id"></param>- /// <returns>knowledge base article</returns>- Task<KnowledgebaseArticle> GetPublicKnowledgebaseArticle(string id);-- /// <summary>- /// Gets knowledge base articles- /// </summary>- /// <returns>List of knowledge base articles</returns>- /// <param name="storeId">Store ident</param>- Task<List<KnowledgebaseArticle>> GetKnowledgebaseArticles(string storeId = "");-- /// <summary>- /// Gets public(published etc) knowledge base articles- /// </summary>- /// <returns>List of public knowledge base articles</returns>- Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticles();-- /// <summary>- /// Gets homepage knowledge base articles- /// </summary>- /// <returns>List of homepage knowledge base articles</returns>- Task<List<KnowledgebaseArticle>> GetHomepageKnowledgebaseArticles();-- /// <summary>- /// Gets public(published etc) knowledge base articles for category id- /// </summary>- /// <returns>List of public knowledge base articles</returns>- Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticlesByCategory(string categoryId);-- /// <summary>- /// Gets public(published etc) knowledge base articles for keyword- /// </summary>- /// <returns>List of public knowledge base articles</returns>- Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticlesByKeyword(string keyword);-- /// <summary>- /// Gets public(published etc) knowledge base categories for keyword- /// </summary>- /// <returns>List of public knowledge base categories</returns>- Task<List<KnowledgebaseCategory>> GetPublicKnowledgebaseCategoriesByKeyword(string keyword);-- /// <summary>- /// Inserts knowledge base article- /// </summary>- /// <param name="ka"></param>- Task InsertKnowledgebaseArticle(KnowledgebaseArticle ka);-- /// <summary>- /// Updates knowledge base article- /// </summary>- /// <param name="ka"></param>- Task UpdateKnowledgebaseArticle(KnowledgebaseArticle ka);-- /// <summary>- /// Deletes knowledge base article- /// </summary>- /// <param name="ka"></param>- Task DeleteKnowledgebaseArticle(KnowledgebaseArticle ka);-- /// <summary>- /// Gets knowledge base articles by category id- /// </summary>- /// <param name="id"></param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- Task<IPagedList<KnowledgebaseArticle>> GetKnowledgebaseArticlesByCategoryId(string id, int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets knowledge base articles by name- /// </summary>- /// <param name="name"></param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- Task<IPagedList<KnowledgebaseArticle>> GetKnowledgebaseArticlesByName(string name, int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets related knowledge base articles- /// </summary>- Task<IPagedList<KnowledgebaseArticle>> GetRelatedKnowledgebaseArticles(string articleId, int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Inserts an article comment- /// </summary>- /// <param name="articleComment">Article comment</param>- Task InsertArticleComment(KnowledgebaseArticleComment articleComment);-- Task<IList<KnowledgebaseArticleComment>> GetArticleCommentsByArticleId(string articleId);- Task DeleteArticleComment(KnowledgebaseArticleComment articleComment);- }-}+ /// <summary>+ /// Gets knowledge base category+ /// </summary>+ /// <param name="id"></param>+ /// <returns>knowledge base category</returns>+ Task<KnowledgebaseCategory> GetKnowledgebaseCategory(string id);++ /// <summary>+ /// Gets public knowledge base category+ /// </summary>+ /// <param name="id"></param>+ /// <returns>knowledge base category</returns>+ Task<KnowledgebaseCategory> GetPublicKnowledgebaseCategory(string id);++ /// <summary>+ /// Gets knowledge base categories+ /// </summary>+ /// <returns>List of knowledge base categories</returns>+ Task<List<KnowledgebaseCategory>> GetKnowledgebaseCategories();++ /// <summary>+ /// Gets public(published etc) knowledge base categories+ /// </summary>+ /// <returns>List of public knowledge base categories</returns>+ Task<List<KnowledgebaseCategory>> GetPublicKnowledgebaseCategories();++ /// <summary>+ /// Inserts knowledge base category+ /// </summary>+ /// <param name="kc"></param>+ Task InsertKnowledgebaseCategory(KnowledgebaseCategory kc);++ /// <summary>+ /// Updates knowledge base category+ /// </summary>+ /// <param name="kc"></param>+ Task UpdateKnowledgebaseCategory(KnowledgebaseCategory kc);++ /// <summary>+ /// Deletes knowledge base category+ /// </summary>+ /// <param name="kc"></param>+ Task DeleteKnowledgebaseCategory(KnowledgebaseCategory kc);++ /// <summary>+ /// Gets knowledge base article+ /// </summary>+ /// <param name="id"></param>+ /// <returns>knowledge base article</returns>+ Task<KnowledgebaseArticle> GetKnowledgebaseArticle(string id);++ /// <summary>+ /// Gets public knowledge base article+ /// </summary>+ /// <param name="id"></param>+ /// <returns>knowledge base article</returns>+ Task<KnowledgebaseArticle> GetPublicKnowledgebaseArticle(string id);++ /// <summary>+ /// Gets knowledge base articles+ /// </summary>+ /// <returns>List of knowledge base articles</returns>+ /// <param name="storeId">Store ident</param>+ Task<List<KnowledgebaseArticle>> GetKnowledgebaseArticles(string storeId = "");++ /// <summary>+ /// Gets public(published etc) knowledge base articles+ /// </summary>+ /// <returns>List of public knowledge base articles</returns>+ Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticles();++ /// <summary>+ /// Gets homepage knowledge base articles+ /// </summary>+ /// <returns>List of homepage knowledge base articles</returns>+ Task<List<KnowledgebaseArticle>> GetHomepageKnowledgebaseArticles();++ /// <summary>+ /// Gets public(published etc) knowledge base articles for category id+ /// </summary>+ /// <returns>List of public knowledge base articles</returns>+ Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticlesByCategory(string categoryId);++ /// <summary>+ /// Gets public(published etc) knowledge base articles for keyword+ /// </summary>+ /// <returns>List of public knowledge base articles</returns>+ Task<List<KnowledgebaseArticle>> GetPublicKnowledgebaseArticlesByKeyword(string keyword);++ /// <summary>+ /// Gets public(published etc) knowledge base categories for keyword+ /// </summary>+ /// <returns>List of public knowledge base categories</returns>+ Task<List<KnowledgebaseCategory>> GetPublicKnowledgebaseCategoriesByKeyword(string keyword);++ /// <summary>+ /// Inserts knowledge base article+ /// </summary>+ /// <param name="ka"></param>+ Task InsertKnowledgebaseArticle(KnowledgebaseArticle ka);++ /// <summary>+ /// Updates knowledge base article+ /// </summary>+ /// <param name="ka"></param>+ Task UpdateKnowledgebaseArticle(KnowledgebaseArticle ka);++ /// <summary>+ /// Deletes knowledge base article+ /// </summary>+ /// <param name="ka"></param>+ Task DeleteKnowledgebaseArticle(KnowledgebaseArticle ka);++ /// <summary>+ /// Gets knowledge base articles by category id+ /// </summary>+ /// <param name="id"></param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ Task<IPagedList<KnowledgebaseArticle>> GetKnowledgebaseArticlesByCategoryId(string id, int pageIndex = 0,+ int pageSize = int.MaxValue);++ /// <summary>+ /// Gets knowledge base articles by name+ /// </summary>+ /// <param name="name"></param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ Task<IPagedList<KnowledgebaseArticle>> GetKnowledgebaseArticlesByName(string name, int pageIndex = 0,+ int pageSize = int.MaxValue);++ /// <summary>+ /// Gets related knowledge base articles+ /// </summary>+ Task<IPagedList<KnowledgebaseArticle>> GetRelatedKnowledgebaseArticles(string articleId, int pageIndex = 0,+ int pageSize = int.MaxValue);++ /// <summary>+ /// Inserts an article comment+ /// </summary>+ /// <param name="articleComment">Article comment</param>+ Task InsertArticleComment(KnowledgebaseArticleComment articleComment);++ Task<IList<KnowledgebaseArticleComment>> GetArticleCommentsByArticleId(string articleId);+ Task DeleteArticleComment(KnowledgebaseArticleComment articleComment);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/INewsService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/INewsService.csindex e84f87dd2..a74736595 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/INewsService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/INewsService.cs@@ -1,59 +1,56 @@using Grand.Domain;using Grand.Domain.News;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// News service interface+/// </summary>+public interface INewsService{/// <summary>- /// News service interface+ /// Gets a news/// </summary>- public interface INewsService- {- /// <summary>- /// Gets a news- /// </summary>- /// <param name="newsId">The news identifier</param>- /// <returns>News</returns>- Task<NewsItem> GetNewsById(string newsId);-- /// <summary>- /// Gets all news- /// </summary>- /// <param name="storeId">Store identifier; 0 if you want to get all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="ignoreAcl"></param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <param name="newsTitle">News title</param>- /// <returns>News items</returns>- Task<IPagedList<NewsItem>> GetAllNews(string storeId = "",- int pageIndex = 0, int pageSize = int.MaxValue, bool ignoreAcl = false, bool showHidden = false, string newsTitle = "");+ /// <param name="newsId">The news identifier</param>+ /// <returns>News</returns>+ Task<NewsItem> GetNewsById(string newsId);- /// <summary>- /// Inserts a news item- /// </summary>- /// <param name="news">News item</param>- Task InsertNews(NewsItem news);+ /// <summary>+ /// Gets all news+ /// </summary>+ /// <param name="storeId">Store identifier; 0 if you want to get all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="ignoreAcl"></param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <param name="newsTitle">News title</param>+ /// <returns>News items</returns>+ Task<IPagedList<NewsItem>> GetAllNews(string storeId = "",+ int pageIndex = 0, int pageSize = int.MaxValue, bool ignoreAcl = false, bool showHidden = false,+ string newsTitle = "");- /// <summary>- /// Updates the news item- /// </summary>- /// <param name="news">News item</param>- Task UpdateNews(NewsItem news);+ /// <summary>+ /// Inserts a news item+ /// </summary>+ /// <param name="news">News item</param>+ Task InsertNews(NewsItem news);- /// <summary>- /// Deletes a news- /// </summary>- /// <param name="newsItem">News item</param>- Task DeleteNews(NewsItem newsItem);+ /// <summary>+ /// Updates the news item+ /// </summary>+ /// <param name="news">News item</param>+ Task UpdateNews(NewsItem news);- /// <summary>- /// Gets all comments- /// </summary>- /// <param name="customerId">Customer identifier; "" to load all records</param>- /// <returns>Comments</returns>- Task<IList<NewsComment>> GetAllComments(string customerId);+ /// <summary>+ /// Deletes a news+ /// </summary>+ /// <param name="newsItem">News item</param>+ Task DeleteNews(NewsItem newsItem);--- }-}+ /// <summary>+ /// Gets all comments+ /// </summary>+ /// <param name="customerId">Customer identifier; "" to load all records</param>+ /// <returns>Comments</returns>+ Task<IList<NewsComment>> GetAllComments(string customerId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IPageLayoutService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IPageLayoutService.csindex f855f297f..7f4b6edb1 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IPageLayoutService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IPageLayoutService.cs@@ -1,42 +1,40 @@using Grand.Domain.Pages;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// Page layout service interface+/// </summary>+public interface IPageLayoutService{/// <summary>- /// Page layout service interface+ /// Gets all page layouts/// </summary>- public interface IPageLayoutService- {-- /// <summary>- /// Gets all page layouts- /// </summary>- /// <returns>Page layouts</returns>- Task<IList<PageLayout>> GetAllPageLayouts();+ /// <returns>Page layouts</returns>+ Task<IList<PageLayout>> GetAllPageLayouts();- /// <summary>- /// Gets a page layout- /// </summary>- /// <param name="pageLayoutId">Page layout identifier</param>- /// <returns>Page layout</returns>- Task<PageLayout> GetPageLayoutById(string pageLayoutId);+ /// <summary>+ /// Gets a page layout+ /// </summary>+ /// <param name="pageLayoutId">Page layout identifier</param>+ /// <returns>Page layout</returns>+ Task<PageLayout> GetPageLayoutById(string pageLayoutId);- /// <summary>- /// Inserts page layout- /// </summary>- /// <param name="pageLayout">Page layout</param>- Task InsertPageLayout(PageLayout pageLayout);+ /// <summary>+ /// Inserts page layout+ /// </summary>+ /// <param name="pageLayout">Page layout</param>+ Task InsertPageLayout(PageLayout pageLayout);- /// <summary>- /// Updates the page layout- /// </summary>- /// <param name="pageLayout">Page layout</param>- Task UpdatePageLayout(PageLayout pageLayout);- /// <summary>- /// Delete page layout- /// </summary>- /// <param name="pageLayout">Page layout</param>- Task DeletePageLayout(PageLayout pageLayout);+ /// <summary>+ /// Updates the page layout+ /// </summary>+ /// <param name="pageLayout">Page layout</param>+ Task UpdatePageLayout(PageLayout pageLayout);- }-}+ /// <summary>+ /// Delete page layout+ /// </summary>+ /// <param name="pageLayout">Page layout</param>+ Task DeletePageLayout(PageLayout pageLayout);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IPageService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IPageService.csindex a4fe9f526..f24c1189a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IPageService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IPageService.cs@@ -1,52 +1,50 @@using Grand.Domain.Pages;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// Page service interface+/// </summary>+public interface IPageService{/// <summary>- /// Page service interface+ /// Gets a page/// </summary>- public interface IPageService- {-- /// <summary>- /// Gets a page- /// </summary>- /// <param name="pageId">The page identifier</param>- /// <returns>Page</returns>- Task<Page> GetPageById(string pageId);+ /// <param name="pageId">The page identifier</param>+ /// <returns>Page</returns>+ Task<Page> GetPageById(string pageId);- /// <summary>- /// Gets a page- /// </summary>- /// <param name="systemName">The page system name</param>- /// <param name="storeId">Store identifier; pass 0 to ignore filtering by store and load the first one</param>- /// <returns>Page</returns>- Task<Page> GetPageBySystemName(string systemName, string storeId = "");+ /// <summary>+ /// Gets a page+ /// </summary>+ /// <param name="systemName">The page system name</param>+ /// <param name="storeId">Store identifier; pass 0 to ignore filtering by store and load the first one</param>+ /// <returns>Page</returns>+ Task<Page> GetPageBySystemName(string systemName, string storeId = "");- /// <summary>- /// Gets all pages- /// </summary>- /// <param name="storeId">Store identifier; pass "" to load all records</param>- /// <param name="ignoreAcl"></param>- /// <returns>Pages</returns>- Task<IList<Page>> GetAllPages(string storeId, bool ignoreAcl = false);+ /// <summary>+ /// Gets all pages+ /// </summary>+ /// <param name="storeId">Store identifier; pass "" to load all records</param>+ /// <param name="ignoreAcl"></param>+ /// <returns>Pages</returns>+ Task<IList<Page>> GetAllPages(string storeId, bool ignoreAcl = false);- /// <summary>- /// Inserts a page- /// </summary>- /// <param name="page">Page</param>- Task InsertPage(Page page);+ /// <summary>+ /// Inserts a page+ /// </summary>+ /// <param name="page">Page</param>+ Task InsertPage(Page page);- /// <summary>- /// Updates the page- /// </summary>- /// <param name="page">Page</param>- Task UpdatePage(Page page);- /// <summary>- /// Deletes a page- /// </summary>- /// <param name="page">Page</param>- Task DeletePage(Page page);+ /// <summary>+ /// Updates the page+ /// </summary>+ /// <param name="page">Page</param>+ Task UpdatePage(Page page);- }-}+ /// <summary>+ /// Deletes a page+ /// </summary>+ /// <param name="page">Page</param>+ Task DeletePage(Page page);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IRobotsTxtService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IRobotsTxtService.csindex 311f41561..a77701aab 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IRobotsTxtService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IRobotsTxtService.cs@@ -1,32 +1,31 @@using Grand.Domain.Common;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++public interface IRobotsTxtService{- public interface IRobotsTxtService- {- /// <summary>- /// Get a robots txt- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <returns>RobotsTxt</returns>- Task<RobotsTxt> GetRobotsTxt(string storeId = "");+ /// <summary>+ /// Get a robots txt+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <returns>RobotsTxt</returns>+ Task<RobotsTxt> GetRobotsTxt(string storeId = "");- /// <summary>- /// Insert a RobotsTxt- /// </summary>- /// <param name="robotsTxt">RobotsTxt</param>- Task InsertRobotsTxt(RobotsTxt robotsTxt);+ /// <summary>+ /// Insert a RobotsTxt+ /// </summary>+ /// <param name="robotsTxt">RobotsTxt</param>+ Task InsertRobotsTxt(RobotsTxt robotsTxt);- /// <summary>- /// Update a RobotsTxt- /// </summary>- /// <param name="robotsTxt">RobotsTxt</param>- Task UpdateRobotsTxt(RobotsTxt robotsTxt);+ /// <summary>+ /// Update a RobotsTxt+ /// </summary>+ /// <param name="robotsTxt">RobotsTxt</param>+ Task UpdateRobotsTxt(RobotsTxt robotsTxt);- /// <summary>- /// Delete a RobotsTxt- /// </summary>- /// <param name="robotsTxt">RobotsTxt</param>- Task DeleteRobotsTxt(RobotsTxt robotsTxt);- }-}+ /// <summary>+ /// Delete a RobotsTxt+ /// </summary>+ /// <param name="robotsTxt">RobotsTxt</param>+ Task DeleteRobotsTxt(RobotsTxt robotsTxt);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetProvider.csindex 0378567f8..3da33ba0f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetProvider.cs@@ -1,22 +1,20 @@using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// Provides an interface for creating widgets+/// </summary>+public interface IWidgetProvider : IProvider{/// <summary>- /// Provides an interface for creating widgets+ /// Gets widget zones where this widget for rendered/// </summary>- public interface IWidgetProvider : IProvider- {- /// <summary>- /// Gets widget zones where this widget for rendered- /// </summary>- /// <returns>Widget zones</returns>- Task<IList<string>> GetWidgetZones();-- /// <summary>- /// Gets a view component name for displaying in public store- /// </summary>- Task<string> GetPublicViewComponentName(string widgetZone);+ /// <returns>Widget zones</returns>+ Task<IList<string>> GetWidgetZones();- }-}+ /// <summary>+ /// Gets a view component name for displaying in public store+ /// </summary>+ Task<string> GetPublicViewComponentName(string widgetZone);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetService.cs b/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetService.csindex f0de8664b..995f3efcb 100644--- a/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Cms/IWidgetService.cs@@ -1,42 +1,42 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Cms+namespace Grand.Business.Core.Interfaces.Cms;++/// <summary>+/// Widget service interface+/// </summary>+public interface IWidgetService{/// <summary>- /// Widget service interface+ /// Load active widgets/// </summary>- public interface IWidgetService- {- /// <summary>- /// Load active widgets- /// </summary>- /// <param name="storeId">Store ident</param>- /// <param name="customer">Customer</param>- /// <returns>Widgets</returns>- IList<IWidgetProvider> LoadActiveWidgets(string storeId = "", Customer customer = null);+ /// <param name="storeId">Store ident</param>+ /// <param name="customer">Customer</param>+ /// <returns>Widgets</returns>+ IList<IWidgetProvider> LoadActiveWidgets(string storeId = "", Customer customer = null);- /// <summary>- /// Load active widgets- /// </summary>- /// <param name="widgetZone">Widget zone</param>- /// <param name="storeId">Store ident</param>- /// <param name="customer">Customer</param>- /// <returns>Widgets</returns>- Task<IList<IWidgetProvider>> LoadActiveWidgetsByWidgetZone(string widgetZone, string storeId = "", Customer customer = null);+ /// <summary>+ /// Load active widgets+ /// </summary>+ /// <param name="widgetZone">Widget zone</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="customer">Customer</param>+ /// <returns>Widgets</returns>+ Task<IList<IWidgetProvider>> LoadActiveWidgetsByWidgetZone(string widgetZone, string storeId = "",+ Customer customer = null);- /// <summary>- /// Load widget by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found widget</returns>- IWidgetProvider LoadWidgetBySystemName(string systemName);+ /// <summary>+ /// Load widget by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found widget</returns>+ IWidgetProvider LoadWidgetBySystemName(string systemName);- /// <summary>- /// Load all widgets- /// </summary>- /// <param name="storeId">Store ident</param>- /// <param name="customer">Customer</param>- /// <returns>Widgets</returns>- IList<IWidgetProvider> LoadAllWidgets(string storeId = "", Customer customer = null);- }-}+ /// <summary>+ /// Load all widgets+ /// </summary>+ /// <param name="storeId">Store ident</param>+ /// <param name="customer">Customer</param>+ /// <returns>Widgets</returns>+ IList<IWidgetProvider> LoadAllWidgets(string storeId = "", Customer customer = null);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeParser.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeParser.csindex 0378aabf2..0c074c2fe 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeParser.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeParser.cs@@ -1,55 +1,55 @@using Grand.Domain.Common;using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Common.Addresses+namespace Grand.Business.Core.Interfaces.Common.Addresses;++/// <summary>+/// Address attribute parser interface+/// </summary>+public interface IAddressAttributeParser{/// <summary>- /// Address attribute parser interface+ /// Gets selected address attributes/// </summary>- public interface IAddressAttributeParser- {- /// <summary>- /// Gets selected address attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Selected address attributes</returns>- Task<IList<AddressAttribute>> ParseAddressAttributes(IList<CustomAttribute> customAttributes);+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Selected address attributes</returns>+ Task<IList<AddressAttribute>> ParseAddressAttributes(IList<CustomAttribute> customAttributes);- /// <summary>- /// Get address attribute values- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Address attribute values</returns>- Task<IList<AddressAttributeValue>> ParseAddressAttributeValues(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Get address attribute values+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Address attribute values</returns>+ Task<IList<AddressAttributeValue>> ParseAddressAttributeValues(IList<CustomAttribute> customAttributes);- /// <summary>- /// Adds an attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="attribute">Address attribute</param>- /// <param name="value">Value</param>- /// <returns>Attributes</returns>- IList<CustomAttribute> AddAddressAttribute(IList<CustomAttribute> customAttributes, AddressAttribute attribute, string value);+ /// <summary>+ /// Adds an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="attribute">Address attribute</param>+ /// <param name="value">Value</param>+ /// <returns>Attributes</returns>+ IList<CustomAttribute> AddAddressAttribute(IList<CustomAttribute> customAttributes, AddressAttribute attribute,+ string value);- /// <summary>- /// Validates address attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetAttributeWarnings(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Validates address attributes+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetAttributeWarnings(IList<CustomAttribute> customAttributes);- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="language">Language</param>- /// <param name="customAttributes">Attributes</param>- /// <param name="separator">Separator</param>- /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(- Language language,- IList<CustomAttribute> customAttributes,- string separator = "<br />",- bool htmlEncode = true);- }-}+ /// <summary>+ /// Formats attributes+ /// </summary>+ /// <param name="language">Language</param>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="separator">Separator</param>+ /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(+ Language language,+ IList<CustomAttribute> customAttributes,+ string separator = "<br />",+ bool htmlEncode = true);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeService.csindex 59c79f94d..ad4223fba 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Addresses/IAddressAttributeService.cs@@ -1,59 +1,58 @@using Grand.Domain.Common;-namespace Grand.Business.Core.Interfaces.Common.Addresses+namespace Grand.Business.Core.Interfaces.Common.Addresses;++/// <summary>+/// Address attribute service+/// </summary>+public interface IAddressAttributeService{/// <summary>- /// Address attribute service- /// </summary>- public interface IAddressAttributeService- {- /// <summary>- /// Gets all address attributes- /// </summary>- /// <returns>Address attributes</returns>- Task<IList<AddressAttribute>> GetAllAddressAttributes();-- /// <summary>- /// Gets an address attribute- /// </summary>- /// <param name="addressAttributeId">Address attribute identifier</param>- /// <returns>Address attribute</returns>- Task<AddressAttribute> GetAddressAttributeById(string addressAttributeId);-- /// <summary>- /// Inserts an address attribute- /// </summary>- /// <param name="addressAttribute">Address attribute</param>- Task InsertAddressAttribute(AddressAttribute addressAttribute);-- /// <summary>- /// Updates the address attribute- /// </summary>- /// <param name="addressAttribute">Address attribute</param>- Task UpdateAddressAttribute(AddressAttribute addressAttribute);-- /// <summary>- /// Deletes an address attribute- /// </summary>- /// <param name="addressAttribute">Address attribute</param>- Task DeleteAddressAttribute(AddressAttribute addressAttribute);-- /// <summary>- /// Inserts a address attribute value- /// </summary>- /// <param name="addressAttributeValue">Address attribute value</param>- Task InsertAddressAttributeValue(AddressAttributeValue addressAttributeValue);-- /// <summary>- /// Updates the address attribute value- /// </summary>- /// <param name="addressAttributeValue">Address attribute value</param>- Task UpdateAddressAttributeValue(AddressAttributeValue addressAttributeValue);- /// <summary>- /// Deletes an address attribute value- /// </summary>- /// <param name="addressAttributeValue">Address attribute value</param>- Task DeleteAddressAttributeValue(AddressAttributeValue addressAttributeValue);-- }-}+ /// Gets all address attributes+ /// </summary>+ /// <returns>Address attributes</returns>+ Task<IList<AddressAttribute>> GetAllAddressAttributes();++ /// <summary>+ /// Gets an address attribute+ /// </summary>+ /// <param name="addressAttributeId">Address attribute identifier</param>+ /// <returns>Address attribute</returns>+ Task<AddressAttribute> GetAddressAttributeById(string addressAttributeId);++ /// <summary>+ /// Inserts an address attribute+ /// </summary>+ /// <param name="addressAttribute">Address attribute</param>+ Task InsertAddressAttribute(AddressAttribute addressAttribute);++ /// <summary>+ /// Updates the address attribute+ /// </summary>+ /// <param name="addressAttribute">Address attribute</param>+ Task UpdateAddressAttribute(AddressAttribute addressAttribute);++ /// <summary>+ /// Deletes an address attribute+ /// </summary>+ /// <param name="addressAttribute">Address attribute</param>+ Task DeleteAddressAttribute(AddressAttribute addressAttribute);++ /// <summary>+ /// Inserts a address attribute value+ /// </summary>+ /// <param name="addressAttributeValue">Address attribute value</param>+ Task InsertAddressAttributeValue(AddressAttributeValue addressAttributeValue);++ /// <summary>+ /// Updates the address attribute value+ /// </summary>+ /// <param name="addressAttributeValue">Address attribute value</param>+ Task UpdateAddressAttributeValue(AddressAttributeValue addressAttributeValue);++ /// <summary>+ /// Deletes an address attribute value+ /// </summary>+ /// <param name="addressAttributeValue">Address attribute value</param>+ Task DeleteAddressAttributeValue(AddressAttributeValue addressAttributeValue);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Configuration/ISettingService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Configuration/ISettingService.csindex a23fb1a31..9c0e6266e 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Configuration/ISettingService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Configuration/ISettingService.cs@@ -1,99 +1,97 @@using Grand.Domain.Configuration;-namespace Grand.Business.Core.Interfaces.Common.Configuration+namespace Grand.Business.Core.Interfaces.Common.Configuration;++/// <summary>+/// Setting service interface+/// </summary>+public interface ISettingService{/// <summary>- /// Setting service interface+ /// Adds a setting/// </summary>- public interface ISettingService- {-- /// <summary>- /// Adds a setting- /// </summary>- /// <param name="setting">Setting</param>- /// <param name="clearCache">A value indicating whether to clear cache after setting update</param>- Task InsertSetting(Setting setting, bool clearCache = true);+ /// <param name="setting">Setting</param>+ /// <param name="clearCache">A value indicating whether to clear cache after setting update</param>+ Task InsertSetting(Setting setting, bool clearCache = true);- /// <summary>- /// Update setting- /// </summary>- /// <param name="setting"></param>- /// <param name="clearCache"></param>- /// <returns></returns>- Task UpdateSetting(Setting setting, bool clearCache = true);+ /// <summary>+ /// Update setting+ /// </summary>+ /// <param name="setting"></param>+ /// <param name="clearCache"></param>+ /// <returns></returns>+ Task UpdateSetting(Setting setting, bool clearCache = true);- /// <summary>- /// Deletes a setting- /// </summary>- /// <param name="setting">Setting</param>- Task DeleteSetting(Setting setting);+ /// <summary>+ /// Deletes a setting+ /// </summary>+ /// <param name="setting">Setting</param>+ Task DeleteSetting(Setting setting);- /// <summary>- /// Gets a setting by ident- /// </summary>- /// <param name="settingId">Setting ident</param>- /// <returns>Setting</returns>- Task<Setting> GetSettingById(string settingId);+ /// <summary>+ /// Gets a setting by ident+ /// </summary>+ /// <param name="settingId">Setting ident</param>+ /// <returns>Setting</returns>+ Task<Setting> GetSettingById(string settingId);- /// <summary>- /// Get setting value by key- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="key">Key</param>- /// <param name="storeId">Store identifier</param>- /// <param name="defaultValue">Default value</param>- /// <returns>Setting value</returns>- T GetSettingByKey<T>(string key, T defaultValue = default, string storeId = "");+ /// <summary>+ /// Get setting value by key+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="key">Key</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="defaultValue">Default value</param>+ /// <returns>Setting value</returns>+ T GetSettingByKey<T>(string key, T defaultValue = default, string storeId = "");- /// <summary>- /// Set setting value- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="key">Key</param>- /// <param name="value">Value</param>- /// <param name="storeId">Store identifier</param>- /// <param name="clearCache">A value indicating whether to clear cache after setting update</param>- Task SetSetting<T>(string key, T value, string storeId = "", bool clearCache = true);+ /// <summary>+ /// Set setting value+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="key">Key</param>+ /// <param name="value">Value</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="clearCache">A value indicating whether to clear cache after setting update</param>+ Task SetSetting<T>(string key, T value, string storeId = "", bool clearCache = true);- /// <summary>- /// Gets all settings- /// </summary>- /// <returns>Settings</returns>- IList<Setting> GetAllSettings();+ /// <summary>+ /// Gets all settings+ /// </summary>+ /// <returns>Settings</returns>+ IList<Setting> GetAllSettings();- /// <summary>- /// Load settings- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="storeId">Store identifier for which settings should be loaded</param>- T LoadSetting<T>(string storeId = "") where T : ISettings, new();+ /// <summary>+ /// Load settings+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="storeId">Store identifier for which settings should be loaded</param>+ T LoadSetting<T>(string storeId = "") where T : ISettings, new();- /// <summary>- /// Load settings- /// </summary>- /// <param name="type"></param>- /// <param name="storeId"></param>- /// <returns></returns>- ISettings LoadSetting(Type type, string storeId = "");+ /// <summary>+ /// Load settings+ /// </summary>+ /// <param name="type"></param>+ /// <param name="storeId"></param>+ /// <returns></returns>+ ISettings LoadSetting(Type type, string storeId = "");- /// <summary>- /// Save settings object- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="storeId">Store identifier</param>- /// <param name="settings">Setting instance</param>- Task SaveSetting<T>(T settings, string storeId = "") where T : ISettings, new();+ /// <summary>+ /// Save settings object+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="storeId">Store identifier</param>+ /// <param name="settings">Setting instance</param>+ Task SaveSetting<T>(T settings, string storeId = "") where T : ISettings, new();- /// <summary>- /// Delete all settings- /// </summary>- /// <typeparam name="T">Type</typeparam>- Task DeleteSetting<T>() where T : ISettings, new();+ /// <summary>+ /// Delete all settings+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ Task DeleteSetting<T>() where T : ISettings, new();- /// <summary>- /// Clear cache- /// </summary>- Task ClearCache();- }-}+ /// <summary>+ /// Clear cache+ /// </summary>+ Task ClearCache();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICountryService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICountryService.csindex 55ece3ff4..d9ab048a5 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICountryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICountryService.cs@@ -1,118 +1,117 @@using Grand.Domain.Directory;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++/// <summary>+/// Country service interface+/// </summary>+public interface ICountryService{/// <summary>- /// Country service interface+ /// Gets all countries+ /// </summary>+ /// <param name="languageId">Language identifier</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Countries</returns>+ Task<IList<Country>> GetAllCountries(string languageId = "", string storeId = "", bool showHidden = false);++ /// <summary>+ /// Gets all countries that allow billing+ /// </summary>+ /// <param name="languageId">Language identifier.</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Countries</returns>+ Task<IList<Country>>+ GetAllCountriesForBilling(string languageId = "", string storeId = "", bool showHidden = false);++ /// <summary>+ /// Gets all countries that allow shipping+ /// </summary>+ /// <param name="languageId">Language identifier.</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Countries</returns>+ Task<IList<Country>> GetAllCountriesForShipping(string languageId = "", string storeId = "",+ bool showHidden = false);++ /// <summary>+ /// Gets a country+ /// </summary>+ /// <param name="countryId">Country identifier</param>+ /// <returns>Country</returns>+ Task<Country> GetCountryById(string countryId);++ /// <summary>+ /// Get countries by identifiers+ /// </summary>+ /// <param name="countryIds">Country identifiers</param>+ /// <returns>Countries</returns>+ Task<IList<Country>> GetCountriesByIds(string[] countryIds);++ /// <summary>+ /// Gets a country by two letter ISO code+ /// </summary>+ /// <param name="twoLetterIsoCode">Country two letter ISO code</param>+ /// <returns>Country</returns>+ Task<Country> GetCountryByTwoLetterIsoCode(string twoLetterIsoCode);++ /// <summary>+ /// Gets a country by three letter ISO code+ /// </summary>+ /// <param name="threeLetterIsoCode">Country three letter ISO code</param>+ /// <returns>Country</returns>+ Task<Country> GetCountryByThreeLetterIsoCode(string threeLetterIsoCode);++ /// <summary>+ /// Inserts a country+ /// </summary>+ /// <param name="country">Country</param>+ Task InsertCountry(Country country);++ /// <summary>+ /// Updates the country+ /// </summary>+ /// <param name="country">Country</param>+ Task UpdateCountry(Country country);++ /// <summary>+ /// Deletes a country+ /// </summary>+ /// <param name="country">Country</param>+ Task DeleteCountry(Country country);++ #region State province++ /// <summary>+ /// Gets a state/province collection by country identifier/// </summary>- public interface ICountryService- {- /// <summary>- /// Gets all countries- /// </summary>- /// <param name="languageId">Language identifier</param>- /// <param name="storeId">Store ident</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Countries</returns>- Task<IList<Country>> GetAllCountries(string languageId = "", string storeId = "", bool showHidden = false);- /// <summary>- /// Gets all countries that allow billing- /// </summary>- /// <param name="languageId">Language identifier.</param>- /// <param name="storeId">Store ident</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Countries</returns>- Task<IList<Country>> GetAllCountriesForBilling(string languageId = "", string storeId = "", bool showHidden = false);-- /// <summary>- /// Gets all countries that allow shipping- /// </summary>- /// <param name="languageId">Language identifier.</param>- /// <param name="storeId">Store ident</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Countries</returns>- Task<IList<Country>> GetAllCountriesForShipping(string languageId = "", string storeId = "", bool showHidden = false);-- /// <summary>- /// Gets a country- /// </summary>- /// <param name="countryId">Country identifier</param>- /// <returns>Country</returns>- Task<Country> GetCountryById(string countryId);-- /// <summary>- /// Get countries by identifiers- /// </summary>- /// <param name="countryIds">Country identifiers</param>- /// <returns>Countries</returns>- Task<IList<Country>> GetCountriesByIds(string[] countryIds);-- /// <summary>- /// Gets a country by two letter ISO code- /// </summary>- /// <param name="twoLetterIsoCode">Country two letter ISO code</param>- /// <returns>Country</returns>- Task<Country> GetCountryByTwoLetterIsoCode(string twoLetterIsoCode);-- /// <summary>- /// Gets a country by three letter ISO code- /// </summary>- /// <param name="threeLetterIsoCode">Country three letter ISO code</param>- /// <returns>Country</returns>- Task<Country> GetCountryByThreeLetterIsoCode(string threeLetterIsoCode);-- /// <summary>- /// Inserts a country- /// </summary>- /// <param name="country">Country</param>- Task InsertCountry(Country country);-- /// <summary>- /// Updates the country- /// </summary>- /// <param name="country">Country</param>- Task UpdateCountry(Country country);-- /// <summary>- /// Deletes a country- /// </summary>- /// <param name="country">Country</param>- Task DeleteCountry(Country country);-- #region State province-- /// <summary>- /// Gets a state/province collection by country identifier- /// </summary>- /// <param name="countryId">Country identifier</param>- /// <param name="languageId">Language identifier.</param>- /// <returns>States</returns>- Task<IList<StateProvince>> GetStateProvincesByCountryId(string countryId, string languageId = "");-- /// <summary>- /// Inserts a state/province- /// </summary>- /// <param name="stateProvince">State/province</param>- /// <param name="countryId">Country ident</param>- Task InsertStateProvince(StateProvince stateProvince, string countryId);-- /// <summary>- /// Updates a state/province- /// </summary>- /// <param name="stateProvince">State/province</param>- /// <param name="countryId">Country ident</param>- Task UpdateStateProvince(StateProvince stateProvince, string countryId);-- /// <summary>- /// Deletes a state/province- /// </summary>- /// <param name="stateProvince">The state/province</param>- /// <param name="countryId">Country ident</param>- Task DeleteStateProvince(StateProvince stateProvince, string countryId);--- #endregion--- }+ /// <param name="countryId">Country identifier</param>+ /// <param name="languageId">Language identifier.</param>+ /// <returns>States</returns>+ Task<IList<StateProvince>> GetStateProvincesByCountryId(string countryId, string languageId = "");++ /// <summary>+ /// Inserts a state/province+ /// </summary>+ /// <param name="stateProvince">State/province</param>+ /// <param name="countryId">Country ident</param>+ Task InsertStateProvince(StateProvince stateProvince, string countryId);++ /// <summary>+ /// Updates a state/province+ /// </summary>+ /// <param name="stateProvince">State/province</param>+ /// <param name="countryId">Country ident</param>+ Task UpdateStateProvince(StateProvince stateProvince, string countryId);++ /// <summary>+ /// Deletes a state/province+ /// </summary>+ /// <param name="stateProvince">The state/province</param>+ /// <param name="countryId">Country ident</param>+ Task DeleteStateProvince(StateProvince stateProvince, string countryId);++ #endregion}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICurrencyService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICurrencyService.csindex 2161d8f53..e3454264b 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICurrencyService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/ICurrencyService.cs@@ -1,111 +1,110 @@using Grand.Domain.Directory;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++/// <summary>+/// Currency service+/// </summary>+public interface ICurrencyService{/// <summary>- /// Currency service+ /// Gets a currency/// </summary>- public interface ICurrencyService- {- /// <summary>- /// Gets a currency- /// </summary>- /// <param name="currencyId">Currency identifier</param>- /// <returns>Currency</returns>- Task<Currency> GetCurrencyById(string currencyId);+ /// <param name="currencyId">Currency identifier</param>+ /// <returns>Currency</returns>+ Task<Currency> GetCurrencyById(string currencyId);- /// <summary>- /// Gets primary store currency- /// </summary>- /// <returns>Currency</returns>- Task<Currency> GetPrimaryStoreCurrency();+ /// <summary>+ /// Gets primary store currency+ /// </summary>+ /// <returns>Currency</returns>+ Task<Currency> GetPrimaryStoreCurrency();- /// <summary>- /// Gets primary exchange currency- /// </summary>- /// <returns>Currency</returns>- Task<Currency> GetPrimaryExchangeRateCurrency();+ /// <summary>+ /// Gets primary exchange currency+ /// </summary>+ /// <returns>Currency</returns>+ Task<Currency> GetPrimaryExchangeRateCurrency();- /// <summary>- /// Gets a currency by code- /// </summary>- /// <param name="currencyCode">Currency code</param>- /// <returns>Currency</returns>- Task<Currency> GetCurrencyByCode(string currencyCode);+ /// <summary>+ /// Gets a currency by code+ /// </summary>+ /// <param name="currencyCode">Currency code</param>+ /// <returns>Currency</returns>+ Task<Currency> GetCurrencyByCode(string currencyCode);- /// <summary>- /// Gets all currencies- /// </summary>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <param name="storeId">Load records allowed only in a specified store; pass "" to load all records</param>- /// <returns>Currencies</returns>- Task<IList<Currency>> GetAllCurrencies(bool showHidden = false, string storeId = "");+ /// <summary>+ /// Gets all currencies+ /// </summary>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <param name="storeId">Load records allowed only in a specified store; pass "" to load all records</param>+ /// <returns>Currencies</returns>+ Task<IList<Currency>> GetAllCurrencies(bool showHidden = false, string storeId = "");- /// <summary>- /// Inserts a currency- /// </summary>- /// <param name="currency">Currency</param>- Task InsertCurrency(Currency currency);+ /// <summary>+ /// Inserts a currency+ /// </summary>+ /// <param name="currency">Currency</param>+ Task InsertCurrency(Currency currency);- /// <summary>- /// Updates the currency- /// </summary>- /// <param name="currency">Currency</param>- Task UpdateCurrency(Currency currency);+ /// <summary>+ /// Updates the currency+ /// </summary>+ /// <param name="currency">Currency</param>+ Task UpdateCurrency(Currency currency);- /// <summary>- /// Deletes currency- /// </summary>- /// <param name="currency">Currency</param>- Task DeleteCurrency(Currency currency);+ /// <summary>+ /// Deletes currency+ /// </summary>+ /// <param name="currency">Currency</param>+ Task DeleteCurrency(Currency currency);- /// <summary>- /// Converts currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="exchangeRate">Currency exchange rate</param>- /// <returns>Converted value</returns>- double ConvertCurrency(double amount, double exchangeRate);+ /// <summary>+ /// Converts currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="exchangeRate">Currency exchange rate</param>+ /// <returns>Converted value</returns>+ double ConvertCurrency(double amount, double exchangeRate);- /// <summary>- /// Converts currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="sourceCurrencyCode">Source currency code</param>- /// <param name="targetCurrencyCode">Target currency code</param>- /// <returns>Converted value</returns>- Task<double> ConvertCurrency(double amount, Currency sourceCurrencyCode, Currency targetCurrencyCode);+ /// <summary>+ /// Converts currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="sourceCurrencyCode">Source currency code</param>+ /// <param name="targetCurrencyCode">Target currency code</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertCurrency(double amount, Currency sourceCurrencyCode, Currency targetCurrencyCode);- /// <summary>- /// Converts to primary exchange rate currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="sourceCurrencyCode">Source currency code</param>- /// <returns>Converted value</returns>- Task<double> ConvertToPrimaryExchangeRateCurrency(double amount, Currency sourceCurrencyCode);+ /// <summary>+ /// Converts to primary exchange rate currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="sourceCurrencyCode">Source currency code</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertToPrimaryExchangeRateCurrency(double amount, Currency sourceCurrencyCode);- /// <summary>- /// Converts from primary exchange rate currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="targetCurrencyCode">Target currency code</param>- /// <returns>Converted value</returns>- Task<double> ConvertFromPrimaryExchangeRateCurrency(double amount, Currency targetCurrencyCode);+ /// <summary>+ /// Converts from primary exchange rate currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="targetCurrencyCode">Target currency code</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertFromPrimaryExchangeRateCurrency(double amount, Currency targetCurrencyCode);- /// <summary>- /// Converts to primary store currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="sourceCurrencyCode">Source currency code</param>- /// <returns>Converted value</returns>- Task<double> ConvertToPrimaryStoreCurrency(double amount, Currency sourceCurrencyCode);+ /// <summary>+ /// Converts to primary store currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="sourceCurrencyCode">Source currency code</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertToPrimaryStoreCurrency(double amount, Currency sourceCurrencyCode);- /// <summary>- /// Converts from primary store currency- /// </summary>- /// <param name="amount">Amount</param>- /// <param name="targetCurrencyCode">Target currency code</param>- /// <returns>Converted value</returns>- Task<double> ConvertFromPrimaryStoreCurrency(double amount, Currency targetCurrencyCode);- }+ /// <summary>+ /// Converts from primary store currency+ /// </summary>+ /// <param name="amount">Amount</param>+ /// <param name="targetCurrencyCode">Target currency code</param>+ /// <returns>Converted value</returns>+ Task<double> ConvertFromPrimaryStoreCurrency(double amount, Currency targetCurrencyCode);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IDateTimeService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IDateTimeService.csindex dbc2f2170..11e275fa3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IDateTimeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IDateTimeService.cs@@ -1,75 +1,83 @@using System.Collections.ObjectModel;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++/// <summary>+/// Represents a datetime service+/// </summary>+public interface IDateTimeService{/// <summary>- /// Represents a datetime service+ /// Gets the current user time zone/// </summary>- public interface IDateTimeService- {- /// <summary>- /// Retrieves a System.TimeZoneInfo object from the registry based on its identifier.- /// </summary>- /// <param name="id">The time zone identifier, which corresponds to the System.TimeZoneInfo.Id property.</param>- /// <returns>A System.TimeZoneInfo object whose identifier is the value of the id parameter.</returns>- TimeZoneInfo FindTimeZoneById(string id);+ TimeZoneInfo CurrentTimeZone { get; }- /// <summary>- /// Returns a sorted collection of all the time zones- /// </summary>- /// <returns>A read-only collection of System.TimeZoneInfo objects.</returns>- ReadOnlyCollection<TimeZoneInfo> GetSystemTimeZones();+ /// <summary>+ /// Retrieves a System.TimeZoneInfo object from the registry based on its identifier.+ /// </summary>+ /// <param name="id">The time zone identifier, which corresponds to the System.TimeZoneInfo.Id property.</param>+ /// <returns>A System.TimeZoneInfo object whose identifier is the value of the id parameter.</returns>+ TimeZoneInfo FindTimeZoneById(string id);- /// <summary>- /// Converts the date and time to current user date and time- /// </summary>- /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>- /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>- DateTime ConvertToUserTime(DateTime dt);+ /// <summary>+ /// Returns a sorted collection of all the time zones+ /// </summary>+ /// <returns>A read-only collection of System.TimeZoneInfo objects.</returns>+ ReadOnlyCollection<TimeZoneInfo> GetSystemTimeZones();- /// <summary>- /// Converts the date and time to current user date and time- /// </summary>- /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>- /// <param name="sourceDateTimeKind">The source datetime kind</param>- /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>- DateTime ConvertToUserTime(DateTime dt, DateTimeKind sourceDateTimeKind);+ /// <summary>+ /// Converts the date and time to current user date and time+ /// </summary>+ /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>+ /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>+ DateTime ConvertToUserTime(DateTime dt);- /// <summary>- /// Converts the date and time to current user date and time- /// </summary>- /// <param name="dt">The date and time to convert.</param>- /// <param name="sourceTimeZone">The time zone of dateTime.</param>- /// <param name="destinationTimeZone">The time zone to convert dateTime to.</param>- /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>- DateTime ConvertToUserTime(DateTime dt, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone);+ /// <summary>+ /// Converts the date and time to current user date and time+ /// </summary>+ /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>+ /// <param name="sourceDateTimeKind">The source datetime kind</param>+ /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>+ DateTime ConvertToUserTime(DateTime dt, DateTimeKind sourceDateTimeKind);- /// <summary>- /// Converts the date and time to Coordinated Universal Time (UTC)- /// </summary>- /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>- /// <returns>A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.</returns>- DateTime ConvertToUtcTime(DateTime dt);+ /// <summary>+ /// Converts the date and time to current user date and time+ /// </summary>+ /// <param name="dt">The date and time to convert.</param>+ /// <param name="sourceTimeZone">The time zone of dateTime.</param>+ /// <param name="destinationTimeZone">The time zone to convert dateTime to.</param>+ /// <returns>A DateTime value that represents time that corresponds to the dateTime parameter in customer time zone.</returns>+ DateTime ConvertToUserTime(DateTime dt, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone);- /// <summary>- /// Converts the date and time to Coordinated Universal Time (UTC)- /// </summary>- /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>- /// <param name="sourceDateTimeKind">The source datetime kind</param>- /// <returns>A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.</returns>- DateTime ConvertToUtcTime(DateTime dt, DateTimeKind sourceDateTimeKind);+ /// <summary>+ /// Converts the date and time to Coordinated Universal Time (UTC)+ /// </summary>+ /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>+ /// <returns>+ /// A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime+ /// parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.+ /// </returns>+ DateTime ConvertToUtcTime(DateTime dt);- /// <summary>- /// Converts the date and time to Coordinated Universal Time (UTC)- /// </summary>- /// <param name="dt">The date and time to convert.</param>- /// <param name="sourceTimeZone">The time zone of dateTime.</param>- /// <returns>A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.</returns>- DateTime ConvertToUtcTime(DateTime dt, TimeZoneInfo sourceTimeZone);+ /// <summary>+ /// Converts the date and time to Coordinated Universal Time (UTC)+ /// </summary>+ /// <param name="dt">The date and time (represents local system time or UTC time) to convert.</param>+ /// <param name="sourceDateTimeKind">The source datetime kind</param>+ /// <returns>+ /// A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime+ /// parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.+ /// </returns>+ DateTime ConvertToUtcTime(DateTime dt, DateTimeKind sourceDateTimeKind);- /// <summary>- /// Gets the current user time zone- /// </summary>- TimeZoneInfo CurrentTimeZone { get; }- }+ /// <summary>+ /// Converts the date and time to Coordinated Universal Time (UTC)+ /// </summary>+ /// <param name="dt">The date and time to convert.</param>+ /// <param name="sourceTimeZone">The time zone of dateTime.</param>+ /// <returns>+ /// A DateTime value that represents the Coordinated Universal Time (UTC) that corresponds to the dateTime+ /// parameter. The DateTime value's Kind property is always set to DateTimeKind.Utc.+ /// </returns>+ DateTime ConvertToUtcTime(DateTime dt, TimeZoneInfo sourceTimeZone);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IExchangeRateService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IExchangeRateService.csindex a1a9493ca..875f17146 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IExchangeRateService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IExchangeRateService.cs@@ -1,34 +1,33 @@using Grand.Business.Core.Interfaces.Common.Providers;using Grand.Domain.Directory;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++public interface IExchangeRateService{- public interface IExchangeRateService- {- /// <summary>- /// Gets currency live rates- /// </summary>- /// <param name="exchangeRateCurrencyCode">Exchange rate currency code</param>- /// <returns>Exchange rates</returns>- Task<IList<ExchangeRate>> GetCurrencyLiveRates(string exchangeRateCurrencyCode);+ /// <summary>+ /// Gets currency live rates+ /// </summary>+ /// <param name="exchangeRateCurrencyCode">Exchange rate currency code</param>+ /// <returns>Exchange rates</returns>+ Task<IList<ExchangeRate>> GetCurrencyLiveRates(string exchangeRateCurrencyCode);- /// <summary>- /// Load active exchange rate provider- /// </summary>- /// <returns>Active exchange rate provider</returns>- IExchangeRateProvider LoadActiveExchangeRateProvider();+ /// <summary>+ /// Load active exchange rate provider+ /// </summary>+ /// <returns>Active exchange rate provider</returns>+ IExchangeRateProvider LoadActiveExchangeRateProvider();- /// <summary>- /// Load exchange rate provider by system name- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Found exchange rate provider</returns>- IExchangeRateProvider LoadExchangeRateProviderBySystemName(string systemName);+ /// <summary>+ /// Load exchange rate provider by system name+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Found exchange rate provider</returns>+ IExchangeRateProvider LoadExchangeRateProviderBySystemName(string systemName);- /// <summary>- /// Load all exchange rate providers- /// </summary>- /// <returns>Exchange rate providers</returns>- IList<IExchangeRateProvider> LoadAllExchangeRateProviders();- }-}+ /// <summary>+ /// Load all exchange rate providers+ /// </summary>+ /// <returns>Exchange rate providers</returns>+ IList<IExchangeRateProvider> LoadAllExchangeRateProviders();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IGroupService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IGroupService.csindex 078ff86f8..2dc2e3368 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IGroupService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IGroupService.cs@@ -1,118 +1,116 @@using Grand.Domain;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++public interface IGroupService{- public interface IGroupService- {- /// <summary>- /// Gets a value indicating whether customer is in a certain customer group- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="customerGroupSystemName">Customer group system name</param>- /// <param name="onlyActiveCustomerGroups">A value indicating whether we should look only in active customer groups</param>- /// <param name="isSystem">A value indicating whether we should look only in system groups</param>- /// <returns>Result</returns>- Task<bool> IsInCustomerGroup(Customer customer,- string customerGroupSystemName,- bool onlyActiveCustomerGroups = true,- bool? isSystem = null);-- /// <summary>- /// Gets a value indicating whether customer is staff- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsStaff(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is administrator- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsAdmin(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is sales manager- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsSalesManager(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is vendor- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsVendor(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is owner sub-account- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsOwner(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is guest- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsGuest(Customer customer);-- /// <summary>- /// Gets a value indicating whether customer is registered- /// </summary>- /// <param name="customer">Customer</param>- /// <returns>Result</returns>- Task<bool> IsRegistered(Customer customer);--- /// <summary>- /// Inserts a customer group- /// </summary>- /// <param name="customerGroup">Customer group</param>- Task InsertCustomerGroup(CustomerGroup customerGroup);-- /// <summary>- /// Updates the customer group- /// </summary>- /// <param name="customerGroup">Customer group</param>- Task UpdateCustomerGroup(CustomerGroup customerGroup);-- /// <summary>- /// Delete a customer group- /// </summary>- /// <param name="customerGroup">Customer group</param>- Task DeleteCustomerGroup(CustomerGroup customerGroup);-- /// <summary>- /// Gets a customer group- /// </summary>- /// <param name="customerGroupId">Customer group identifier</param>- /// <returns>Customer group</returns>- Task<CustomerGroup> GetCustomerGroupById(string customerGroupId);-- /// <summary>- /// Gets a customer group- /// </summary>- /// <param name="systemName">Customer group system name</param>- /// <returns>Customer group</returns>- Task<CustomerGroup> GetCustomerGroupBySystemName(string systemName);-- /// <summary>- /// Gets all customer groups- /// </summary>- /// <param name="ids">Group id's </param>- /// <returns>Customer groups</returns>- Task<IList<CustomerGroup>> GetAllByIds(string[] ids);-- /// <summary>- /// Gets all customer groups- /// </summary>- /// <returns>Customer groups</returns>- Task<IPagedList<CustomerGroup>> GetAllCustomerGroups(string name = "", int pageIndex = 0,- int pageSize = int.MaxValue, bool showHidden = false);-- }-}+ /// <summary>+ /// Gets a value indicating whether customer is in a certain customer group+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="customerGroupSystemName">Customer group system name</param>+ /// <param name="onlyActiveCustomerGroups">A value indicating whether we should look only in active customer groups</param>+ /// <param name="isSystem">A value indicating whether we should look only in system groups</param>+ /// <returns>Result</returns>+ Task<bool> IsInCustomerGroup(Customer customer,+ string customerGroupSystemName,+ bool onlyActiveCustomerGroups = true,+ bool? isSystem = null);++ /// <summary>+ /// Gets a value indicating whether customer is staff+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsStaff(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is administrator+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsAdmin(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is sales manager+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsSalesManager(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is vendor+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsVendor(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is owner sub-account+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsOwner(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is guest+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsGuest(Customer customer);++ /// <summary>+ /// Gets a value indicating whether customer is registered+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <returns>Result</returns>+ Task<bool> IsRegistered(Customer customer);+++ /// <summary>+ /// Inserts a customer group+ /// </summary>+ /// <param name="customerGroup">Customer group</param>+ Task InsertCustomerGroup(CustomerGroup customerGroup);++ /// <summary>+ /// Updates the customer group+ /// </summary>+ /// <param name="customerGroup">Customer group</param>+ Task UpdateCustomerGroup(CustomerGroup customerGroup);++ /// <summary>+ /// Delete a customer group+ /// </summary>+ /// <param name="customerGroup">Customer group</param>+ Task DeleteCustomerGroup(CustomerGroup customerGroup);++ /// <summary>+ /// Gets a customer group+ /// </summary>+ /// <param name="customerGroupId">Customer group identifier</param>+ /// <returns>Customer group</returns>+ Task<CustomerGroup> GetCustomerGroupById(string customerGroupId);++ /// <summary>+ /// Gets a customer group+ /// </summary>+ /// <param name="systemName">Customer group system name</param>+ /// <returns>Customer group</returns>+ Task<CustomerGroup> GetCustomerGroupBySystemName(string systemName);++ /// <summary>+ /// Gets all customer groups+ /// </summary>+ /// <param name="ids">Group id's </param>+ /// <returns>Customer groups</returns>+ Task<IList<CustomerGroup>> GetAllByIds(string[] ids);++ /// <summary>+ /// Gets all customer groups+ /// </summary>+ /// <returns>Customer groups</returns>+ Task<IPagedList<CustomerGroup>> GetAllCustomerGroups(string name = "", int pageIndex = 0,+ int pageSize = int.MaxValue, bool showHidden = false);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IHistoryService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IHistoryService.csindex 3e5bc5d26..7a4f9f0fe 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IHistoryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IHistoryService.cs@@ -1,15 +1,14 @@using Grand.Domain;using Grand.Domain.History;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++/// <summary>+/// History service interface+/// </summary>+public interface IHistoryService{- /// <summary>- /// History service interface- /// </summary>- public interface IHistoryService- {- Task SaveObject<T>(T entity) where T : BaseEntity;- Task<IList<T>> GetHistoryForEntity<T>(BaseEntity entity) where T : BaseEntity;- Task<IList<HistoryObject>> GetHistoryObjectForEntity(BaseEntity entity);- }+ Task SaveObject<T>(T entity) where T : BaseEntity;+ Task<IList<T>> GetHistoryForEntity<T>(BaseEntity entity) where T : BaseEntity;+ Task<IList<HistoryObject>> GetHistoryObjectForEntity(BaseEntity entity);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IUserFieldService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IUserFieldService.csindex bba6c5fc4..048fbd9c2 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IUserFieldService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Directory/IUserFieldService.cs@@ -1,13 +1,12 @@using Grand.Domain;-namespace Grand.Business.Core.Interfaces.Common.Directory+namespace Grand.Business.Core.Interfaces.Common.Directory;++/// <summary>+/// User fields service interface+/// </summary>+public interface IUserFieldService{- /// <summary>- /// User fields service interface- /// </summary>- public interface IUserFieldService- {- Task SaveField<TPropType>(BaseEntity entity, string key, TPropType value, string storeId = "");- Task<TPropType> GetFieldsForEntity<TPropType>(BaseEntity entity, string key, string storeId = "");- }+ Task SaveField<TPropType>(BaseEntity entity, string key, TPropType value, string storeId = "");+ Task<TPropType> GetFieldsForEntity<TPropType>(BaseEntity entity, string key, string storeId = "");}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ILanguageService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ILanguageService.csindex ad5cdd315..a10744904 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ILanguageService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ILanguageService.cs@@ -1,52 +1,49 @@using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Common.Localization+namespace Grand.Business.Core.Interfaces.Common.Localization;++/// <summary>+/// Language service interface+/// </summary>+public interface ILanguageService{/// <summary>- /// Language service interface+ /// Gets all languages/// </summary>- public interface ILanguageService- {-- /// <summary>- /// Gets all languages- /// </summary>- /// <param name="storeId">Load records allowed only in a specified store; pass "" to load all records</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Languages</returns>- Task<IList<Language>> GetAllLanguages(bool showHidden = false, string storeId = "");-- /// <summary>- /// Gets a language- /// </summary>- /// <param name="languageId">Language identifier</param>- /// <returns>Language</returns>- Task<Language> GetLanguageById(string languageId);+ /// <param name="storeId">Load records allowed only in a specified store; pass "" to load all records</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Languages</returns>+ Task<IList<Language>> GetAllLanguages(bool showHidden = false, string storeId = "");- /// <summary>- /// Gets a language- /// </summary>- /// <param name="languageCode">Language code</param>- /// <returns>Language</returns>- Task<Language> GetLanguageByCode(string languageCode);+ /// <summary>+ /// Gets a language+ /// </summary>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Language</returns>+ Task<Language> GetLanguageById(string languageId);- /// <summary>- /// Inserts a language- /// </summary>- /// <param name="language">Language</param>- Task InsertLanguage(Language language);+ /// <summary>+ /// Gets a language+ /// </summary>+ /// <param name="languageCode">Language code</param>+ /// <returns>Language</returns>+ Task<Language> GetLanguageByCode(string languageCode);- /// <summary>- /// Updates a language- /// </summary>- /// <param name="language">Language</param>- Task UpdateLanguage(Language language);+ /// <summary>+ /// Inserts a language+ /// </summary>+ /// <param name="language">Language</param>+ Task InsertLanguage(Language language);- /// <summary>- /// Deletes a language- /// </summary>- /// <param name="language">Language</param>- Task DeleteLanguage(Language language);+ /// <summary>+ /// Updates a language+ /// </summary>+ /// <param name="language">Language</param>+ Task UpdateLanguage(Language language);- }-}+ /// <summary>+ /// Deletes a language+ /// </summary>+ /// <param name="language">Language</param>+ Task DeleteLanguage(Language language);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ITranslationService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ITranslationService.csindex 1f8c4accf..935879638 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ITranslationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Localization/ITranslationService.cs@@ -1,89 +1,91 @@using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Common.Localization+namespace Grand.Business.Core.Interfaces.Common.Localization;++/// <summary>+/// Translation manager interface+/// </summary>+public interface ITranslationService{/// <summary>- /// Translation manager interface+ /// Gets a translate resource/// </summary>- public interface ITranslationService- {-- /// <summary>- /// Gets a translate resource- /// </summary>- /// <param name="translateResourceId">Translate resource identifier</param>- /// <returns>Translate resource</returns>- Task<TranslationResource> GetTranslateResourceById(string translateResourceId);+ /// <param name="translateResourceId">Translate resource identifier</param>+ /// <returns>Translate resource</returns>+ Task<TranslationResource> GetTranslateResourceById(string translateResourceId);- /// <summary>- /// Gets a translate resource- /// </summary>- /// <param name="name">A string representing a resource name</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Translate resource</returns>- Task<TranslationResource> GetTranslateResourceByName(string name, string languageId);+ /// <summary>+ /// Gets a translate resource+ /// </summary>+ /// <param name="name">A string representing a resource name</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Translate resource</returns>+ Task<TranslationResource> GetTranslateResourceByName(string name, string languageId);- /// <summary>- /// Gets all translate resources by language identifier- /// </summary>- /// <param name="languageId">Language identifier</param>- /// <returns>Translate resources</returns>- IList<TranslationResource> GetAllResources(string languageId);+ /// <summary>+ /// Gets all translate resources by language identifier+ /// </summary>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Translate resources</returns>+ IList<TranslationResource> GetAllResources(string languageId);- /// <summary>- /// Inserts a translate resource- /// </summary>- /// <param name="translateResource">Translate resource</param>- Task InsertTranslateResource(TranslationResource translateResource);+ /// <summary>+ /// Inserts a translate resource+ /// </summary>+ /// <param name="translateResource">Translate resource</param>+ Task InsertTranslateResource(TranslationResource translateResource);- /// <summary>- /// Updates the translate resource- /// </summary>- /// <param name="translateResource">Translate resource</param>- Task UpdateTranslateResource(TranslationResource translateResource);+ /// <summary>+ /// Updates the translate resource+ /// </summary>+ /// <param name="translateResource">Translate resource</param>+ Task UpdateTranslateResource(TranslationResource translateResource);- /// <summary>- /// Deletes a translate resource- /// </summary>- /// <param name="translateResource">Translate resource</param>- Task DeleteTranslateResource(TranslationResource translateResource);+ /// <summary>+ /// Deletes a translate resource+ /// </summary>+ /// <param name="translateResource">Translate resource</param>+ Task DeleteTranslateResource(TranslationResource translateResource);- /// <summary>- /// Gets a resource string based on the specified ResourceKey property.- /// </summary>- /// <param name="name">A string representing a name.</param>- /// <returns>A string representing the requested resource string.</returns>- string GetResource(string name);+ /// <summary>+ /// Gets a resource string based on the specified ResourceKey property.+ /// </summary>+ /// <param name="name">A string representing a name.</param>+ /// <returns>A string representing the requested resource string.</returns>+ string GetResource(string name);- /// <summary>- /// Gets a resource string based on the specified ResourceKey property.- /// </summary>- /// <param name="resourceKey">A string representing a ResourceKey.</param>- /// <param name="languageId">Language identifier</param>- /// <param name="defaultValue">Default value</param>- /// <param name="returnEmptyIfNotFound">A value indicating whether an empty string will be returned if a resource is not found and default value is set to empty string</param>- /// <returns>A string representing the requested resource string.</returns>- string GetResource(string resourceKey, string languageId, string defaultValue = "", bool returnEmptyIfNotFound = false);+ /// <summary>+ /// Gets a resource string based on the specified ResourceKey property.+ /// </summary>+ /// <param name="resourceKey">A string representing a ResourceKey.</param>+ /// <param name="languageId">Language identifier</param>+ /// <param name="defaultValue">Default value</param>+ /// <param name="returnEmptyIfNotFound">+ /// A value indicating whether an empty string will be returned if a resource is not+ /// found and default value is set to empty string+ /// </param>+ /// <returns>A string representing the requested resource string.</returns>+ string GetResource(string resourceKey, string languageId, string defaultValue = "",+ bool returnEmptyIfNotFound = false);- /// <summary>- /// Export language resources to xml- /// </summary>- /// <param name="language">Language</param>- /// <returns>Result in XML format</returns>- Task<string> ExportResourcesToXml(Language language);+ /// <summary>+ /// Export language resources to xml+ /// </summary>+ /// <param name="language">Language</param>+ /// <returns>Result in XML format</returns>+ Task<string> ExportResourcesToXml(Language language);- /// <summary>- /// Import language resources from XML file- /// </summary>- /// <param name="language">Language</param>- /// <param name="xml">XML</param>- Task ImportResourcesFromXml(Language language, string xml);+ /// <summary>+ /// Import language resources from XML file+ /// </summary>+ /// <param name="language">Language</param>+ /// <param name="xml">XML</param>+ Task ImportResourcesFromXml(Language language, string xml);- /// <summary>- /// Import language resources from XML file- /// </summary>- /// <param name="language">Language</param>- /// <param name="xml">XML</param>- Task ImportResourcesFromXmlInstall(Language language, string xml);- }-}+ /// <summary>+ /// Import language resources from XML file+ /// </summary>+ /// <param name="language">Language</param>+ /// <param name="xml">XML</param>+ Task ImportResourcesFromXmlInstall(Language language, string xml);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IPdfService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IPdfService.csindex e22e6a04a..69fc68b8f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IPdfService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IPdfService.cs@@ -1,47 +1,54 @@using Grand.Domain.Orders;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.Common.Pdf+namespace Grand.Business.Core.Interfaces.Common.Pdf;++/// <summary>+/// Customer service interface+/// </summary>+public interface IPdfService{/// <summary>- /// Customer service interface+ /// Print an order to PDF/// </summary>- public interface IPdfService- {- /// <summary>- /// Print an order to PDF- /// </summary>- /// <param name="order">Order</param>- /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>- /// <param name="vendorId">Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't be printed</param>- /// <returns>A path of generated file</returns>- Task<string> PrintOrderToPdf(Order order, string languageId, string vendorId = "");-- /// <summary>- /// Save an order PDF- /// </summary>- /// <param name="order">Order</param>- /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>- /// <param name="vendorId">Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't be printed</param>- /// <returns>A download ident</returns>- Task<string> SaveOrderToBinary(Order order, string languageId, string vendorId = "");+ /// <param name="order">Order</param>+ /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>+ /// <param name="vendorId">+ /// Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't+ /// be printed+ /// </param>+ /// <returns>A path of generated file</returns>+ Task<string> PrintOrderToPdf(Order order, string languageId, string vendorId = "");- /// <summary>- /// Print orders to PDF- /// </summary>- /// <param name="stream">Stream</param>- /// <param name="orders">Orders</param>- /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>- /// <param name="vendorId">Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't be printed</param>- Task PrintOrdersToPdf(Stream stream, IList<Order> orders, string languageId = "", string vendorId = "");+ /// <summary>+ /// Save an order PDF+ /// </summary>+ /// <param name="order">Order</param>+ /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>+ /// <param name="vendorId">+ /// Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't+ /// be printed+ /// </param>+ /// <returns>A download ident</returns>+ Task<string> SaveOrderToBinary(Order order, string languageId, string vendorId = "");- /// <summary>- /// Print packaging slips to PDF- /// </summary>- /// <param name="stream">Stream</param>- /// <param name="shipments">Shipments</param>- /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>- Task PrintPackagingSlipsToPdf(Stream stream, IList<Shipment> shipments, string languageId = "");+ /// <summary>+ /// Print orders to PDF+ /// </summary>+ /// <param name="stream">Stream</param>+ /// <param name="orders">Orders</param>+ /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>+ /// <param name="vendorId">+ /// Vendor identifier to limit products; 0 to to print all products. If specified, then totals won't+ /// be printed+ /// </param>+ Task PrintOrdersToPdf(Stream stream, IList<Order> orders, string languageId = "", string vendorId = "");- }+ /// <summary>+ /// Print packaging slips to PDF+ /// </summary>+ /// <param name="stream">Stream</param>+ /// <param name="shipments">Shipments</param>+ /// <param name="languageId">Language identifier; 0 to use a language used when placing an order</param>+ Task PrintPackagingSlipsToPdf(Stream stream, IList<Shipment> shipments, string languageId = "");}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IViewRenderService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IViewRenderService.csindex afd17ea16..5c65eea45 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IViewRenderService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Pdf/IViewRenderService.cs@@ -1,10 +1,9 @@-namespace Grand.Business.Core.Interfaces.Common.Pdf+namespace Grand.Business.Core.Interfaces.Common.Pdf;++/// <summary>+/// Allow render razor view as string+/// </summary>+public interface IViewRenderService{- /// <summary>- /// Allow render razor view as string- /// </summary>- public interface IViewRenderService- {- Task<string> RenderToStringAsync<T>(string viewPath, T model);- }-}+ Task<string> RenderToStringAsync<T>(string viewPath, T model);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Providers/IExchangeRateProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Providers/IExchangeRateProvider.csindex 53afd1cbb..130923868 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Providers/IExchangeRateProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Providers/IExchangeRateProvider.cs@@ -1,18 +1,17 @@using Grand.Domain.Directory;using Grand.Infrastructure.Plugins;-namespace Grand.Business.Core.Interfaces.Common.Providers+namespace Grand.Business.Core.Interfaces.Common.Providers;++/// <summary>+/// Exchange rate provider interface+/// </summary>+public interface IExchangeRateProvider : IProvider{/// <summary>- /// Exchange rate provider interface+ /// Gets currency live rates/// </summary>- public interface IExchangeRateProvider : IProvider- {- /// <summary>- /// Gets currency live rates- /// </summary>- /// <param name="exchangeRateCurrencyCode">Exchange rate currency code</param>- /// <returns>Exchange rates</returns>- Task<IList<ExchangeRate>> GetCurrencyLiveRates(string exchangeRateCurrencyCode);- }+ /// <param name="exchangeRateCurrencyCode">Exchange rate currency code</param>+ /// <returns>Exchange rates</returns>+ Task<IList<ExchangeRate>> GetCurrencyLiveRates(string exchangeRateCurrencyCode);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IAclService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IAclService.csindex 469fdad35..e5b55fbbf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IAclService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IAclService.cs@@ -3,29 +3,28 @@ using Grand.Domain.Customers;using Grand.Domain.Permissions;using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Common.Security+namespace Grand.Business.Core.Interfaces.Common.Security;++/// <summary>+/// ACL service interface+/// </summary>+public interface IAclService{/// <summary>- /// ACL service interface+ /// Authorize ACL permission/// </summary>- public interface IAclService- {- /// <summary>- /// Authorize ACL permission- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="customer">Customer</param>- /// <returns>true = authorized; otherwise = false</returns>- bool Authorize<T>(T entity, Customer customer) where T : BaseEntity, IGroupLinkEntity;+ /// <typeparam name="T">Type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="customer">Customer</param>+ /// <returns>true = authorized; otherwise = false</returns>+ bool Authorize<T>(T entity, Customer customer) where T : BaseEntity, IGroupLinkEntity;- /// <summary>- /// Authorize whether entity could be accessed in a store- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="storeId">Store identifier</param>- /// <returns>true - authorized; otherwise, false</returns>- bool Authorize<T>(T entity, string storeId) where T : BaseEntity, IStoreLinkEntity;- }+ /// <summary>+ /// Authorize whether entity could be accessed in a store+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>true - authorized; otherwise, false</returns>+ bool Authorize<T>(T entity, string storeId) where T : BaseEntity, IStoreLinkEntity;}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IEncryptionService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IEncryptionService.csindex c929fe83e..4d96d48fd 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IEncryptionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IEncryptionService.cs@@ -1,39 +1,39 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Common.Security+namespace Grand.Business.Core.Interfaces.Common.Security;++public interface IEncryptionService{- public interface IEncryptionService- {- /// <summary>- /// Create salt key- /// </summary>- /// <param name="size">Key size</param>- /// <returns>Salt key</returns>- string CreateSaltKey(int size);+ /// <summary>+ /// Create salt key+ /// </summary>+ /// <param name="size">Key size</param>+ /// <returns>Salt key</returns>+ string CreateSaltKey(int size);- /// <summary>- /// Create a password hash- /// </summary>- /// <param name="password">password</param>- /// <param name="saltKey">Salk key</param>- /// <param name="passwordFormat">Hashed Password format (hash algorithm)</param>- /// <returns>Password hash</returns>- string CreatePasswordHash(string password, string saltKey, HashedPasswordFormat passwordFormat = HashedPasswordFormat.SHA1);+ /// <summary>+ /// Create a password hash+ /// </summary>+ /// <param name="password">password</param>+ /// <param name="saltKey">Salk key</param>+ /// <param name="passwordFormat">Hashed Password format (hash algorithm)</param>+ /// <returns>Password hash</returns>+ string CreatePasswordHash(string password, string saltKey,+ HashedPasswordFormat passwordFormat = HashedPasswordFormat.SHA1);- /// <summary>- /// Encrypt text- /// </summary>- /// <param name="plainText">Text to encrypt</param>- /// <param name="privateKey">Encryption private key</param>- /// <returns>Encrypted text</returns>- string EncryptText(string plainText, string privateKey);+ /// <summary>+ /// Encrypt text+ /// </summary>+ /// <param name="plainText">Text to encrypt</param>+ /// <param name="privateKey">Encryption private key</param>+ /// <returns>Encrypted text</returns>+ string EncryptText(string plainText, string privateKey);- /// <summary>- /// Decrypt text- /// </summary>- /// <param name="cipherText">Text to decrypt</param>- /// <param name="encryptionPrivateKey">Encryption private key</param>- /// <returns>Decrypted text</returns>- string DecryptText(string cipherText, string encryptionPrivateKey);- }-}+ /// <summary>+ /// Decrypt text+ /// </summary>+ /// <param name="cipherText">Text to decrypt</param>+ /// <param name="encryptionPrivateKey">Encryption private key</param>+ /// <returns>Decrypted text</returns>+ string DecryptText(string cipherText, string encryptionPrivateKey);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionProvider.csindex 4801ce7b3..59607c5ca 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionProvider.cs@@ -1,22 +1,21 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Interfaces.Common.Security+namespace Grand.Business.Core.Interfaces.Common.Security;++/// <summary>+/// Permission provider+/// </summary>+public interface IPermissionProvider{/// <summary>- /// Permission provider+ /// Get permissions/// </summary>- public interface IPermissionProvider- {- /// <summary>- /// Get permissions- /// </summary>- /// <returns>Permissions</returns>- IEnumerable<Permission> GetPermissions();+ /// <returns>Permissions</returns>+ IEnumerable<Permission> GetPermissions();- /// <summary>- /// Get default permissions- /// </summary>- /// <returns>Default permissions</returns>- IEnumerable<DefaultPermission> GetDefaultPermissions();- }-}+ /// <summary>+ /// Get default permissions+ /// </summary>+ /// <returns>Default permissions</returns>+ IEnumerable<DefaultPermission> GetDefaultPermissions();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionService.csindex dc6efe3c5..be079ddca 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Security/IPermissionService.cs@@ -1,109 +1,106 @@using Grand.Domain.Customers;using Grand.Domain.Permissions;-namespace Grand.Business.Core.Interfaces.Common.Security+namespace Grand.Business.Core.Interfaces.Common.Security;++/// <summary>+/// Permission service interface+/// </summary>+public interface IPermissionService{/// <summary>- /// Permission service interface+ /// Gets a permission/// </summary>- public interface IPermissionService- {-- /// <summary>- /// Gets a permission- /// </summary>- /// <param name="permissionId">Permission identifier</param>- /// <returns>Permission</returns>- Task<Permission> GetPermissionById(string permissionId);-- /// <summary>- /// Gets a permission- /// </summary>- /// <param name="systemName">Permission system name</param>- /// <returns>Permission</returns>- Task<Permission> GetPermissionBySystemName(string systemName);+ /// <param name="permissionId">Permission identifier</param>+ /// <returns>Permission</returns>+ Task<Permission> GetPermissionById(string permissionId);- /// <summary>- /// Gets all permissions- /// </summary>- /// <returns>Permissions</returns>- Task<IList<Permission>> GetAllPermissions();+ /// <summary>+ /// Gets a permission+ /// </summary>+ /// <param name="systemName">Permission system name</param>+ /// <returns>Permission</returns>+ Task<Permission> GetPermissionBySystemName(string systemName);- /// <summary>- /// Inserts a permission- /// </summary>- /// <param name="permission">Permission</param>- Task InsertPermission(Permission permission);+ /// <summary>+ /// Gets all permissions+ /// </summary>+ /// <returns>Permissions</returns>+ Task<IList<Permission>> GetAllPermissions();- /// <summary>- /// Updates the permission- /// </summary>- /// <param name="permission">Permission</param>- Task UpdatePermission(Permission permission);+ /// <summary>+ /// Inserts a permission+ /// </summary>+ /// <param name="permission">Permission</param>+ Task InsertPermission(Permission permission);- /// <summary>- /// Delete a permission- /// </summary>- /// <param name="permission">Permission</param>- Task DeletePermission(Permission permission);+ /// <summary>+ /// Updates the permission+ /// </summary>+ /// <param name="permission">Permission</param>+ Task UpdatePermission(Permission permission);- /// <summary>- /// Authorize permission- /// </summary>- /// <param name="permission">Permission</param>- /// <returns>true - authorized; otherwise, false</returns>- Task<bool> Authorize(Permission permission);+ /// <summary>+ /// Delete a permission+ /// </summary>+ /// <param name="permission">Permission</param>+ Task DeletePermission(Permission permission);- /// <summary>- /// Authorize permission- /// </summary>- /// <param name="permission">Permission</param>- /// <param name="customer">Customer</param>- /// <returns>true - authorized; otherwise, false</returns>- Task<bool> Authorize(Permission permission, Customer customer);+ /// <summary>+ /// Authorize permission+ /// </summary>+ /// <param name="permission">Permission</param>+ /// <returns>true - authorized; otherwise, false</returns>+ Task<bool> Authorize(Permission permission);- /// <summary>- /// Authorize permission- /// </summary>- /// <param name="permissionSystemName">Permission system name</param>- /// <returns>true - authorized; otherwise, false</returns>- Task<bool> Authorize(string permissionSystemName);+ /// <summary>+ /// Authorize permission+ /// </summary>+ /// <param name="permission">Permission</param>+ /// <param name="customer">Customer</param>+ /// <returns>true - authorized; otherwise, false</returns>+ Task<bool> Authorize(Permission permission, Customer customer);- /// <summary>- /// Authorize permission- /// </summary>- /// <param name="permissionSystemName">Permission system name</param>- /// <param name="customer">Customer</param>- /// <returns>true - authorized; otherwise, false</returns>- Task<bool> Authorize(string permissionSystemName, Customer customer);+ /// <summary>+ /// Authorize permission+ /// </summary>+ /// <param name="permissionSystemName">Permission system name</param>+ /// <returns>true - authorized; otherwise, false</returns>+ Task<bool> Authorize(string permissionSystemName);- /// <summary>- /// Gets a permission actions- /// </summary>- /// <param name="systemName">Permission system name</param>- /// <param name="customerGroupId">Customer group ident</param>- /// <returns>Permission action</returns>- Task<IList<PermissionAction>> GetPermissionActions(string systemName, string customerGroupId);+ /// <summary>+ /// Authorize permission+ /// </summary>+ /// <param name="permissionSystemName">Permission system name</param>+ /// <param name="customer">Customer</param>+ /// <returns>true - authorized; otherwise, false</returns>+ Task<bool> Authorize(string permissionSystemName, Customer customer);- /// <summary>- /// Inserts a permission action- /// </summary>- /// <param name="permissionAction">Permission</param>- Task InsertPermissionAction(PermissionAction permissionAction);+ /// <summary>+ /// Gets a permission actions+ /// </summary>+ /// <param name="systemName">Permission system name</param>+ /// <param name="customerGroupId">Customer group ident</param>+ /// <returns>Permission action</returns>+ Task<IList<PermissionAction>> GetPermissionActions(string systemName, string customerGroupId);- /// <summary>- /// Inserts a permission action record- /// </summary>- /// <param name="permissionAction">Permission</param>- Task DeletePermissionAction(PermissionAction permissionAction);+ /// <summary>+ /// Inserts a permission action+ /// </summary>+ /// <param name="permissionAction">Permission</param>+ Task InsertPermissionAction(PermissionAction permissionAction);- /// <summary>- /// Authorize permission for action- /// </summary>- /// <param name="permissionSystemName">Permission record system name</param>- /// <param name="permissionActionName">Permission action name</param>- /// <returns>true - authorized; otherwise, false</returns>- Task<bool> AuthorizeAction(string permissionSystemName, string permissionActionName);+ /// <summary>+ /// Inserts a permission action record+ /// </summary>+ /// <param name="permissionAction">Permission</param>+ Task DeletePermissionAction(PermissionAction permissionAction);- }+ /// <summary>+ /// Authorize permission for action+ /// </summary>+ /// <param name="permissionSystemName">Permission record system name</param>+ /// <param name="permissionActionName">Permission action name</param>+ /// <returns>true - authorized; otherwise, false</returns>+ Task<bool> AuthorizeAction(string permissionSystemName, string permissionActionName);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Seo/ISlugService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Seo/ISlugService.csindex 1207aa7a9..6272aba36 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Seo/ISlugService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Seo/ISlugService.cs@@ -1,79 +1,78 @@using Grand.Domain;using Grand.Domain.Seo;-namespace Grand.Business.Core.Interfaces.Common.Seo+namespace Grand.Business.Core.Interfaces.Common.Seo;++/// <summary>+/// Provides information about URL Entity+/// </summary>+public interface ISlugService{/// <summary>- /// Provides information about URL Entity+ /// Gets an entity url/// </summary>- public interface ISlugService- {-- /// <summary>- /// Gets an entity url- /// </summary>- /// <param name="urlEntityId">URL entity identifier</param>- /// <returns>URL Entity</returns>- Task<EntityUrl> GetEntityUrlById(string urlEntityId);+ /// <param name="urlEntityId">URL entity identifier</param>+ /// <returns>URL Entity</returns>+ Task<EntityUrl> GetEntityUrlById(string urlEntityId);- /// <summary>- /// Inserts an URL Entity- /// </summary>- /// <param name="urlEntity">URL Entity</param>- Task InsertEntityUrl(EntityUrl urlEntity);+ /// <summary>+ /// Inserts an URL Entity+ /// </summary>+ /// <param name="urlEntity">URL Entity</param>+ Task InsertEntityUrl(EntityUrl urlEntity);- /// <summary>- /// Updates the URL Entity- /// </summary>- /// <param name="urlEntity">URL Entity</param>- Task UpdateEntityUrl(EntityUrl urlEntity);+ /// <summary>+ /// Updates the URL Entity+ /// </summary>+ /// <param name="urlEntity">URL Entity</param>+ Task UpdateEntityUrl(EntityUrl urlEntity);- /// <summary>- /// Deletes an Entity url- /// </summary>- /// <param name="entityUrl">URL Entity</param>- Task DeleteEntityUrl(EntityUrl entityUrl);+ /// <summary>+ /// Deletes an Entity url+ /// </summary>+ /// <param name="entityUrl">URL Entity</param>+ Task DeleteEntityUrl(EntityUrl entityUrl);- /// <summary>- /// Find URL Entity- /// </summary>- /// <param name="slug">Slug</param>- /// <returns>Found URL Entity</returns>- Task<EntityUrl> GetBySlug(string slug);+ /// <summary>+ /// Find URL Entity+ /// </summary>+ /// <param name="slug">Slug</param>+ /// <returns>Found URL Entity</returns>+ Task<EntityUrl> GetBySlug(string slug);- /// <summary>- /// Find URL Entity (cached version).- /// </summary>- /// <param name="slug">Slug</param>- /// <returns>Found URL Entity</returns>- Task<EntityUrl> GetBySlugCached(string slug);+ /// <summary>+ /// Find URL Entity (cached version).+ /// </summary>+ /// <param name="slug">Slug</param>+ /// <returns>Found URL Entity</returns>+ Task<EntityUrl> GetBySlugCached(string slug);- /// <summary>- /// Gets all URL Entity- /// </summary>- /// <param name="slug">Slug</param>- /// <param name="active">active</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>URL Entity</returns>- Task<IPagedList<EntityUrl>> GetAllEntityUrl(string slug = "", bool? active = null, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets all URL Entity+ /// </summary>+ /// <param name="slug">Slug</param>+ /// <param name="active">active</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>URL Entity</returns>+ Task<IPagedList<EntityUrl>> GetAllEntityUrl(string slug = "", bool? active = null, int pageIndex = 0,+ int pageSize = int.MaxValue);- /// <summary>- /// Find slug- /// </summary>- /// <param name="entityId">Entity identifier</param>- /// <param name="entityName">Entity name</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Found slug</returns>- Task<string> GetActiveSlug(string entityId, string entityName, string languageId);+ /// <summary>+ /// Find slug+ /// </summary>+ /// <param name="entityId">Entity identifier</param>+ /// <param name="entityName">Entity name</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Found slug</returns>+ Task<string> GetActiveSlug(string entityId, string entityName, string languageId);- /// <summary>- /// Save slug- /// </summary>- /// <typeparam name="T">Type</typeparam>- /// <param name="entity">Entity</param>- /// <param name="slug">Slug</param>- /// <param name="languageId">Language ID</param>- Task SaveSlug<T>(T entity, string slug, string languageId) where T : BaseEntity, ISlugEntity;- }+ /// <summary>+ /// Save slug+ /// </summary>+ /// <typeparam name="T">Type</typeparam>+ /// <param name="entity">Entity</param>+ /// <param name="slug">Slug</param>+ /// <param name="languageId">Language ID</param>+ Task SaveSlug<T>(T entity, string slug, string languageId) where T : BaseEntity, ISlugEntity;}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Common/Stores/IStoreService.cs b/src/Business/Grand.Business.Core/Interfaces/Common/Stores/IStoreService.csindex a552cb4ac..f6b100398 100644--- a/src/Business/Grand.Business.Core/Interfaces/Common/Stores/IStoreService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Common/Stores/IStoreService.cs@@ -1,49 +1,46 @@using Grand.Domain.Stores;-namespace Grand.Business.Core.Interfaces.Common.Stores+namespace Grand.Business.Core.Interfaces.Common.Stores;++/// <summary>+/// Store service interface+/// </summary>+public interface IStoreService{/// <summary>- /// Store service interface+ /// Gets all stores/// </summary>- public interface IStoreService- {-- /// <summary>- /// Gets all stores- /// </summary>- /// <returns>Stores</returns>- Task<IList<Store>> GetAllStores();-- /// <summary>- /// Gets all stores- /// </summary>- /// <returns>Stores</returns>- IList<Store> GetAll();+ /// <returns>Stores</returns>+ Task<IList<Store>> GetAllStores();- /// <summary>- /// Gets a store- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <returns>Store</returns>- Task<Store> GetStoreById(string storeId);+ /// <summary>+ /// Gets all stores+ /// </summary>+ /// <returns>Stores</returns>+ IList<Store> GetAll();- /// <summary>- /// Inserts a store- /// </summary>- /// <param name="store">Store</param>- Task InsertStore(Store store);+ /// <summary>+ /// Gets a store+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Store</returns>+ Task<Store> GetStoreById(string storeId);- /// <summary>- /// Updates the store- /// </summary>- /// <param name="store">Store</param>- Task UpdateStore(Store store);+ /// <summary>+ /// Inserts a store+ /// </summary>+ /// <param name="store">Store</param>+ Task InsertStore(Store store);- /// <summary>- /// Deletes a store- /// </summary>- /// <param name="store">Store</param>- Task DeleteStore(Store store);+ /// <summary>+ /// Updates the store+ /// </summary>+ /// <param name="store">Store</param>+ Task UpdateStore(Store store);- }+ /// <summary>+ /// Deletes a store+ /// </summary>+ /// <param name="store">Store</param>+ Task DeleteStore(Store store);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/IAffiliateService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/IAffiliateService.csindex fb0f9c1a8..5aba67c8a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/IAffiliateService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/IAffiliateService.cs@@ -1,54 +1,53 @@using Grand.Domain;using Grand.Domain.Affiliates;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Affiliate service interface+/// </summary>+public interface IAffiliateService{/// <summary>- /// Affiliate service interface+ /// Gets an affiliate by identifier/// </summary>- public interface IAffiliateService- {- /// <summary>- /// Gets an affiliate by identifier- /// </summary>- /// <param name="affiliateId">Affiliate identifier</param>- /// <returns>Affiliate</returns>- Task<Affiliate> GetAffiliateById(string affiliateId);+ /// <param name="affiliateId">Affiliate identifier</param>+ /// <returns>Affiliate</returns>+ Task<Affiliate> GetAffiliateById(string affiliateId);- /// <summary>- /// Gets an affiliate by url name- /// </summary>- /// <param name="friendlyUrlName">Friendly url name</param>- /// <returns>Affiliate</returns>- Task<Affiliate> GetAffiliateByFriendlyUrlName(string friendlyUrlName);+ /// <summary>+ /// Gets an affiliate by url name+ /// </summary>+ /// <param name="friendlyUrlName">Friendly url name</param>+ /// <returns>Affiliate</returns>+ Task<Affiliate> GetAffiliateByFriendlyUrlName(string friendlyUrlName);- /// <summary>- /// Gets all affiliates- /// </summary>- /// <returns>Affiliates</returns>- Task<IPagedList<Affiliate>> GetAllAffiliates(string friendlyUrlName = null,- string firstName = null, string lastName = null,- bool loadOnlyWithOrders = false,- DateTime? ordersCreatedFromUtc = null, DateTime? ordersCreatedToUtc = null,- int pageIndex = 0, int pageSize = int.MaxValue,- bool showHidden = false);+ /// <summary>+ /// Gets all affiliates+ /// </summary>+ /// <returns>Affiliates</returns>+ Task<IPagedList<Affiliate>> GetAllAffiliates(string friendlyUrlName = null,+ string firstName = null, string lastName = null,+ bool loadOnlyWithOrders = false,+ DateTime? ordersCreatedFromUtc = null, DateTime? ordersCreatedToUtc = null,+ int pageIndex = 0, int pageSize = int.MaxValue,+ bool showHidden = false);- /// <summary>- /// Inserts an affiliate- /// </summary>- /// <param name="affiliate">Affiliate</param>- Task InsertAffiliate(Affiliate affiliate);+ /// <summary>+ /// Inserts an affiliate+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ Task InsertAffiliate(Affiliate affiliate);- /// <summary>- /// Updates the affiliate- /// </summary>- /// <param name="affiliate">Affiliate</param>- Task UpdateAffiliate(Affiliate affiliate);- /// <summary>- /// Marks affiliate as deleted- /// </summary>- /// <param name="affiliate">Affiliate</param>- Task DeleteAffiliate(Affiliate affiliate);+ /// <summary>+ /// Updates the affiliate+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ Task UpdateAffiliate(Affiliate affiliate);- }+ /// <summary>+ /// Marks affiliate as deleted+ /// </summary>+ /// <param name="affiliate">Affiliate</param>+ Task DeleteAffiliate(Affiliate affiliate);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeParser.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeParser.csindex c770c9dcc..03752a0df 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeParser.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeParser.cs@@ -2,52 +2,52 @@ using Grand.Domain.Common;using Grand.Domain.Customers;using Grand.Domain.Localization;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Customer attribute parser interface+/// </summary>+public interface ICustomerAttributeParser{/// <summary>- /// Customer attribute parser interface+ /// Gets selected customer attributes/// </summary>- public interface ICustomerAttributeParser- {- /// <summary>- /// Gets selected customer attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Selected customer attributes</returns>- Task<IList<CustomerAttribute>> ParseCustomerAttributes(IList<CustomAttribute> customAttributes);-- /// <summary>- /// Get customer attribute values- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Customer attribute values</returns>- Task<IList<CustomerAttributeValue>> ParseCustomerAttributeValues(IList<CustomAttribute> customAttributes);+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Selected customer attributes</returns>+ Task<IList<CustomerAttribute>> ParseCustomerAttributes(IList<CustomAttribute> customAttributes);- /// <summary>- /// Adds an attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="ca">Customer attribute</param>- /// <param name="value">Value</param>- /// <returns>Attributes</returns>- IList<CustomAttribute> AddCustomerAttribute(IList<CustomAttribute> customAttributes, CustomerAttribute ca, string value);+ /// <summary>+ /// Get customer attribute values+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Customer attribute values</returns>+ Task<IList<CustomerAttributeValue>> ParseCustomerAttributeValues(IList<CustomAttribute> customAttributes);- /// <summary>- /// Validates customer attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Warnings</returns>- Task<IList<string>> GetAttributeWarnings(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Adds an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="ca">Customer attribute</param>+ /// <param name="value">Value</param>+ /// <returns>Attributes</returns>+ IList<CustomAttribute> AddCustomerAttribute(IList<CustomAttribute> customAttributes, CustomerAttribute ca,+ string value);- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="language">Language</param>- /// <param name="customAttributes">Attributes</param>- /// <param name="separator">Separator</param>- /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(Language language, IList<CustomAttribute> customAttributes, string separator = "<br />", bool htmlEncode = true);+ /// <summary>+ /// Validates customer attributes+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Warnings</returns>+ Task<IList<string>> GetAttributeWarnings(IList<CustomAttribute> customAttributes);- }-}+ /// <summary>+ /// Formats attributes+ /// </summary>+ /// <param name="language">Language</param>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="separator">Separator</param>+ /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(Language language, IList<CustomAttribute> customAttributes,+ string separator = "<br />", bool htmlEncode = true);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeService.csindex e4f0845c8..f89872780 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerAttributeService.cs@@ -1,61 +1,59 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Customer attribute service+/// </summary>+public interface ICustomerAttributeService{/// <summary>- /// Customer attribute service- /// </summary>- public interface ICustomerAttributeService- {- /// <summary>- /// Gets all customer attributes- /// </summary>- /// <returns>Customer attributes</returns>- Task<IList<CustomerAttribute>> GetAllCustomerAttributes();-- /// <summary>- /// Gets a customer attribute- /// </summary>- /// <param name="customerAttributeId">Customer attribute identifier</param>- /// <returns>Customer attribute</returns>- Task<CustomerAttribute> GetCustomerAttributeById(string customerAttributeId);-- /// <summary>- /// Inserts a customer attribute- /// </summary>- /// <param name="customerAttribute">Customer attribute</param>- Task InsertCustomerAttribute(CustomerAttribute customerAttribute);-- /// <summary>- /// Updates the customer attribute- /// </summary>- /// <param name="customerAttribute">Customer attribute</param>- Task UpdateCustomerAttribute(CustomerAttribute customerAttribute);-- /// <summary>- /// Deletes a customer attribute- /// </summary>- /// <param name="customerAttribute">Customer attribute</param>- Task DeleteCustomerAttribute(CustomerAttribute customerAttribute);--- /// <summary>- /// Inserts a customer attribute value- /// </summary>- /// <param name="customerAttributeValue">Customer attribute value</param>- Task InsertCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);-- /// <summary>- /// Updates the customer attribute value- /// </summary>- /// <param name="customerAttributeValue">Customer attribute value</param>- Task UpdateCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);-- /// <summary>- /// Deletes a customer attribute value- /// </summary>- /// <param name="customerAttributeValue">Customer attribute value</param>- Task DeleteCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);-- }-}+ /// Gets all customer attributes+ /// </summary>+ /// <returns>Customer attributes</returns>+ Task<IList<CustomerAttribute>> GetAllCustomerAttributes();++ /// <summary>+ /// Gets a customer attribute+ /// </summary>+ /// <param name="customerAttributeId">Customer attribute identifier</param>+ /// <returns>Customer attribute</returns>+ Task<CustomerAttribute> GetCustomerAttributeById(string customerAttributeId);++ /// <summary>+ /// Inserts a customer attribute+ /// </summary>+ /// <param name="customerAttribute">Customer attribute</param>+ Task InsertCustomerAttribute(CustomerAttribute customerAttribute);++ /// <summary>+ /// Updates the customer attribute+ /// </summary>+ /// <param name="customerAttribute">Customer attribute</param>+ Task UpdateCustomerAttribute(CustomerAttribute customerAttribute);++ /// <summary>+ /// Deletes a customer attribute+ /// </summary>+ /// <param name="customerAttribute">Customer attribute</param>+ Task DeleteCustomerAttribute(CustomerAttribute customerAttribute);+++ /// <summary>+ /// Inserts a customer attribute value+ /// </summary>+ /// <param name="customerAttributeValue">Customer attribute value</param>+ Task InsertCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);++ /// <summary>+ /// Updates the customer attribute value+ /// </summary>+ /// <param name="customerAttributeValue">Customer attribute value</param>+ Task UpdateCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);++ /// <summary>+ /// Deletes a customer attribute value+ /// </summary>+ /// <param name="customerAttributeValue">Customer attribute value</param>+ Task DeleteCustomerAttributeValue(CustomerAttributeValue customerAttributeValue);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerHistoryPasswordService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerHistoryPasswordService.csindex 3babee8e9..2a44bba08 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerHistoryPasswordService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerHistoryPasswordService.cs@@ -1,26 +1,24 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers-{- public interface ICustomerHistoryPasswordService- {- #region Password history+namespace Grand.Business.Core.Interfaces.Customers;- /// <summary>- /// Gets customer passwords- /// </summary>- /// <param name="customerId">Customer identifier; pass null to load all records</param>- /// <param name="passwordsToReturn">Number of returning passwords; pass null to load all records</param>- /// <returns>List of customer passwords</returns>- Task<IList<CustomerHistoryPassword>> GetPasswords(string customerId, int passwordsToReturn);+public interface ICustomerHistoryPasswordService+{+ #region Password history- /// <summary>- /// Insert a customer history password- /// </summary>- /// <param name="customer">Customer</param>- Task InsertCustomerPassword(Customer customer);+ /// <summary>+ /// Gets customer passwords+ /// </summary>+ /// <param name="customerId">Customer identifier; pass null to load all records</param>+ /// <param name="passwordsToReturn">Number of returning passwords; pass null to load all records</param>+ /// <returns>List of customer passwords</returns>+ Task<IList<CustomerHistoryPassword>> GetPasswords(string customerId, int passwordsToReturn);+ /// <summary>+ /// Insert a customer history password+ /// </summary>+ /// <param name="customer">Customer</param>+ Task InsertCustomerPassword(Customer customer);- #endregion- }-}+ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerManagerService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerManagerService.csindex d1dd74e25..a0bf37ed6 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerManagerService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerManagerService.cs@@ -1,42 +1,40 @@using Grand.Business.Core.Utilities.Customers;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Customer manager interface+/// </summary>+public interface ICustomerManagerService{/// <summary>- /// Customer manager interface+ /// Login customer+ /// </summary>+ /// <param name="usernameOrEmail">Username or email</param>+ /// <param name="password">Password</param>+ /// <returns>Result</returns>+ Task<CustomerLoginResults> LoginCustomer(string usernameOrEmail, string password);++ /// <summary>+ /// Register customer/// </summary>- public interface ICustomerManagerService- {- /// <summary>- /// Login customer- /// </summary>- /// <param name="usernameOrEmail">Username or email</param>- /// <param name="password">Password</param>- /// <returns>Result</returns>- Task<CustomerLoginResults> LoginCustomer(string usernameOrEmail, string password);+ /// <param name="request">Request</param>+ Task RegisterCustomer(RegistrationRequest request);- /// <summary>- /// Register customer- /// </summary>- /// <param name="request">Request</param>- Task RegisterCustomer(RegistrationRequest request);+ /// <summary>+ /// Password match+ /// </summary>+ /// <param name="passwordFormat"></param>+ /// <param name="oldPassword"></param>+ /// <param name="newPassword"></param>+ /// <param name="passwordSalt"></param>+ /// <returns></returns>+ bool PasswordMatch(PasswordFormat passwordFormat, string oldPassword, string newPassword, string passwordSalt);- /// <summary>- /// Password match- /// </summary>- /// <param name="passwordFormat"></param>- /// <param name="oldPassword"></param>- /// <param name="newPassword"></param>- /// <param name="passwordSalt"></param>- /// <returns></returns>- bool PasswordMatch(PasswordFormat passwordFormat, string oldPassword, string newPassword, string passwordSalt);-- /// <summary>- /// Change password- /// </summary>- /// <param name="request">Request</param>- Task ChangePassword(ChangePasswordRequest request);-- }+ /// <summary>+ /// Change password+ /// </summary>+ /// <param name="request">Request</param>+ Task ChangePassword(ChangePasswordRequest request);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerNoteService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerNoteService.csindex dd428d2c5..044d68425 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerNoteService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerNoteService.cs@@ -1,38 +1,37 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++public interface ICustomerNoteService{- public interface ICustomerNoteService- {- #region Customer note+ #region Customer note- /// <summary>- /// Get note for customer- /// </summary>- /// <param name="id">Note identifier</param>- /// <returns>CustomerNote</returns>- Task<CustomerNote> GetCustomerNote(string id);+ /// <summary>+ /// Get note for customer+ /// </summary>+ /// <param name="id">Note identifier</param>+ /// <returns>CustomerNote</returns>+ Task<CustomerNote> GetCustomerNote(string id);- /// <summary>- /// Insert an customer note- /// </summary>- /// <param name="customerNote">The customer note</param>- Task InsertCustomerNote(CustomerNote customerNote);+ /// <summary>+ /// Insert an customer note+ /// </summary>+ /// <param name="customerNote">The customer note</param>+ Task InsertCustomerNote(CustomerNote customerNote);- /// <summary>- /// Deletes an customer note- /// </summary>- /// <param name="customerNote">The customer note</param>- Task DeleteCustomerNote(CustomerNote customerNote);+ /// <summary>+ /// Deletes an customer note+ /// </summary>+ /// <param name="customerNote">The customer note</param>+ Task DeleteCustomerNote(CustomerNote customerNote);- /// <summary>- /// Get notes for customer- /// </summary>- /// <param name="customerId">Customer identifier</param>- /// <param name="displayToCustomer">Display to customer</param>- /// <returns>OrderNote</returns>- Task<IList<CustomerNote>> GetCustomerNotes(string customerId, bool? displayToCustomer = null);+ /// <summary>+ /// Get notes for customer+ /// </summary>+ /// <param name="customerId">Customer identifier</param>+ /// <param name="displayToCustomer">Display to customer</param>+ /// <returns>OrderNote</returns>+ Task<IList<CustomerNote>> GetCustomerNotes(string customerId, bool? displayToCustomer = null);- #endregion- }-}+ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerService.csindex 4ee367450..7291f6731 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ICustomerService.cs@@ -4,230 +4,242 @@ using Grand.Domain.Customers;using Grand.Domain.Orders;using System.Linq.Expressions;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Customer service interface+/// </summary>+public interface ICustomerService{+ #region Customers++ /// <summary>+ /// Gets all customers+ /// </summary>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="affiliateId">Affiliate identifier</param>+ /// <param name="vendorId">Vendor identifier</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="ownerId">Owner identifier</param>+ /// <param name="salesEmployeeId">Sales employee identifier</param>+ /// <param name="customerGroupIds">+ /// A list of customer group identifiers to filter by (at least one match); pass null or+ /// empty list in order to load all customers;+ /// </param>+ /// <param name="customerTagIds"></param>+ /// <param name="email">Email; null to load all customers</param>+ /// <param name="username">Username; null to load all customers</param>+ /// <param name="firstName">First name; null to load all customers</param>+ /// <param name="lastName">Last name; null to load all customers</param>+ /// <param name="company">Company; null to load all customers</param>+ /// <param name="phone">Phone; null to load all customers</param>+ /// <param name="zipPostalCode">Phone; null to load all customers</param>+ /// <param name="loadOnlyWithShoppingCart">Value indicating whether to load customers only with shopping cart</param>+ /// <param name="sct">+ /// Value indicating what shopping cart type to filter; user when 'loadOnlyWithShoppingCart' param is+ /// 'true'+ /// </param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="orderBySelector"></param>+ /// <returns>Customers</returns>+ Task<IPagedList<Customer>> GetAllCustomers(DateTime? createdFromUtc = null,+ DateTime? createdToUtc = null, string affiliateId = "", string vendorId = "", string storeId = "",+ string ownerId = "",+ string salesEmployeeId = "", string[] customerGroupIds = null, string[] customerTagIds = null,+ string email = null, string username = null,+ string firstName = null, string lastName = null,+ string company = null, string phone = null, string zipPostalCode = null,+ bool loadOnlyWithShoppingCart = false, ShoppingCartType? sct = null,+ int pageIndex = 0, int pageSize = int.MaxValue, Expression<Func<Customer, object>> orderBySelector = null);+++ /// <summary>+ /// Gets online customers+ /// </summary>+ /// <param name="lastActivityFromUtc">Customer last activity date (from)</param>+ /// <param name="customerGroupIds">+ /// A list of customer group identifiers to filter by (at least one match); pass null or+ /// empty list in order to load all customers;+ /// </param>+ /// <param name="storeId">Store ident</param>+ /// <param name="salesEmployeeId">Sales employee ident</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Customers</returns>+ Task<IPagedList<Customer>> GetOnlineCustomers(DateTime lastActivityFromUtc,+ string[] customerGroupIds, string storeId = "", string salesEmployeeId = "", int pageIndex = 0,+ int pageSize = int.MaxValue);++ /// <summary>+ /// Gets count online customers+ /// </summary>+ /// <param name="lastActivityFromUtc">Customer last activity date (from)</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="salesEmployeeId">Sales employee ident</param>+ /// <returns>Int</returns>+ Task<int> GetCountOnlineShoppingCart(DateTime lastActivityFromUtc, string storeId = "",+ string salesEmployeeId = "");++ /// <summary>+ /// Gets a customer+ /// </summary>+ /// <param name="customerId">Customer identifier</param>+ /// <returns>A customer</returns>+ Task<Customer> GetCustomerById(string customerId);++ /// <summary>+ /// Get customers by identifiers+ /// </summary>+ /// <param name="customerIds">Customer identifiers</param>+ /// <returns>Customers</returns>+ Task<IList<Customer>> GetCustomersByIds(string[] customerIds);++ /// <summary>+ /// Gets a customer by GUID+ /// </summary>+ /// <param name="customerGuid">Customer GUID</param>+ /// <returns>A customer</returns>+ Task<Customer> GetCustomerByGuid(Guid customerGuid);++ /// <summary>+ /// Get customer by email+ /// </summary>+ /// <param name="email">Email</param>+ /// <returns>Customer</returns>+ Task<Customer> GetCustomerByEmail(string email);+/// <summary>- /// Customer service interface- /// </summary>- public interface ICustomerService- {- #region Customers-- /// <summary>- /// Gets all customers- /// </summary>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="affiliateId">Affiliate identifier</param>- /// <param name="vendorId">Vendor identifier</param>- /// <param name="storeId">Store identifier</param>- /// <param name="ownerId">Owner identifier</param>- /// <param name="salesEmployeeId">Sales employee identifier</param>- /// <param name="customerGroupIds">A list of customer group identifiers to filter by (at least one match); pass null or empty list in order to load all customers; </param>- /// <param name="customerTagIds"></param>- /// <param name="email">Email; null to load all customers</param>- /// <param name="username">Username; null to load all customers</param>- /// <param name="firstName">First name; null to load all customers</param>- /// <param name="lastName">Last name; null to load all customers</param>- /// <param name="company">Company; null to load all customers</param>- /// <param name="phone">Phone; null to load all customers</param>- /// <param name="zipPostalCode">Phone; null to load all customers</param>- /// <param name="loadOnlyWithShoppingCart">Value indicating whether to load customers only with shopping cart</param>- /// <param name="sct">Value indicating what shopping cart type to filter; user when 'loadOnlyWithShoppingCart' param is 'true'</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="orderBySelector"></param>- /// <returns>Customers</returns>- Task<IPagedList<Customer>> GetAllCustomers(DateTime? createdFromUtc = null,- DateTime? createdToUtc = null, string affiliateId = "", string vendorId = "", string storeId = "", string ownerId = "",- string salesEmployeeId = "", string[] customerGroupIds = null, string[] customerTagIds = null, string email = null, string username = null,- string firstName = null, string lastName = null,- string company = null, string phone = null, string zipPostalCode = null,- bool loadOnlyWithShoppingCart = false, ShoppingCartType? sct = null,- int pageIndex = 0, int pageSize = int.MaxValue, Expression<Func<Customer, object>> orderBySelector = null);--- /// <summary>- /// Gets online customers- /// </summary>- /// <param name="lastActivityFromUtc">Customer last activity date (from)</param>- /// <param name="customerGroupIds">A list of customer group identifiers to filter by (at least one match); pass null or empty list in order to load all customers; </param>- /// <param name="storeId">Store ident</param>- /// <param name="salesEmployeeId">Sales employee ident</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Customers</returns>- Task<IPagedList<Customer>> GetOnlineCustomers(DateTime lastActivityFromUtc,- string[] customerGroupIds, string storeId = "", string salesEmployeeId = "", int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets count online customers- /// </summary>- /// <param name="lastActivityFromUtc">Customer last activity date (from)</param>- /// <param name="storeId">Store ident</param>- /// <param name="salesEmployeeId">Sales employee ident</param>- /// <returns>Int</returns>- Task<int> GetCountOnlineShoppingCart(DateTime lastActivityFromUtc, string storeId = "", string salesEmployeeId = "");-- /// <summary>- /// Gets a customer- /// </summary>- /// <param name="customerId">Customer identifier</param>- /// <returns>A customer</returns>- Task<Customer> GetCustomerById(string customerId);-- /// <summary>- /// Get customers by identifiers- /// </summary>- /// <param name="customerIds">Customer identifiers</param>- /// <returns>Customers</returns>- Task<IList<Customer>> GetCustomersByIds(string[] customerIds);-- /// <summary>- /// Gets a customer by GUID- /// </summary>- /// <param name="customerGuid">Customer GUID</param>- /// <returns>A customer</returns>- Task<Customer> GetCustomerByGuid(Guid customerGuid);-- /// <summary>- /// Get customer by email- /// </summary>- /// <param name="email">Email</param>- /// <returns>Customer</returns>- Task<Customer> GetCustomerByEmail(string email);-- /// <summary>- /// Get customer by system group- /// </summary>- /// <param name="systemName">System name</param>- /// <returns>Customer</returns>- Task<Customer> GetCustomerBySystemName(string systemName);-- /// <summary>- /// Get customer by username- /// </summary>- /// <param name="username">Username</param>- /// <returns>Customer</returns>- Task<Customer> GetCustomerByUsername(string username);-- /// <summary>- /// Insert a guest customer- /// </summary>- /// <returns>Customer</returns>- Task<Customer> InsertGuestCustomer(Customer customer = null);-- /// <summary>- /// Insert a customer- /// </summary>- /// <param name="customer">Customer</param>- Task InsertCustomer(Customer customer);-- /// <summary>- /// Updates the customer- /// </summary>- /// <param name="customer">Customer</param>- Task UpdateCustomer(Customer customer);-- /// <summary>- /// Delete a customer- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="hard">Hard delete from database</param>- Task DeleteCustomer(Customer customer, bool hard = false);-- /// <summary>- /// Updates the customer field- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="expression"></param>- /// <param name="value"></param>- Task UpdateCustomerField<T>(Customer customer,- Expression<Func<Customer, T>> expression, T value);-- /// <summary>- /// Updates the customer field- /// </summary>- /// <param name="customerId">Customer ident</param>- /// <param name="expression"></param>- /// <param name="value"></param>- Task UpdateCustomerField<T>(string customerId,- Expression<Func<Customer, T>> expression, T value);-- /// <summary>- /// Updates the customer- /// </summary>- /// <param name="customer">Customer</param>- Task UpdateActive(Customer customer);-- /// <summary>- /// Update the customer- /// </summary>- /// <param name="customer"></param>- Task UpdateContributions(Customer customer);-- /// <summary>- /// Updates the customer- /// </summary>- /// <param name="customer">Customer</param>- Task UpdateCustomerLastLoginDate(Customer customer);-- /// <summary>- /// Updates the customer in admin panel- /// </summary>- /// <param name="customer">Customer</param>- Task UpdateCustomerInAdminPanel(Customer customer);-- /// <summary>- /// Reset data required for checkout- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="storeId">Store identifier</param>- /// <param name="clearCouponCodes">A value indicating whether to clear coupon code</param>- /// <param name="clearCheckoutAttributes">A value indicating whether to clear selected checkout attributes</param>- /// <param name="clearLoyaltyPoints">A value indicating whether to clear "Use loyalty points" flag</param>- /// <param name="clearShipping">A value indicating whether to clear selected shipping method</param>- /// <param name="clearPayment">A value indicating whether to clear selected payment method</param>- Task ResetCheckoutData(Customer customer, string storeId,- bool clearCouponCodes = false, bool clearCheckoutAttributes = false,- bool clearLoyaltyPoints = true, bool clearShipping = true, bool clearPayment = true);-- /// <summary>- /// Delete guest customer records- /// </summary>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="onlyWithoutShoppingCart">A value indicating whether to delete customers only without shopping cart</param>- /// <returns>Number of deleted customers</returns>- Task<int> DeleteGuestCustomers(DateTime? createdFromUtc, DateTime? createdToUtc, bool onlyWithoutShoppingCart);-- #endregion-- #region Customer Group in Customer-- Task InsertCustomerGroupInCustomer(CustomerGroup customerGroup, string customerId);-- Task DeleteCustomerGroupInCustomer(CustomerGroup customerGroup, string customerId);-- #endregion-- #region Customer address-- Task DeleteAddress(Address address, string customerId);- Task InsertAddress(Address address, string customerId);- Task UpdateAddress(Address address, string customerId);- Task UpdateBillingAddress(Address address, string customerId);- Task UpdateShippingAddress(Address address, string customerId);-- #endregion-- #region Shopping cart-- Task ClearShoppingCartItem(string customerId, IList<ShoppingCartItem> cart);- Task DeleteShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);- Task InsertShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);- Task UpdateShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);- #endregion-- }+ /// Get customer by system group+ /// </summary>+ /// <param name="systemName">System name</param>+ /// <returns>Customer</returns>+ Task<Customer> GetCustomerBySystemName(string systemName);++ /// <summary>+ /// Get customer by username+ /// </summary>+ /// <param name="username">Username</param>+ /// <returns>Customer</returns>+ Task<Customer> GetCustomerByUsername(string username);++ /// <summary>+ /// Insert a guest customer+ /// </summary>+ /// <returns>Customer</returns>+ Task<Customer> InsertGuestCustomer(Customer customer = null);++ /// <summary>+ /// Insert a customer+ /// </summary>+ /// <param name="customer">Customer</param>+ Task InsertCustomer(Customer customer);++ /// <summary>+ /// Updates the customer+ /// </summary>+ /// <param name="customer">Customer</param>+ Task UpdateCustomer(Customer customer);++ /// <summary>+ /// Delete a customer+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="hard">Hard delete from database</param>+ Task DeleteCustomer(Customer customer, bool hard = false);++ /// <summary>+ /// Updates the customer field+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="expression"></param>+ /// <param name="value"></param>+ Task UpdateCustomerField<T>(Customer customer,+ Expression<Func<Customer, T>> expression, T value);++ /// <summary>+ /// Updates the customer field+ /// </summary>+ /// <param name="customerId">Customer ident</param>+ /// <param name="expression"></param>+ /// <param name="value"></param>+ Task UpdateCustomerField<T>(string customerId,+ Expression<Func<Customer, T>> expression, T value);++ /// <summary>+ /// Updates the customer+ /// </summary>+ /// <param name="customer">Customer</param>+ Task UpdateActive(Customer customer);++ /// <summary>+ /// Update the customer+ /// </summary>+ /// <param name="customer"></param>+ Task UpdateContributions(Customer customer);++ /// <summary>+ /// Updates the customer+ /// </summary>+ /// <param name="customer">Customer</param>+ Task UpdateCustomerLastLoginDate(Customer customer);++ /// <summary>+ /// Updates the customer in admin panel+ /// </summary>+ /// <param name="customer">Customer</param>+ Task UpdateCustomerInAdminPanel(Customer customer);++ /// <summary>+ /// Reset data required for checkout+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="clearCouponCodes">A value indicating whether to clear coupon code</param>+ /// <param name="clearCheckoutAttributes">A value indicating whether to clear selected checkout attributes</param>+ /// <param name="clearLoyaltyPoints">A value indicating whether to clear "Use loyalty points" flag</param>+ /// <param name="clearShipping">A value indicating whether to clear selected shipping method</param>+ /// <param name="clearPayment">A value indicating whether to clear selected payment method</param>+ Task ResetCheckoutData(Customer customer, string storeId,+ bool clearCouponCodes = false, bool clearCheckoutAttributes = false,+ bool clearLoyaltyPoints = true, bool clearShipping = true, bool clearPayment = true);++ /// <summary>+ /// Delete guest customer records+ /// </summary>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="onlyWithoutShoppingCart">A value indicating whether to delete customers only without shopping cart</param>+ /// <returns>Number of deleted customers</returns>+ Task<int> DeleteGuestCustomers(DateTime? createdFromUtc, DateTime? createdToUtc, bool onlyWithoutShoppingCart);++ #endregion++ #region Customer Group in Customer++ Task InsertCustomerGroupInCustomer(CustomerGroup customerGroup, string customerId);++ Task DeleteCustomerGroupInCustomer(CustomerGroup customerGroup, string customerId);++ #endregion++ #region Customer address++ Task DeleteAddress(Address address, string customerId);+ Task InsertAddress(Address address, string customerId);+ Task UpdateAddress(Address address, string customerId);+ Task UpdateBillingAddress(Address address, string customerId);+ Task UpdateShippingAddress(Address address, string customerId);++ #endregion++ #region Shopping cart++ Task ClearShoppingCartItem(string customerId, IList<ShoppingCartItem> cart);+ Task DeleteShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);+ Task InsertShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);+ Task UpdateShoppingCartItem(string customerId, ShoppingCartItem shoppingCartItem);++ #endregion}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/ISalesEmployeeService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/ISalesEmployeeService.csindex df304b084..b8a585adf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/ISalesEmployeeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/ISalesEmployeeService.cs@@ -1,39 +1,37 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers-{- public interface ISalesEmployeeService- {- /// <summary>- /// Gets a sales employee- /// </summary>- /// <param name="salesEmployeeId">The sales employee identifier</param>- /// <returns>SalesEmployee</returns>- Task<SalesEmployee> GetSalesEmployeeById(string salesEmployeeId);+namespace Grand.Business.Core.Interfaces.Customers;- /// <summary>- /// Gets all sales employees- /// </summary>- /// <returns>Warehouses</returns>- Task<IList<SalesEmployee>> GetAll();+public interface ISalesEmployeeService+{+ /// <summary>+ /// Gets a sales employee+ /// </summary>+ /// <param name="salesEmployeeId">The sales employee identifier</param>+ /// <returns>SalesEmployee</returns>+ Task<SalesEmployee> GetSalesEmployeeById(string salesEmployeeId);- /// <summary>- /// Inserts a sales employee- /// </summary>- /// <param name="salesEmployee">Sales Employee</param>- Task InsertSalesEmployee(SalesEmployee salesEmployee);+ /// <summary>+ /// Gets all sales employees+ /// </summary>+ /// <returns>Warehouses</returns>+ Task<IList<SalesEmployee>> GetAll();- /// <summary>- /// Updates the sales employee- /// </summary>- /// <param name="salesEmployee">Sales Employee</param>- Task UpdateSalesEmployee(SalesEmployee salesEmployee);+ /// <summary>+ /// Inserts a sales employee+ /// </summary>+ /// <param name="salesEmployee">Sales Employee</param>+ Task InsertSalesEmployee(SalesEmployee salesEmployee);- /// <summary>- /// Deletes a sales employee- /// </summary>- /// <param name="salesEmployee">The sales employee</param>- Task DeleteSalesEmployee(SalesEmployee salesEmployee);+ /// <summary>+ /// Updates the sales employee+ /// </summary>+ /// <param name="salesEmployee">Sales Employee</param>+ Task UpdateSalesEmployee(SalesEmployee salesEmployee);- }-}+ /// <summary>+ /// Deletes a sales employee+ /// </summary>+ /// <param name="salesEmployee">The sales employee</param>+ Task DeleteSalesEmployee(SalesEmployee salesEmployee);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/IUserApiService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/IUserApiService.csindex a3bdb6580..f84eee91d 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/IUserApiService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/IUserApiService.cs@@ -1,46 +1,45 @@using Grand.Domain;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++public interface IUserApiService{- public interface IUserApiService- {- /// <summary>- /// Get user api by id- /// </summary>- /// <param name="id">id</param>- Task<UserApi> GetUserById(string id);+ /// <summary>+ /// Get user api by id+ /// </summary>+ /// <param name="id">id</param>+ Task<UserApi> GetUserById(string id);- /// <summary>- /// Get user api by email- /// </summary>- /// <param name="email">email</param>- Task<UserApi> GetUserByEmail(string email);+ /// <summary>+ /// Get user api by email+ /// </summary>+ /// <param name="email">email</param>+ Task<UserApi> GetUserByEmail(string email);- /// <summary>- /// Insert user api- /// </summary>- /// <param name="userApi">User api</param>- Task InsertUserApi(UserApi userApi);+ /// <summary>+ /// Insert user api+ /// </summary>+ /// <param name="userApi">User api</param>+ Task InsertUserApi(UserApi userApi);- /// <summary>- /// Update user api- /// </summary>- /// <param name="userApi">User api</param>- Task UpdateUserApi(UserApi userApi);+ /// <summary>+ /// Update user api+ /// </summary>+ /// <param name="userApi">User api</param>+ Task UpdateUserApi(UserApi userApi);- /// <summary>- /// Delete user api- /// </summary>- /// <param name="userApi">User api</param>- Task DeleteUserApi(UserApi userApi);+ /// <summary>+ /// Delete user api+ /// </summary>+ /// <param name="userApi">User api</param>+ Task DeleteUserApi(UserApi userApi);- /// <summary>- /// Get users api- /// </summary>- /// <param name="email"></param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- Task<IPagedList<UserApi>> GetUsers(string email = "", int pageIndex = 0, int pageSize = 2147483647);- }-}+ /// <summary>+ /// Get users api+ /// </summary>+ /// <param name="email"></param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ Task<IPagedList<UserApi>> GetUsers(string email = "", int pageIndex = 0, int pageSize = 2147483647);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Customers/IVendorService.cs b/src/Business/Grand.Business.Core/Interfaces/Customers/IVendorService.csindex 6d84cee4a..e2227c64c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Customers/IVendorService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Customers/IVendorService.cs@@ -1,135 +1,135 @@using Grand.Domain;using Grand.Domain.Vendors;-namespace Grand.Business.Core.Interfaces.Customers+namespace Grand.Business.Core.Interfaces.Customers;++/// <summary>+/// Vendor service interface+/// </summary>+public interface IVendorService{/// <summary>- /// Vendor service interface- /// </summary>- public interface IVendorService- {- /// <summary>- /// Gets a vendor by vendor identifier- /// </summary>- /// <param name="vendorId">Vendor identifier</param>- /// <returns>Vendor</returns>- Task<Vendor> GetVendorById(string vendorId);-- /// <summary>- /// Gets all vendors- /// </summary>- /// <param name="name">Vendor name</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Vendors</returns>- Task<IPagedList<Vendor>> GetAllVendors(string name = "",- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);-- /// <summary>- /// Inserts a vendor- /// </summary>- /// <param name="vendor">Vendor</param>- Task InsertVendor(Vendor vendor);-- /// <summary>- /// Updates the vendor- /// </summary>- /// <param name="vendor">Vendor</param>- Task UpdateVendor(Vendor vendor);--- /// <summary>- /// Delete a vendor- /// </summary>- /// <param name="vendor">Vendor</param>- Task DeleteVendor(Vendor vendor);-- /// <summary>- /// Gets a vendor note note- /// </summary>- /// <param name="vendorId">The vendor identifier</param>- /// <param name="vendorNoteId">The vendor note identifier</param>- /// <returns>Vendor note</returns>- Task<VendorNote> GetVendorNoteById(string vendorId,string vendorNoteId);-- /// <summary>- /// Insert a vendor note- /// </summary>- /// <param name="vendorNote">The vendor note</param>- /// <param name="vendorId">Vendor ident</param>- Task InsertVendorNote(VendorNote vendorNote, string vendorId);- /// <summary>- /// Deletes a vendor note- /// </summary>- /// <param name="vendorNote">The vendor note</param>- /// <param name="vendorId">Vendor ident</param>- Task DeleteVendorNote(VendorNote vendorNote, string vendorId);-- /// <summary>- /// Gets a vendor mapping- /// </summary>- /// <param name="discountId">Discount id mapping identifier</param>- /// <returns>vendor mapping</returns>- Task<IList<Vendor>> GetAllVendorsByDiscount(string discountId);-- #region Vendor reviews-- /// <summary>- /// Update Vendor review totals- /// </summary>- /// <param name="vendor">Vendor</param>- Task UpdateVendorReviewTotals(Vendor vendor);-- /// <summary>- /// Update Vendor review- /// </summary>- /// <param name="vendorReview">vendor review</param>- Task UpdateVendorReview(VendorReview vendorReview);-- /// <summary>- /// Insert Vendor review- /// </summary>- /// <param name="vendorReview">vendor review</param>- Task InsertVendorReview(VendorReview vendorReview);-- /// <summary>- /// Gets all vendor reviews- /// </summary>- /// <param name="customerId">Customer identifier; "" to load all records</param>- /// <param name="approved">A value indicating whether to content is approved; null to load all records</param>- /// <param name="fromUtc">Item creation from; null to load all records</param>- /// <param name="toUtc">Item item creation to; null to load all records</param>- /// <param name="message">Search title or review text; null to load all records</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Reviews</returns>- Task<IPagedList<VendorReview>> GetAllVendorReviews(string customerId, bool? approved,- DateTime? fromUtc = null, DateTime? toUtc = null,- string message = null, string vendorId = "", int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Gets vendor review- /// </summary>- /// <param name="vendorReviewId">Vendor review identifier</param>- /// <returns>Vendor review</returns>- Task<VendorReview> GetVendorReviewById(string vendorReviewId);-- /// <summary>- /// Deletes a vendor review- /// </summary>- /// <param name="vendorReview">Vendor review</param>- Task DeleteVendorReview(VendorReview vendorReview);-- /// <summary>- /// Search vendors- /// </summary>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="keywords">Keywords</param>- /// <returns>Vendors</returns>- Task<IList<Vendor>> SearchVendors(string vendorId = "", string keywords = null);-- #endregion- }+ /// Gets a vendor by vendor identifier+ /// </summary>+ /// <param name="vendorId">Vendor identifier</param>+ /// <returns>Vendor</returns>+ Task<Vendor> GetVendorById(string vendorId);++ /// <summary>+ /// Gets all vendors+ /// </summary>+ /// <param name="name">Vendor name</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Vendors</returns>+ Task<IPagedList<Vendor>> GetAllVendors(string name = "",+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);++ /// <summary>+ /// Inserts a vendor+ /// </summary>+ /// <param name="vendor">Vendor</param>+ Task InsertVendor(Vendor vendor);++ /// <summary>+ /// Updates the vendor+ /// </summary>+ /// <param name="vendor">Vendor</param>+ Task UpdateVendor(Vendor vendor);+++ /// <summary>+ /// Delete a vendor+ /// </summary>+ /// <param name="vendor">Vendor</param>+ Task DeleteVendor(Vendor vendor);++ /// <summary>+ /// Gets a vendor note note+ /// </summary>+ /// <param name="vendorId">The vendor identifier</param>+ /// <param name="vendorNoteId">The vendor note identifier</param>+ /// <returns>Vendor note</returns>+ Task<VendorNote> GetVendorNoteById(string vendorId, string vendorNoteId);++ /// <summary>+ /// Insert a vendor note+ /// </summary>+ /// <param name="vendorNote">The vendor note</param>+ /// <param name="vendorId">Vendor ident</param>+ Task InsertVendorNote(VendorNote vendorNote, string vendorId);++ /// <summary>+ /// Deletes a vendor note+ /// </summary>+ /// <param name="vendorNote">The vendor note</param>+ /// <param name="vendorId">Vendor ident</param>+ Task DeleteVendorNote(VendorNote vendorNote, string vendorId);++ /// <summary>+ /// Gets a vendor mapping+ /// </summary>+ /// <param name="discountId">Discount id mapping identifier</param>+ /// <returns>vendor mapping</returns>+ Task<IList<Vendor>> GetAllVendorsByDiscount(string discountId);++ #region Vendor reviews++ /// <summary>+ /// Update Vendor review totals+ /// </summary>+ /// <param name="vendor">Vendor</param>+ Task UpdateVendorReviewTotals(Vendor vendor);++ /// <summary>+ /// Update Vendor review+ /// </summary>+ /// <param name="vendorReview">vendor review</param>+ Task UpdateVendorReview(VendorReview vendorReview);++ /// <summary>+ /// Insert Vendor review+ /// </summary>+ /// <param name="vendorReview">vendor review</param>+ Task InsertVendorReview(VendorReview vendorReview);++ /// <summary>+ /// Gets all vendor reviews+ /// </summary>+ /// <param name="customerId">Customer identifier; "" to load all records</param>+ /// <param name="approved">A value indicating whether to content is approved; null to load all records</param>+ /// <param name="fromUtc">Item creation from; null to load all records</param>+ /// <param name="toUtc">Item item creation to; null to load all records</param>+ /// <param name="message">Search title or review text; null to load all records</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Reviews</returns>+ Task<IPagedList<VendorReview>> GetAllVendorReviews(string customerId, bool? approved,+ DateTime? fromUtc = null, DateTime? toUtc = null,+ string message = null, string vendorId = "", int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Gets vendor review+ /// </summary>+ /// <param name="vendorReviewId">Vendor review identifier</param>+ /// <returns>Vendor review</returns>+ Task<VendorReview> GetVendorReviewById(string vendorReviewId);++ /// <summary>+ /// Deletes a vendor review+ /// </summary>+ /// <param name="vendorReview">Vendor review</param>+ Task DeleteVendorReview(VendorReview vendorReview);++ /// <summary>+ /// Search vendors+ /// </summary>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="keywords">Keywords</param>+ /// <returns>Vendors</returns>+ Task<IList<Vendor>> SearchVendors(string vendorId = "", string keywords = null);++ #endregion}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportManager.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportManager.csindex 7d13ae2ef..8df5cc9ff 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportManager.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportManager.cs@@ -1,12 +1,10 @@-namespace Grand.Business.Core.Interfaces.ExportImport-{- public interface IExportManager<T>- {- /// <summary>- /// Export list of entity to XLSX- /// </summary>- /// <param name="entity">list of entity</param>- Task<byte[]> Export(IEnumerable<T> entity);+namespace Grand.Business.Core.Interfaces.ExportImport;- }-}+public interface IExportManager<T>+{+ /// <summary>+ /// Export list of entity to XLSX+ /// </summary>+ /// <param name="entity">list of entity</param>+ Task<byte[]> Export(IEnumerable<T> entity);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportProvider.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportProvider.csindex 0cf73b320..88a3b405d 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IExportProvider.cs@@ -1,11 +1,10 @@using Grand.Business.Core.Utilities.ExportImport;-namespace Grand.Business.Core.Interfaces.ExportImport+namespace Grand.Business.Core.Interfaces.ExportImport;++public interface IExportProvider{- public interface IExportProvider- {- byte[] ExportToByte<T>(PropertyByName<T>[] properties, IEnumerable<T> itemsToExport);- IExportProvider BuilderExportToByte<T>(PropertyByName<T>[] properties, IEnumerable<T> itemsToExport);- byte[] BuilderExportToByte();- }-}+ byte[] ExportToByte<T>(PropertyByName<T>[] properties, IEnumerable<T> itemsToExport);+ IExportProvider BuilderExportToByte<T>(PropertyByName<T>[] properties, IEnumerable<T> itemsToExport);+ byte[] BuilderExportToByte();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataObject.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataObject.csindex 483d23baf..032366992 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataObject.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataObject.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Interfaces.ExportImport+namespace Grand.Business.Core.Interfaces.ExportImport;++public interface IImportDataObject<T>{- public interface IImportDataObject<T>- {- Task Execute(IEnumerable<T> data);- }+ Task Execute(IEnumerable<T> data);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataProvider.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataProvider.csindex c389a75aa..2488925ea 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportDataProvider.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Interfaces.ExportImport+namespace Grand.Business.Core.Interfaces.ExportImport;++public interface IImportDataProvider{- public interface IImportDataProvider- {- Task<IEnumerable<T>> Convert<T>(Stream stream);- }-}+ Task<IEnumerable<T>> Convert<T>(Stream stream);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportManager.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportManager.csindex c0dbf741a..975b0c7fb 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportManager.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/IImportManager.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Interfaces.ExportImport+namespace Grand.Business.Core.Interfaces.ExportImport;++public interface IImportManager<T>{- public interface IImportManager<T>- {- Task Import(Stream stream);- }-}+ Task Import(Stream stream);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/ExportImport/ISchemaProperty.cs b/src/Business/Grand.Business.Core/Interfaces/ExportImport/ISchemaProperty.csindex 56c53312f..bbb41a92e 100644--- a/src/Business/Grand.Business.Core/Interfaces/ExportImport/ISchemaProperty.cs+++ b/src/Business/Grand.Business.Core/Interfaces/ExportImport/ISchemaProperty.cs@@ -1,9 +1,8 @@using Grand.Business.Core.Utilities.ExportImport;-namespace Grand.Business.Core.Interfaces.ExportImport+namespace Grand.Business.Core.Interfaces.ExportImport;++public interface ISchemaProperty<T>{- public interface ISchemaProperty<T>- {- Task<PropertyByName<T>[]> GetProperties();- }-}+ Task<PropertyByName<T>[]> GetProperties();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Campaigns/ICampaignService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Campaigns/ICampaignService.csindex 241e748ff..c9ff1a9c9 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Campaigns/ICampaignService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Campaigns/ICampaignService.cs@@ -1,77 +1,79 @@using Grand.Domain;using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Campaigns+namespace Grand.Business.Core.Interfaces.Marketing.Campaigns;++public interface ICampaignService{- public interface ICampaignService- {- /// <summary>- /// Inserts a campaign- /// </summary>- /// <param name="campaign">Campaign</param>- Task InsertCampaign(Campaign campaign);+ /// <summary>+ /// Inserts a campaign+ /// </summary>+ /// <param name="campaign">Campaign</param>+ Task InsertCampaign(Campaign campaign);++ /// <summary>+ /// Inserts a campaign history+ /// </summary>+ /// <param name="campaignHistory">Campaign history</param>+ Task InsertCampaignHistory(CampaignHistory campaignHistory);- /// <summary>- /// Inserts a campaign history- /// </summary>- /// <param name="campaignHistory">Campaign history</param>- Task InsertCampaignHistory(CampaignHistory campaignHistory);- /// <summary>- /// Updates a campaign- /// </summary>- /// <param name="campaign">Campaign</param>- Task UpdateCampaign(Campaign campaign);+ /// <summary>+ /// Updates a campaign+ /// </summary>+ /// <param name="campaign">Campaign</param>+ Task UpdateCampaign(Campaign campaign);- /// <summary>- /// Deleted a queued email- /// </summary>- /// <param name="campaign">Campaign</param>- Task DeleteCampaign(Campaign campaign);+ /// <summary>+ /// Deleted a queued email+ /// </summary>+ /// <param name="campaign">Campaign</param>+ Task DeleteCampaign(Campaign campaign);- /// <summary>- /// Gets a campaign by identifier- /// </summary>- /// <param name="campaignId">Campaign identifier</param>- /// <returns>Campaign</returns>- Task<Campaign> GetCampaignById(string campaignId);+ /// <summary>+ /// Gets a campaign by identifier+ /// </summary>+ /// <param name="campaignId">Campaign identifier</param>+ /// <returns>Campaign</returns>+ Task<Campaign> GetCampaignById(string campaignId);- /// <summary>- /// Gets all campaigns- /// </summary>- /// <returns>Campaigns</returns>- Task<IList<Campaign>> GetAllCampaigns();+ /// <summary>+ /// Gets all campaigns+ /// </summary>+ /// <returns>Campaigns</returns>+ Task<IList<Campaign>> GetAllCampaigns();- /// <summary>- /// Gets campaign history- /// </summary>- /// <returns>Campaigns</returns>- Task<IPagedList<CampaignHistory>> GetCampaignHistory(Campaign campaign, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets campaign history+ /// </summary>+ /// <returns>Campaigns</returns>+ Task<IPagedList<CampaignHistory>> GetCampaignHistory(Campaign campaign, int pageIndex = 0,+ int pageSize = int.MaxValue);- /// <summary>- /// Gets customer subscriptions- /// </summary>- /// <param name="campaign">Campaign</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>CampaignCustomerSubscription</returns>- Task<IPagedList<NewsLetterSubscription>> CustomerSubscriptions(Campaign campaign, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets customer subscriptions+ /// </summary>+ /// <param name="campaign">Campaign</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>CampaignCustomerSubscription</returns>+ Task<IPagedList<NewsLetterSubscription>> CustomerSubscriptions(Campaign campaign, int pageIndex = 0,+ int pageSize = int.MaxValue);- /// <summary>- /// Sends a campaign to specified emails- /// </summary>- /// <param name="campaign">Campaign</param>- /// <param name="emailAccount">Email account</param>- /// <param name="subscriptions">Subscriptions</param>- /// <returns>Total emails sent</returns>- Task<int> SendCampaign(Campaign campaign, EmailAccount emailAccount,- IEnumerable<NewsLetterSubscription> subscriptions);+ /// <summary>+ /// Sends a campaign to specified emails+ /// </summary>+ /// <param name="campaign">Campaign</param>+ /// <param name="emailAccount">Email account</param>+ /// <param name="subscriptions">Subscriptions</param>+ /// <returns>Total emails sent</returns>+ Task<int> SendCampaign(Campaign campaign, EmailAccount emailAccount,+ IEnumerable<NewsLetterSubscription> subscriptions);- /// <summary>- /// Sends a campaign to specified email- /// </summary>- /// <param name="campaign">Campaign</param>- /// <param name="emailAccount">Email account</param>- /// <param name="email">Email</param>- Task SendCampaign(Campaign campaign, EmailAccount emailAccount, string email);- }-}+ /// <summary>+ /// Sends a campaign to specified email+ /// </summary>+ /// <param name="campaign">Campaign</param>+ /// <param name="emailAccount">Email account</param>+ /// <param name="email">Email</param>+ Task SendCampaign(Campaign campaign, EmailAccount emailAccount, string email);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeParser.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeParser.csindex 3643b3a8e..a5dc53b7a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeParser.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeParser.cs@@ -3,75 +3,75 @@ using Grand.Domain.Customers;using Grand.Domain.Localization;using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Contacts+namespace Grand.Business.Core.Interfaces.Marketing.Contacts;++/// <summary>+/// Contact attribute parser interface+/// </summary>+public interface IContactAttributeParser{/// <summary>- /// Contact attribute parser interface+ /// Gets selected contact attributes/// </summary>- public interface IContactAttributeParser- {- /// <summary>- /// Gets selected contact attributes- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Selected contact attributes</returns>- Task<IList<ContactAttribute>> ParseContactAttributes(IList<CustomAttribute> customAttributes);+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Selected contact attributes</returns>+ Task<IList<ContactAttribute>> ParseContactAttributes(IList<CustomAttribute> customAttributes);- /// <summary>- /// Get contact attribute values- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <returns>Contact attribute values</returns>- Task<IList<ContactAttributeValue>> ParseContactAttributeValues(IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Get contact attribute values+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <returns>Contact attribute values</returns>+ Task<IList<ContactAttributeValue>> ParseContactAttributeValues(IList<CustomAttribute> customAttributes);- /// <summary>- /// Adds an attribute- /// </summary>- /// <param name="customAttributes">Attributes</param>- /// <param name="ca">Contact attribute</param>- /// <param name="value">Value</param>- /// <returns>Attributes</returns>- IList<CustomAttribute> AddContactAttribute(IList<CustomAttribute> customAttributes, ContactAttribute ca, string value);+ /// <summary>+ /// Adds an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes</param>+ /// <param name="ca">Contact attribute</param>+ /// <param name="value">Value</param>+ /// <returns>Attributes</returns>+ IList<CustomAttribute> AddContactAttribute(IList<CustomAttribute> customAttributes, ContactAttribute ca,+ string value);- /// <summary>- /// Check whether condition of some attribute is met (if specified). Return "null" if not condition is specified- /// </summary>- /// <param name="attribute">Contact attribute</param>- /// <param name="customAttributes">Selected attributes</param>- /// <returns>Result</returns>- Task<bool?> IsConditionMet(ContactAttribute attribute, IList<CustomAttribute> customAttributes);+ /// <summary>+ /// Check whether condition of some attribute is met (if specified). Return "null" if not condition is specified+ /// </summary>+ /// <param name="attribute">Contact attribute</param>+ /// <param name="customAttributes">Selected attributes</param>+ /// <returns>Result</returns>+ Task<bool?> IsConditionMet(ContactAttribute attribute, IList<CustomAttribute> customAttributes);- /// <summary>- /// Remove an attribute- /// </summary>- /// <param name="customAttributes">Attributes in XML format</param>- /// <param name="attribute">contact attribute</param>- /// <returns>Updated result (XML format)</returns>- IList<CustomAttribute> RemoveContactAttribute(IList<CustomAttribute> customAttributes, ContactAttribute attribute);+ /// <summary>+ /// Remove an attribute+ /// </summary>+ /// <param name="customAttributes">Attributes in XML format</param>+ /// <param name="attribute">contact attribute</param>+ /// <returns>Updated result (XML format)</returns>+ IList<CustomAttribute> RemoveContactAttribute(IList<CustomAttribute> customAttributes, ContactAttribute attribute);- /// <summary>- /// Formats attributes- /// </summary>- /// <param name="language">Language</param>- /// <param name="customAttributes">Attributes </param>- /// <param name="customer">Customer</param>- /// <param name="separator">Separator</param>- /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>- /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>- /// <returns>Attributes</returns>- Task<string> FormatAttributes(- Language language,- IList<CustomAttribute> customAttributes,- Customer customer,- string separator = "<br />",- bool htmlEncode = true,- bool allowHyperlinks = true);+ /// <summary>+ /// Formats attributes+ /// </summary>+ /// <param name="language">Language</param>+ /// <param name="customAttributes">Attributes </param>+ /// <param name="customer">Customer</param>+ /// <param name="separator">Separator</param>+ /// <param name="htmlEncode">A value indicating whether to encode (HTML) values</param>+ /// <param name="allowHyperlinks">A value indicating whether to HTML hyperlink tags could be rendered (if required)</param>+ /// <returns>Attributes</returns>+ Task<string> FormatAttributes(+ Language language,+ IList<CustomAttribute> customAttributes,+ Customer customer,+ string separator = "<br />",+ bool htmlEncode = true,+ bool allowHyperlinks = true);- /// <summary>- /// Get parse contact attributes- /// </summary>- /// <param name="model"></param>- /// <returns></returns>- Task<IList<CustomAttribute>> GetParseContactAttributes(IList<CustomAttribute> model);- }-}+ /// <summary>+ /// Get parse contact attributes+ /// </summary>+ /// <param name="model"></param>+ /// <returns></returns>+ Task<IList<CustomAttribute>> GetParseContactAttributes(IList<CustomAttribute> model);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeService.csindex a85cf5aca..42f9a4aa3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactAttributeService.cs@@ -1,47 +1,46 @@using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Contacts+namespace Grand.Business.Core.Interfaces.Marketing.Contacts;++/// <summary>+/// Contact attribute service+/// </summary>+public interface IContactAttributeService{+ #region Contact attributes++ /// <summary>+ /// Deletes a contact attribute+ /// </summary>+ /// <param name="contactAttribute">Contact attribute</param>+ Task DeleteContactAttribute(ContactAttribute contactAttribute);++ /// <summary>+ /// Gets all Contact attributes+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="ignoreAcl">Ignore acl</param>+ /// <returns>Contact attributes</returns>+ Task<IList<ContactAttribute>> GetAllContactAttributes(string storeId = "", bool ignoreAcl = false);+/// <summary>- /// Contact attribute service+ /// Gets a Contact attribute/// </summary>- public interface IContactAttributeService- {- #region Contact attributes-- /// <summary>- /// Deletes a contact attribute- /// </summary>- /// <param name="contactAttribute">Contact attribute</param>- Task DeleteContactAttribute(ContactAttribute contactAttribute);-- /// <summary>- /// Gets all Contact attributes- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="ignoreAcl">Ignore acl</param>- /// <returns>Contact attributes</returns>- Task<IList<ContactAttribute>> GetAllContactAttributes(string storeId = "", bool ignoreAcl = false);-- /// <summary>- /// Gets a Contact attribute- /// </summary>- /// <param name="contactAttributeId">Contact attribute identifier</param>- /// <returns>Contact attribute</returns>- Task<ContactAttribute> GetContactAttributeById(string contactAttributeId);-- /// <summary>- /// Inserts a Contact attribute- /// </summary>- /// <param name="contactAttribute">Contact attribute</param>- Task InsertContactAttribute(ContactAttribute contactAttribute);-- /// <summary>- /// Updates the Contact attribute- /// </summary>- /// <param name="contactAttribute">Contact attribute</param>- Task UpdateContactAttribute(ContactAttribute contactAttribute);-- #endregion- }-}+ /// <param name="contactAttributeId">Contact attribute identifier</param>+ /// <returns>Contact attribute</returns>+ Task<ContactAttribute> GetContactAttributeById(string contactAttributeId);++ /// <summary>+ /// Inserts a Contact attribute+ /// </summary>+ /// <param name="contactAttribute">Contact attribute</param>+ Task InsertContactAttribute(ContactAttribute contactAttribute);++ /// <summary>+ /// Updates the Contact attribute+ /// </summary>+ /// <param name="contactAttribute">Contact attribute</param>+ Task UpdateContactAttribute(ContactAttribute contactAttribute);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactUsService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactUsService.csindex afbe25ffe..91ecf944f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactUsService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Contacts/IContactUsService.cs@@ -1,53 +1,51 @@using Grand.Domain;using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Contacts+namespace Grand.Business.Core.Interfaces.Marketing.Contacts;++/// <summary>+/// ContactUs interface+/// </summary>+public interface IContactUsService{/// <summary>- /// ContactUs interface+ /// Deletes a contactus item/// </summary>- public interface IContactUsService- {- /// <summary>- /// Deletes a contactus item- /// </summary>- /// <param name="contactus">ContactUs item</param>- Task DeleteContactUs(ContactUs contactus);-- /// <summary>- /// Clears table- /// </summary>- Task ClearTable();+ /// <param name="contactus">ContactUs item</param>+ Task DeleteContactUs(ContactUs contactus);- /// <summary>- /// Gets all contactUs items- /// </summary>- /// <param name="fromUtc">ContactUs item creation from; null to load all records</param>- /// <param name="toUtc">ContactUs item creation to; null to load all records</param>- /// <param name="email">email</param>- /// <param name="vendorId">vendorId; null to load all records</param>- /// <param name="customerId">customerId; null to load all records</param>- /// <param name="storeId">Store ident</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>ContactUs items</returns>- Task<IPagedList<ContactUs>> GetAllContactUs(DateTime? fromUtc = null, DateTime? toUtc = null,- string email = "", string vendorId = "", string customerId = "", string storeId = "",- int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Clears table+ /// </summary>+ Task ClearTable();- /// <summary>- /// Gets a contactus item- /// </summary>- /// <param name="contactUsId">ContactUs item identifier</param>- /// <returns>ContactUs item</returns>- Task<ContactUs> GetContactUsById(string contactUsId);+ /// <summary>+ /// Gets all contactUs items+ /// </summary>+ /// <param name="fromUtc">ContactUs item creation from; null to load all records</param>+ /// <param name="toUtc">ContactUs item creation to; null to load all records</param>+ /// <param name="email">email</param>+ /// <param name="vendorId">vendorId; null to load all records</param>+ /// <param name="customerId">customerId; null to load all records</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>ContactUs items</returns>+ Task<IPagedList<ContactUs>> GetAllContactUs(DateTime? fromUtc = null, DateTime? toUtc = null,+ string email = "", string vendorId = "", string customerId = "", string storeId = "",+ int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Inserts a contactus item- /// </summary>- /// <param name="contactus">ContactUs</param>- /// <returns>A contactus item</returns>- Task InsertContactUs(ContactUs contactus);+ /// <summary>+ /// Gets a contactus item+ /// </summary>+ /// <param name="contactUsId">ContactUs item identifier</param>+ /// <returns>ContactUs item</returns>+ Task<ContactUs> GetContactUsById(string contactUsId);- }-}+ /// <summary>+ /// Inserts a contactus item+ /// </summary>+ /// <param name="contactus">ContactUs</param>+ /// <returns>A contactus item</returns>+ Task InsertContactUs(ContactUs contactus);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseActionService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseActionService.csindex 9e33a86d8..45b8db5f2 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseActionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseActionService.cs@@ -1,13 +1,12 @@using Grand.Domain.Courses;-namespace Grand.Business.Core.Interfaces.Marketing.Courses+namespace Grand.Business.Core.Interfaces.Marketing.Courses;++public interface ICourseActionService{- public interface ICourseActionService- {- Task<CourseAction> GetById(string id);- Task<CourseAction> GetCourseAction(string customerId, string lessonId);- Task<bool> CustomerLessonCompleted(string customerId, string lessonId);- Task<CourseAction> Update(CourseAction courseAction);- Task<CourseAction> InsertAsync(CourseAction courseAction);- }-}+ Task<CourseAction> GetById(string id);+ Task<CourseAction> GetCourseAction(string customerId, string lessonId);+ Task<bool> CustomerLessonCompleted(string customerId, string lessonId);+ Task<CourseAction> Update(CourseAction courseAction);+ Task<CourseAction> InsertAsync(CourseAction courseAction);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLessonService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLessonService.csindex 55b83afc4..81a8a7616 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLessonService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLessonService.cs@@ -1,13 +1,12 @@using Grand.Domain.Courses;-namespace Grand.Business.Core.Interfaces.Marketing.Courses+namespace Grand.Business.Core.Interfaces.Marketing.Courses;++public interface ICourseLessonService{- public interface ICourseLessonService- {- Task<CourseLesson> GetById(string id);- Task<IList<CourseLesson>> GetByCourseId(string courseId);- Task<CourseLesson> Update(CourseLesson courseLesson);- Task<CourseLesson> Insert(CourseLesson courseLesson);- Task Delete(CourseLesson courseLesson);- }-}+ Task<CourseLesson> GetById(string id);+ Task<IList<CourseLesson>> GetByCourseId(string courseId);+ Task<CourseLesson> Update(CourseLesson courseLesson);+ Task<CourseLesson> Insert(CourseLesson courseLesson);+ Task Delete(CourseLesson courseLesson);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLevelService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLevelService.csindex d6c89808e..8f1eb79fb 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLevelService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseLevelService.cs@@ -1,13 +1,12 @@using Grand.Domain.Courses;-namespace Grand.Business.Core.Interfaces.Marketing.Courses+namespace Grand.Business.Core.Interfaces.Marketing.Courses;++public interface ICourseLevelService{- public interface ICourseLevelService- {- Task<CourseLevel> GetById(string id);- Task<IList<CourseLevel>> GetAll();- Task<CourseLevel> Update(CourseLevel courseLevel);- Task<CourseLevel> Insert(CourseLevel courseLevel);- Task Delete(CourseLevel courseLevel);- }-}+ Task<CourseLevel> GetById(string id);+ Task<IList<CourseLevel>> GetAll();+ Task<CourseLevel> Update(CourseLevel courseLevel);+ Task<CourseLevel> Insert(CourseLevel courseLevel);+ Task Delete(CourseLevel courseLevel);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseService.csindex fc6f2e767..641ab598f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseService.cs@@ -2,15 +2,14 @@using Grand.Domain.Courses;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Marketing.Courses+namespace Grand.Business.Core.Interfaces.Marketing.Courses;++public interface ICourseService{- public interface ICourseService- {- Task<Course> GetById(string id);- Task<IPagedList<Course>> GetAll(int pageIndex = 0, int pageSize = int.MaxValue);- Task<IList<Course>> GetByCustomer(Customer customer, string storeId);- Task<Course> Update(Course course);- Task<Course> Insert(Course course);- Task Delete(Course course);- }-}+ Task<Course> GetById(string id);+ Task<IPagedList<Course>> GetAll(int pageIndex = 0, int pageSize = int.MaxValue);+ Task<IList<Course>> GetByCustomer(Customer customer, string storeId);+ Task<Course> Update(Course course);+ Task<Course> Insert(Course course);+ Task Delete(Course course);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseSubjectService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseSubjectService.csindex 352ad8b60..18c39651f 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseSubjectService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Courses/ICourseSubjectService.cs@@ -1,13 +1,12 @@using Grand.Domain.Courses;-namespace Grand.Business.Core.Interfaces.Marketing.Courses+namespace Grand.Business.Core.Interfaces.Marketing.Courses;++public interface ICourseSubjectService{- public interface ICourseSubjectService- {- Task<CourseSubject> GetById(string id);- Task<IList<CourseSubject>> GetByCourseId(string courseId);- Task<CourseSubject> Update(CourseSubject courseSubject);- Task<CourseSubject> Insert(CourseSubject courseSubject);- Task Delete(CourseSubject courseSubject);- }-}+ Task<CourseSubject> GetById(string id);+ Task<IList<CourseSubject>> GetByCourseId(string courseId);+ Task<CourseSubject> Update(CourseSubject courseSubject);+ Task<CourseSubject> Insert(CourseSubject courseSubject);+ Task Delete(CourseSubject courseSubject);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerCoordinatesService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerCoordinatesService.csindex 0875f4892..008e35bf6 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerCoordinatesService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerCoordinatesService.cs@@ -1,12 +1,11 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Marketing.Customers+namespace Grand.Business.Core.Interfaces.Marketing.Customers;++public interface ICustomerCoordinatesService{- public interface ICustomerCoordinatesService- {- Task<(double longitude, double latitude)> GetGeoCoordinate();- Task<(double longitude, double latitude)> GetGeoCoordinate(Customer customer);- Task SaveGeoCoordinate(double longitude, double latitude);- Task SaveGeoCoordinate(Customer customer, double longitude, double latitude);- }-}+ Task<(double longitude, double latitude)> GetGeoCoordinate();+ Task<(double longitude, double latitude)> GetGeoCoordinate(Customer customer);+ Task SaveGeoCoordinate(double longitude, double latitude);+ Task SaveGeoCoordinate(Customer customer, double longitude, double latitude);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerProductService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerProductService.csindex 19e7447de..f272b0594 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerProductService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerProductService.cs@@ -1,97 +1,98 @@using Grand.Domain;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Marketing.Customers+namespace Grand.Business.Core.Interfaces.Marketing.Customers;++/// <summary>+/// Customer product service interface+/// </summary>+public interface ICustomerProductService{+ #region Customer Product Price++ /// <summary>+ /// Gets a customer product price+ /// </summary>+ /// <param name="id">Identifier</param>+ /// <returns>Customer product price</returns>+ Task<CustomerProductPrice> GetCustomerProductPriceById(string id);+/// <summary>- /// Customer product service interface+ /// Gets a price/// </summary>- public interface ICustomerProductService- {- #region Customer Product Price-- /// <summary>- /// Gets a customer product price- /// </summary>- /// <param name="id">Identifier</param>- /// <returns>Customer product price</returns>- Task<CustomerProductPrice> GetCustomerProductPriceById(string id);-- /// <summary>- /// Gets a price- /// </summary>- /// <param name="customerId">Customer Identifier</param>- /// <param name="productId">Product Identifier</param>- /// <returns>Customer product price</returns>- Task<double?> GetPriceByCustomerProduct(string customerId, string productId);-- /// <summary>- /// Gets a customer product- /// </summary>- /// <param name="id">Identifier</param>- /// <returns>Customer product</returns>- Task<CustomerProduct> GetCustomerProduct(string id);-- /// <summary>- /// Gets a customer product- /// </summary>- /// <param name="customerId">Customer Identifier</param>- /// <param name="productId">Product Identifier</param>- /// <returns>Customer product</returns>- Task<CustomerProduct> GetCustomerProduct(string customerId, string productId);-- /// <summary>- /// Inserts a customer product price- /// </summary>- /// <param name="customerProductPrice">Customer product price</param>- Task InsertCustomerProductPrice(CustomerProductPrice customerProductPrice);-- /// <summary>- /// Updates the customer product price- /// </summary>- /// <param name="customerProductPrice">Customer product price</param>- Task UpdateCustomerProductPrice(CustomerProductPrice customerProductPrice);-- /// <summary>- /// Delete a customer product price- /// </summary>- /// <param name="customerProductPrice">Customer product price</param>- Task DeleteCustomerProductPrice(CustomerProductPrice customerProductPrice);--- /// <summary>- /// Gets products price for customer- /// </summary>- /// <param name="customerId">Customer id</param>- /// <param name="pageIndex"></param>- /// <param name="pageSize"></param>- /// <returns>Customer products price</returns>- Task<IPagedList<CustomerProductPrice>> GetProductsPriceByCustomer(string customerId, int pageIndex = 0, int pageSize = int.MaxValue);-- #endregion-- #region Customer product-- /// <summary>- /// Inserts a customer product- /// </summary>- /// <param name="customerProduct">Customer product</param>- Task InsertCustomerProduct(CustomerProduct customerProduct);-- /// <summary>- /// Updates the customer product- /// </summary>- /// <param name="customerProduct">Customer product </param>- Task UpdateCustomerProduct(CustomerProduct customerProduct);-- /// <summary>- /// Delete a customer product- /// </summary>- /// <param name="customerProduct">Customer product </param>- Task DeleteCustomerProduct(CustomerProduct customerProduct);-- Task<IPagedList<CustomerProduct>> GetProductsByCustomer(string customerId, int pageIndex = 0, int pageSize = int.MaxValue);-- #endregion- }-}+ /// <param name="customerId">Customer Identifier</param>+ /// <param name="productId">Product Identifier</param>+ /// <returns>Customer product price</returns>+ Task<double?> GetPriceByCustomerProduct(string customerId, string productId);++ /// <summary>+ /// Gets a customer product+ /// </summary>+ /// <param name="id">Identifier</param>+ /// <returns>Customer product</returns>+ Task<CustomerProduct> GetCustomerProduct(string id);++ /// <summary>+ /// Gets a customer product+ /// </summary>+ /// <param name="customerId">Customer Identifier</param>+ /// <param name="productId">Product Identifier</param>+ /// <returns>Customer product</returns>+ Task<CustomerProduct> GetCustomerProduct(string customerId, string productId);++ /// <summary>+ /// Inserts a customer product price+ /// </summary>+ /// <param name="customerProductPrice">Customer product price</param>+ Task InsertCustomerProductPrice(CustomerProductPrice customerProductPrice);++ /// <summary>+ /// Updates the customer product price+ /// </summary>+ /// <param name="customerProductPrice">Customer product price</param>+ Task UpdateCustomerProductPrice(CustomerProductPrice customerProductPrice);++ /// <summary>+ /// Delete a customer product price+ /// </summary>+ /// <param name="customerProductPrice">Customer product price</param>+ Task DeleteCustomerProductPrice(CustomerProductPrice customerProductPrice);+++ /// <summary>+ /// Gets products price for customer+ /// </summary>+ /// <param name="customerId">Customer id</param>+ /// <param name="pageIndex"></param>+ /// <param name="pageSize"></param>+ /// <returns>Customer products price</returns>+ Task<IPagedList<CustomerProductPrice>> GetProductsPriceByCustomer(string customerId, int pageIndex = 0,+ int pageSize = int.MaxValue);++ #endregion++ #region Customer product++ /// <summary>+ /// Inserts a customer product+ /// </summary>+ /// <param name="customerProduct">Customer product</param>+ Task InsertCustomerProduct(CustomerProduct customerProduct);++ /// <summary>+ /// Updates the customer product+ /// </summary>+ /// <param name="customerProduct">Customer product </param>+ Task UpdateCustomerProduct(CustomerProduct customerProduct);++ /// <summary>+ /// Delete a customer product+ /// </summary>+ /// <param name="customerProduct">Customer product </param>+ Task DeleteCustomerProduct(CustomerProduct customerProduct);++ Task<IPagedList<CustomerProduct>> GetProductsByCustomer(string customerId, int pageIndex = 0,+ int pageSize = int.MaxValue);++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerTagService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerTagService.csindex 2a4733c40..53881c1e3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerTagService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Customers/ICustomerTagService.cs@@ -1,119 +1,119 @@using Grand.Domain;using Grand.Domain.Customers;-namespace Grand.Business.Core.Interfaces.Marketing.Customers+namespace Grand.Business.Core.Interfaces.Marketing.Customers;++/// <summary>+/// Product tag service interface+/// </summary>+public interface ICustomerTagService{/// <summary>- /// Product tag service interface- /// </summary>- public interface ICustomerTagService- {- /// <summary>- /// Delete a customer tag- /// </summary>- /// <param name="customerTag">Customer tag</param>- Task DeleteCustomerTag(CustomerTag customerTag);-- /// <summary>- /// Gets all customer tags- /// </summary>- /// <returns>Customer tags</returns>- Task<IList<CustomerTag>> GetAllCustomerTags();-- /// <summary>- /// Gets all customer for tag id- /// </summary>- /// <returns>Customers</returns>- Task<IPagedList<Customer>> GetCustomersByTag(string customerTagId = "", int pageIndex = 0, int pageSize = 2147483647);- /// <summary>- /// Gets customer tag- /// </summary>- /// <param name="customerTagId">Customer tag identifier</param>- /// <returns>Product tag</returns>- Task<CustomerTag> GetCustomerTagById(string customerTagId);-- /// <summary>- /// Gets customer tag by name- /// </summary>- /// <param name="name">Customer tag name</param>- /// <returns>Customer tag</returns>- Task<CustomerTag> GetCustomerTagByName(string name);-- /// <summary>- /// Gets customer tags search by name- /// </summary>- /// <param name="name">Customer tags name</param>- /// <returns>Customer tags</returns>- Task<IList<CustomerTag>> GetCustomerTagsByName(string name);-- /// <summary>- /// Inserts a customer tag- /// </summary>- /// <param name="customerTag">Customer tag</param>- Task InsertCustomerTag(CustomerTag customerTag);-- /// <summary>- /// Insert tag to a customer- /// </summary>- Task InsertTagToCustomer(string customerTagId, string customerId);-- /// <summary>- /// Delete tag from a customer- /// </summary>- Task DeleteTagFromCustomer(string customerTagId, string customerId);-- /// <summary>- /// Updates the customer tag- /// </summary>- /// <param name="customerTag">Customer tag</param>- Task UpdateCustomerTag(CustomerTag customerTag);-- /// <summary>- /// Get number of customers- /// </summary>- /// <param name="customerTagId">Customer tag identifier</param>- /// <returns>Number of products</returns>- Task<int> GetCustomerCount(string customerTagId);-- /// <summary>- /// Gets customer tag products for customer tag- /// </summary>- /// <param name="customerTagId">Customer tag id</param>- /// <returns>Customer tag products</returns>- Task<IList<CustomerTagProduct>> GetCustomerTagProducts(string customerTagId);-- /// <summary>- /// Gets customer tag products for customer tag- /// </summary>- /// <param name="customerTagId">Customer tag id</param>- /// <param name="productId">Product id</param>- /// <returns>Customer tag product</returns>- Task<CustomerTagProduct> GetCustomerTagProduct(string customerTagId, string productId);-- /// <summary>- /// Gets customer tag product- /// </summary>- /// <param name="id">id</param>- /// <returns>Customer tag product</returns>- Task<CustomerTagProduct> GetCustomerTagProductById(string id);-- /// <summary>- /// Inserts a customer tag product- /// </summary>- /// <param name="customerTagProduct">Customer tag product</param>- Task InsertCustomerTagProduct(CustomerTagProduct customerTagProduct);-- /// <summary>- /// Updates the customer tag product- /// </summary>- /// <param name="customerTagProduct">Customer tag product</param>- Task UpdateCustomerTagProduct(CustomerTagProduct customerTagProduct);-- /// <summary>- /// Delete a customer tag product- /// </summary>- /// <param name="customerTagProduct">Customer tag product</param>- Task DeleteCustomerTagProduct(CustomerTagProduct customerTagProduct);-- }-}+ /// Delete a customer tag+ /// </summary>+ /// <param name="customerTag">Customer tag</param>+ Task DeleteCustomerTag(CustomerTag customerTag);++ /// <summary>+ /// Gets all customer tags+ /// </summary>+ /// <returns>Customer tags</returns>+ Task<IList<CustomerTag>> GetAllCustomerTags();++ /// <summary>+ /// Gets all customer for tag id+ /// </summary>+ /// <returns>Customers</returns>+ Task<IPagedList<Customer>> GetCustomersByTag(string customerTagId = "", int pageIndex = 0,+ int pageSize = 2147483647);++ /// <summary>+ /// Gets customer tag+ /// </summary>+ /// <param name="customerTagId">Customer tag identifier</param>+ /// <returns>Product tag</returns>+ Task<CustomerTag> GetCustomerTagById(string customerTagId);++ /// <summary>+ /// Gets customer tag by name+ /// </summary>+ /// <param name="name">Customer tag name</param>+ /// <returns>Customer tag</returns>+ Task<CustomerTag> GetCustomerTagByName(string name);++ /// <summary>+ /// Gets customer tags search by name+ /// </summary>+ /// <param name="name">Customer tags name</param>+ /// <returns>Customer tags</returns>+ Task<IList<CustomerTag>> GetCustomerTagsByName(string name);++ /// <summary>+ /// Inserts a customer tag+ /// </summary>+ /// <param name="customerTag">Customer tag</param>+ Task InsertCustomerTag(CustomerTag customerTag);++ /// <summary>+ /// Insert tag to a customer+ /// </summary>+ Task InsertTagToCustomer(string customerTagId, string customerId);++ /// <summary>+ /// Delete tag from a customer+ /// </summary>+ Task DeleteTagFromCustomer(string customerTagId, string customerId);++ /// <summary>+ /// Updates the customer tag+ /// </summary>+ /// <param name="customerTag">Customer tag</param>+ Task UpdateCustomerTag(CustomerTag customerTag);++ /// <summary>+ /// Get number of customers+ /// </summary>+ /// <param name="customerTagId">Customer tag identifier</param>+ /// <returns>Number of products</returns>+ Task<int> GetCustomerCount(string customerTagId);++ /// <summary>+ /// Gets customer tag products for customer tag+ /// </summary>+ /// <param name="customerTagId">Customer tag id</param>+ /// <returns>Customer tag products</returns>+ Task<IList<CustomerTagProduct>> GetCustomerTagProducts(string customerTagId);++ /// <summary>+ /// Gets customer tag products for customer tag+ /// </summary>+ /// <param name="customerTagId">Customer tag id</param>+ /// <param name="productId">Product id</param>+ /// <returns>Customer tag product</returns>+ Task<CustomerTagProduct> GetCustomerTagProduct(string customerTagId, string productId);++ /// <summary>+ /// Gets customer tag product+ /// </summary>+ /// <param name="id">id</param>+ /// <returns>Customer tag product</returns>+ Task<CustomerTagProduct> GetCustomerTagProductById(string id);++ /// <summary>+ /// Inserts a customer tag product+ /// </summary>+ /// <param name="customerTagProduct">Customer tag product</param>+ Task InsertCustomerTagProduct(CustomerTagProduct customerTagProduct);++ /// <summary>+ /// Updates the customer tag product+ /// </summary>+ /// <param name="customerTagProduct">Customer tag product</param>+ Task UpdateCustomerTagProduct(CustomerTagProduct customerTagProduct);++ /// <summary>+ /// Delete a customer tag product+ /// </summary>+ /// <param name="customerTagProduct">Customer tag product</param>+ Task DeleteCustomerTagProduct(CustomerTagProduct customerTagProduct);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentService.csindex d68932d62..8f0a6c0a0 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentService.cs@@ -2,40 +2,40 @@using Grand.Domain.Common;using Grand.Domain.Documents;-namespace Grand.Business.Core.Interfaces.Marketing.Documents+namespace Grand.Business.Core.Interfaces.Marketing.Documents;++public interface IDocumentService{- public interface IDocumentService- {- /// <summary>- /// Gets a document- /// </summary>- /// <param name="id">document identifier</param>- /// <returns>Document</returns>- Task<Document> GetById(string id);+ /// <summary>+ /// Gets a document+ /// </summary>+ /// <param name="id">document identifier</param>+ /// <returns>Document</returns>+ Task<Document> GetById(string id);- /// <summary>- /// Gets all documents- /// </summary>- /// <returns>Documents</returns>- Task<IPagedList<Document>> GetAll(string name = "", string number = "", string email = "", string username = "",- Reference reference = Reference.None, string objectId = "", string seId = "", int status = -1, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets all documents+ /// </summary>+ /// <returns>Documents</returns>+ Task<IPagedList<Document>> GetAll(string name = "", string number = "", string email = "", string username = "",+ Reference reference = Reference.None, string objectId = "", string seId = "", int status = -1,+ int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Insert a document- /// </summary>- /// <param name="document">Document</param>- Task Insert(Document document);+ /// <summary>+ /// Insert a document+ /// </summary>+ /// <param name="document">Document</param>+ Task Insert(Document document);- /// <summary>- /// Update a document type- /// </summary>- /// <param name="document">Document</param>- Task Update(Document document);+ /// <summary>+ /// Update a document type+ /// </summary>+ /// <param name="document">Document</param>+ Task Update(Document document);- /// <summary>- /// Delete a document type- /// </summary>- /// <param name="document">Document</param>- Task Delete(Document document);- }-}+ /// <summary>+ /// Delete a document type+ /// </summary>+ /// <param name="document">Document</param>+ Task Delete(Document document);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentTypeService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentTypeService.csindex 8dda60564..bd72f3e72 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentTypeService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Documents/IDocumentTypeService.cs@@ -1,40 +1,38 @@using Grand.Domain.Documents;-namespace Grand.Business.Core.Interfaces.Marketing.Documents-{- public interface IDocumentTypeService- {- /// <summary>- /// Gets a document type- /// </summary>- /// <param name="id">document type identifier</param>- /// <returns>Document type</returns>- Task<DocumentType> GetById(string id);+namespace Grand.Business.Core.Interfaces.Marketing.Documents;- /// <summary>- /// Gets all document types- /// </summary>- /// <returns>Document types</returns>- Task<IList<DocumentType>> GetAll();+public interface IDocumentTypeService+{+ /// <summary>+ /// Gets a document type+ /// </summary>+ /// <param name="id">document type identifier</param>+ /// <returns>Document type</returns>+ Task<DocumentType> GetById(string id);+ /// <summary>+ /// Gets all document types+ /// </summary>+ /// <returns>Document types</returns>+ Task<IList<DocumentType>> GetAll();- /// <summary>- /// Insert a document type- /// </summary>- /// <param name="documentType">Document type</param>- Task Insert(DocumentType documentType);- /// <summary>- /// Update a document type- /// </summary>- /// <param name="documentType">Document type</param>- Task Update(DocumentType documentType);+ /// <summary>+ /// Insert a document type+ /// </summary>+ /// <param name="documentType">Document type</param>+ Task Insert(DocumentType documentType);- /// <summary>- /// Delete a document type- /// </summary>- /// <param name="documentType">Document type</param>- Task Delete(DocumentType documentType);+ /// <summary>+ /// Update a document type+ /// </summary>+ /// <param name="documentType">Document type</param>+ Task Update(DocumentType documentType);- }-}+ /// <summary>+ /// Delete a document type+ /// </summary>+ /// <param name="documentType">Document type</param>+ Task Delete(DocumentType documentType);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsLetterSubscriptionService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsLetterSubscriptionService.csindex 86aac1f60..19861022a 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsLetterSubscriptionService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsLetterSubscriptionService.cs@@ -1,90 +1,93 @@using Grand.Domain;using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Newsletters+namespace Grand.Business.Core.Interfaces.Marketing.Newsletters;++/// <summary>+/// Newsletter subscription service interface+/// </summary>+public interface INewsLetterSubscriptionService{/// <summary>- /// Newsletter subscription service interface+ /// Inserts a newsletter subscription/// </summary>- public interface INewsLetterSubscriptionService- {- /// <summary>- /// Inserts a newsletter subscription- /// </summary>- /// <param name="newsLetterSubscription">NewsLetter subscription</param>- /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>- Task InsertNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription, bool publishSubscriptionEvents = true);+ /// <param name="newsLetterSubscription">NewsLetter subscription</param>+ /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>+ Task InsertNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription,+ bool publishSubscriptionEvents = true);- /// <summary>- /// Updates a newsletter subscription- /// </summary>- /// <param name="newsLetterSubscription">NewsLetter subscription</param>- /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>- Task UpdateNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription, bool publishSubscriptionEvents = true);+ /// <summary>+ /// Updates a newsletter subscription+ /// </summary>+ /// <param name="newsLetterSubscription">NewsLetter subscription</param>+ /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>+ Task UpdateNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription,+ bool publishSubscriptionEvents = true);- /// <summary>- /// Deletes a newsletter subscription- /// </summary>- /// <param name="newsLetterSubscription">NewsLetter subscription</param>- /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>- Task DeleteNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription, bool publishSubscriptionEvents = true);+ /// <summary>+ /// Deletes a newsletter subscription+ /// </summary>+ /// <param name="newsLetterSubscription">NewsLetter subscription</param>+ /// <param name="publishSubscriptionEvents">if set to <c>true</c> [publish subscription events].</param>+ Task DeleteNewsLetterSubscription(NewsLetterSubscription newsLetterSubscription,+ bool publishSubscriptionEvents = true);- /// <summary>- /// Gets a newsletter subscription by newsletter subscription identifier- /// </summary>- /// <param name="newsLetterSubscriptionId">The newsletter subscription identifier</param>- /// <returns>NewsLetter subscription</returns>- Task<NewsLetterSubscription> GetNewsLetterSubscriptionById(string newsLetterSubscriptionId);+ /// <summary>+ /// Gets a newsletter subscription by newsletter subscription identifier+ /// </summary>+ /// <param name="newsLetterSubscriptionId">The newsletter subscription identifier</param>+ /// <returns>NewsLetter subscription</returns>+ Task<NewsLetterSubscription> GetNewsLetterSubscriptionById(string newsLetterSubscriptionId);- /// <summary>- /// Gets a newsletter subscription by newsletter subscription GUID- /// </summary>- /// <param name="newsLetterSubscriptionGuid">The newsletter subscription GUID</param>- /// <returns>NewsLetter subscription</returns>- Task<NewsLetterSubscription> GetNewsLetterSubscriptionByGuid(Guid newsLetterSubscriptionGuid);+ /// <summary>+ /// Gets a newsletter subscription by newsletter subscription GUID+ /// </summary>+ /// <param name="newsLetterSubscriptionGuid">The newsletter subscription GUID</param>+ /// <returns>NewsLetter subscription</returns>+ Task<NewsLetterSubscription> GetNewsLetterSubscriptionByGuid(Guid newsLetterSubscriptionGuid);- /// <summary>- /// Gets a newsletter subscription by email and store ID- /// </summary>- /// <param name="email">The newsletter subscription email</param>- /// <param name="storeId">Store identifier</param>- /// <returns>NewsLetter subscription</returns>- Task<NewsLetterSubscription> GetNewsLetterSubscriptionByEmailAndStoreId(string email, string storeId);+ /// <summary>+ /// Gets a newsletter subscription by email and store ID+ /// </summary>+ /// <param name="email">The newsletter subscription email</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>NewsLetter subscription</returns>+ Task<NewsLetterSubscription> GetNewsLetterSubscriptionByEmailAndStoreId(string email, string storeId);- /// <summary>- /// Gets a newsletter subscription by customerId- /// </summary>- /// <param name="customerId">Customer identifier</param>- /// <returns>NewsLetter subscription</returns>- Task<NewsLetterSubscription> GetNewsLetterSubscriptionByCustomerId(string customerId);+ /// <summary>+ /// Gets a newsletter subscription by customerId+ /// </summary>+ /// <param name="customerId">Customer identifier</param>+ /// <returns>NewsLetter subscription</returns>+ Task<NewsLetterSubscription> GetNewsLetterSubscriptionByCustomerId(string customerId);- /// <summary>- /// Gets the newsletter subscription list- /// </summary>- /// <param name="email">Email to search or string. Empty to load all records.</param>- /// <param name="storeId">Store identifier. "" to load all records.</param>- /// <param name="isActive">Value indicating whether subscriber record should be active or not; null to load all records</param>- /// <param name="categoryIds">categoryIds</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>NewsLetterSubscription entities</returns>- Task<IPagedList<NewsLetterSubscription>> GetAllNewsLetterSubscriptions(string email = null,- string storeId = "", bool? isActive = null, string[] categoryIds = null, int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets the newsletter subscription list+ /// </summary>+ /// <param name="email">Email to search or string. Empty to load all records.</param>+ /// <param name="storeId">Store identifier. "" to load all records.</param>+ /// <param name="isActive">Value indicating whether subscriber record should be active or not; null to load all records</param>+ /// <param name="categoryIds">categoryIds</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>NewsLetterSubscription entities</returns>+ Task<IPagedList<NewsLetterSubscription>> GetAllNewsLetterSubscriptions(string email = null,+ string storeId = "", bool? isActive = null, string[] categoryIds = null, int pageIndex = 0,+ int pageSize = int.MaxValue);- /// <summary>- /// Export newsletter subscribers to TXT- /// </summary>- /// <param name="subscriptions">Subscriptions</param>- /// <returns>Result in TXT (string) format</returns>- string ExportNewsletterSubscribersToTxt(IList<NewsLetterSubscription> subscriptions);+ /// <summary>+ /// Export newsletter subscribers to TXT+ /// </summary>+ /// <param name="subscriptions">Subscriptions</param>+ /// <returns>Result in TXT (string) format</returns>+ string ExportNewsletterSubscribersToTxt(IList<NewsLetterSubscription> subscriptions);- /// <summary>- /// Import newsletter subscribers from TXT file- /// </summary>- /// <param name="stream">Stream</param>- /// <param name="currentStoreId">Current store ident</param>- /// <returns>Number of imported subscribers</returns>- Task<int> ImportNewsletterSubscribersFromTxt(Stream stream, string currentStoreId);- }-}+ /// <summary>+ /// Import newsletter subscribers from TXT file+ /// </summary>+ /// <param name="stream">Stream</param>+ /// <param name="currentStoreId">Current store ident</param>+ /// <returns>Number of imported subscribers</returns>+ Task<int> ImportNewsletterSubscribersFromTxt(Stream stream, string currentStoreId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsletterCategoryService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsletterCategoryService.csindex ea3f32e2f..e9b3c61d6 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsletterCategoryService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/Newsletters/INewsletterCategoryService.cs@@ -1,45 +1,43 @@using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Marketing.Newsletters-{- public interface INewsletterCategoryService- {- /// <summary>- /// Inserts a newsletter category- /// </summary>- /// <param name="newsletterCategory">NewsletterCategory</param>- Task InsertNewsletterCategory(NewsletterCategory newsletterCategory);+namespace Grand.Business.Core.Interfaces.Marketing.Newsletters;- /// <summary>- /// Updates a newsletter category- /// </summary>- /// <param name="newsletterCategory">NewsletterCategory</param>- Task UpdateNewsletterCategory(NewsletterCategory newsletterCategory);+public interface INewsletterCategoryService+{+ /// <summary>+ /// Inserts a newsletter category+ /// </summary>+ /// <param name="newsletterCategory">NewsletterCategory</param>+ Task InsertNewsletterCategory(NewsletterCategory newsletterCategory);- /// <summary>- /// Deleted a newsletter category- /// </summary>- /// <param name="newsletterCategory">NewsletterCategory</param>- Task DeleteNewsletterCategory(NewsletterCategory newsletterCategory);+ /// <summary>+ /// Updates a newsletter category+ /// </summary>+ /// <param name="newsletterCategory">NewsletterCategory</param>+ Task UpdateNewsletterCategory(NewsletterCategory newsletterCategory);- /// <summary>- /// Gets a newsletter by category- /// </summary>- /// <param name="id">newsletter category</param>- /// <returns>NewsletterCategory</returns>- Task<NewsletterCategory> GetNewsletterCategoryById(string id);+ /// <summary>+ /// Deleted a newsletter category+ /// </summary>+ /// <param name="newsletterCategory">NewsletterCategory</param>+ Task DeleteNewsletterCategory(NewsletterCategory newsletterCategory);- /// <summary>- /// Gets all newsletter categories- /// </summary>- /// <returns>NewsletterCategories</returns>- Task<IList<NewsletterCategory>> GetAllNewsletterCategory();+ /// <summary>+ /// Gets a newsletter by category+ /// </summary>+ /// <param name="id">newsletter category</param>+ /// <returns>NewsletterCategory</returns>+ Task<NewsletterCategory> GetNewsletterCategoryById(string id);- /// <summary>- /// Gets all newsletter categories by store- /// </summary>- /// <returns>NewsletterCategories</returns>- Task<IList<NewsletterCategory>> GetNewsletterCategoriesByStore(string storeId);+ /// <summary>+ /// Gets all newsletter categories+ /// </summary>+ /// <returns>NewsletterCategories</returns>+ Task<IList<NewsletterCategory>> GetAllNewsletterCategory();- }-}+ /// <summary>+ /// Gets all newsletter categories by store+ /// </summary>+ /// <returns>NewsletterCategories</returns>+ Task<IList<NewsletterCategory>> GetNewsletterCategoriesByStore(string storeId);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Marketing/PushNotifications/IPushNotificationsService.cs b/src/Business/Grand.Business.Core/Interfaces/Marketing/PushNotifications/IPushNotificationsService.csindex 487716a64..90ac74783 100644--- a/src/Business/Grand.Business.Core/Interfaces/Marketing/PushNotifications/IPushNotificationsService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Marketing/PushNotifications/IPushNotificationsService.cs@@ -1,91 +1,92 @@using Grand.Domain;using Grand.Domain.PushNotifications;-namespace Grand.Business.Core.Interfaces.Marketing.PushNotifications+namespace Grand.Business.Core.Interfaces.Marketing.PushNotifications;++public interface IPushNotificationsService{- public interface IPushNotificationsService- {- /// <summary>- /// Inserts push receiver- /// </summary>- /// <param name="registration"></param>- Task InsertPushReceiver(PushRegistration registration);+ /// <summary>+ /// Inserts push receiver+ /// </summary>+ /// <param name="registration"></param>+ Task InsertPushReceiver(PushRegistration registration);- /// <summary>- /// Deletes push receiver- /// </summary>- /// <param name="registration"></param>- Task DeletePushReceiver(PushRegistration registration);+ /// <summary>+ /// Deletes push receiver+ /// </summary>+ /// <param name="registration"></param>+ Task DeletePushReceiver(PushRegistration registration);- /// <summary>- /// Gets push receiver- /// </summary>- /// <param name="customerId"></param>- Task<PushRegistration> GetPushReceiverByCustomerId(string customerId);+ /// <summary>+ /// Gets push receiver+ /// </summary>+ /// <param name="customerId"></param>+ Task<PushRegistration> GetPushReceiverByCustomerId(string customerId);- /// <summary>- /// Gets all push receivers- /// </summary>- Task<List<PushRegistration>> GetPushReceivers();+ /// <summary>+ /// Gets all push receivers+ /// </summary>+ Task<List<PushRegistration>> GetPushReceivers();- /// <summary>- /// Gets all push receivers- /// </summary>- /// <param name="id"></param>- Task<PushRegistration> GetPushReceiver(string id);+ /// <summary>+ /// Gets all push receivers+ /// </summary>+ /// <param name="id"></param>+ Task<PushRegistration> GetPushReceiver(string id);- /// <summary>- /// Gets number of customers that accepted push notifications permission popup- /// </summary>- Task<int> GetAllowedReceivers();+ /// <summary>+ /// Gets number of customers that accepted push notifications permission popup+ /// </summary>+ Task<int> GetAllowedReceivers();- /// <summary>- /// Gets number of customers that denied push notifications permission popup- /// </summary>- Task<int> GetDeniedReceivers();+ /// <summary>+ /// Gets number of customers that denied push notifications permission popup+ /// </summary>+ Task<int> GetDeniedReceivers();- /// <summary>- /// Updates push receiver- /// </summary>- /// <param name="registration"></param>- Task UpdatePushReceiver(PushRegistration registration);+ /// <summary>+ /// Updates push receiver+ /// </summary>+ /// <param name="registration"></param>+ Task UpdatePushReceiver(PushRegistration registration);- /// <summary>- /// Inserts push message- /// </summary>- /// <param name="message"></param>- Task InsertPushMessage(PushMessage message);+ /// <summary>+ /// Inserts push message+ /// </summary>+ /// <param name="message"></param>+ Task InsertPushMessage(PushMessage message);- /// <summary>- /// Gets all push messages- /// </summary>- Task<IPagedList<PushMessage>> GetPushMessages(int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets all push messages+ /// </summary>+ Task<IPagedList<PushMessage>> GetPushMessages(int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Gets all push receivers- /// </summary>- Task<IPagedList<PushRegistration>> GetPushReceivers(int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Gets all push receivers+ /// </summary>+ Task<IPagedList<PushRegistration>> GetPushReceivers(int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Sends push notification to all receivers- /// </summary>- /// <param name="title"></param>- /// <param name="text"></param>- /// <param name="pictureUrl"></param>- /// <param name="registrationIds"></param>- /// <param name="clickUrl"></param>- /// <returns>Bool indicating whether message was sent successfully and string result to display</returns>- Task<(bool, string)> SendPushNotification(string title, string text, string pictureUrl, string clickUrl, List<string> registrationIds = null);+ /// <summary>+ /// Sends push notification to all receivers+ /// </summary>+ /// <param name="title"></param>+ /// <param name="text"></param>+ /// <param name="pictureUrl"></param>+ /// <param name="registrationIds"></param>+ /// <param name="clickUrl"></param>+ /// <returns>Bool indicating whether message was sent successfully and string result to display</returns>+ Task<(bool, string)> SendPushNotification(string title, string text, string pictureUrl, string clickUrl,+ List<string> registrationIds = null);- /// <summary>- /// Sends push notification to all receivers- /// </summary>- /// <param name="title"></param>- /// <param name="text"></param>- /// <param name="pictureUrl"></param>- /// <param name="customerId"></param>- /// <param name="clickUrl"></param>- /// <returns>Bool indicating whether message was sent successfully and string result to display</returns>- Task<(bool, string)> SendPushNotification(string title, string text, string pictureUrl, string customerId, string clickUrl);- }-}+ /// <summary>+ /// Sends push notification to all receivers+ /// </summary>+ /// <param name="title"></param>+ /// <param name="text"></param>+ /// <param name="pictureUrl"></param>+ /// <param name="customerId"></param>+ /// <param name="clickUrl"></param>+ /// <returns>Bool indicating whether message was sent successfully and string result to display</returns>+ Task<(bool, string)> SendPushNotification(string title, string text, string pictureUrl, string customerId,+ string clickUrl);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailAccountService.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailAccountService.csindex dc9c8f0fb..10b3f2f8c 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailAccountService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailAccountService.cs@@ -1,38 +1,37 @@using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++public interface IEmailAccountService{- public interface IEmailAccountService- {- /// <summary>- /// Inserts an email account- /// </summary>- /// <param name="emailAccount">Email account</param>- Task InsertEmailAccount(EmailAccount emailAccount);+ /// <summary>+ /// Inserts an email account+ /// </summary>+ /// <param name="emailAccount">Email account</param>+ Task InsertEmailAccount(EmailAccount emailAccount);- /// <summary>- /// Updates an email account- /// </summary>- /// <param name="emailAccount">Email account</param>- Task UpdateEmailAccount(EmailAccount emailAccount);+ /// <summary>+ /// Updates an email account+ /// </summary>+ /// <param name="emailAccount">Email account</param>+ Task UpdateEmailAccount(EmailAccount emailAccount);- /// <summary>- /// Deletes an email account- /// </summary>- /// <param name="emailAccount">Email account</param>- Task DeleteEmailAccount(EmailAccount emailAccount);+ /// <summary>+ /// Deletes an email account+ /// </summary>+ /// <param name="emailAccount">Email account</param>+ Task DeleteEmailAccount(EmailAccount emailAccount);- /// <summary>- /// Gets an email account by identifier- /// </summary>- /// <param name="emailAccountId">The email account identifier</param>- /// <returns>Email account</returns>- Task<EmailAccount> GetEmailAccountById(string emailAccountId);+ /// <summary>+ /// Gets an email account by identifier+ /// </summary>+ /// <param name="emailAccountId">The email account identifier</param>+ /// <returns>Email account</returns>+ Task<EmailAccount> GetEmailAccountById(string emailAccountId);- /// <summary>- /// Gets all email accounts- /// </summary>- /// <returns>Email accounts list</returns>- Task<IList<EmailAccount>> GetAllEmailAccounts();- }-}+ /// <summary>+ /// Gets all email accounts+ /// </summary>+ /// <returns>Email accounts list</returns>+ Task<IList<EmailAccount>> GetAllEmailAccounts();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailSender.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailSender.csindex d2fe69cc9..a2671cef9 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailSender.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IEmailSender.cs@@ -1,34 +1,36 @@using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++/// <summary>+/// Email sender+/// </summary>+public interface IEmailSender{/// <summary>- /// Email sender+ /// Sends an email/// </summary>- public interface IEmailSender- {- /// <summary>- /// Sends an email- /// </summary>- /// <param name="emailAccount">Email account to use</param>- /// <param name="subject">Subject</param>- /// <param name="body">Body</param>- /// <param name="fromAddress">From address</param>- /// <param name="fromName">From display name</param>- /// <param name="toAddress">To address</param>- /// <param name="toName">To display name</param>- /// <param name="replyToAddress">ReplyTo address</param>- /// <param name="replyToName">ReplyTo display name</param>- /// <param name="bcc">BCC addresses list</param>- /// <param name="cc">CC addresses ist</param>- /// <param name="attachmentFilePath">Attachment file path</param>- /// <param name="attachmentFileName">Attachment file name. If specified, then this file name will be sent to a recipient. Otherwise, "AttachmentFilePath" name will be used.</param>- /// <param name="attachedDownloads">Attachments download ID (another attachments)</param>- Task SendEmail(EmailAccount emailAccount, string subject, string body,- string fromAddress, string fromName, string toAddress, string toName,- string replyToAddress = null, string replyToName = null,- IEnumerable<string> bcc = null, IEnumerable<string> cc = null,- string attachmentFilePath = null, string attachmentFileName = null,- IEnumerable<string> attachedDownloads = null);- }-}+ /// <param name="emailAccount">Email account to use</param>+ /// <param name="subject">Subject</param>+ /// <param name="body">Body</param>+ /// <param name="fromAddress">From address</param>+ /// <param name="fromName">From display name</param>+ /// <param name="toAddress">To address</param>+ /// <param name="toName">To display name</param>+ /// <param name="replyToAddress">ReplyTo address</param>+ /// <param name="replyToName">ReplyTo display name</param>+ /// <param name="bcc">BCC addresses list</param>+ /// <param name="cc">CC addresses ist</param>+ /// <param name="attachmentFilePath">Attachment file path</param>+ /// <param name="attachmentFileName">+ /// Attachment file name. If specified, then this file name will be sent to a recipient.+ /// Otherwise, "AttachmentFilePath" name will be used.+ /// </param>+ /// <param name="attachedDownloads">Attachments download ID (another attachments)</param>+ Task SendEmail(EmailAccount emailAccount, string subject, string body,+ string fromAddress, string fromName, string toAddress, string toName,+ string replyToAddress = null, string replyToName = null,+ IEnumerable<string> bcc = null, IEnumerable<string> cc = null,+ string attachmentFilePath = null, string attachmentFileName = null,+ IEnumerable<string> attachedDownloads = null);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageProviderService.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageProviderService.csindex 64bf76c1d..aa9ec68a4 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageProviderService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageProviderService.cs@@ -10,537 +10,556 @@ using Grand.Domain.Shipping;using Grand.Domain.Stores;using Grand.Domain.Vendors;-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++public interface IMessageProviderService{- public interface IMessageProviderService- {- #region Customer messages-- /// <summary>- /// Sends 'New customer' notification message to a store owner- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerRegisteredMessage(Customer customer, Store store, string languageId);-- /// <summary>- /// Sends a welcome message to a customer- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerWelcomeMessage(Customer customer, Store store, string languageId);-- /// <summary>- /// Sends an email validation message to a customer- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerEmailValidationMessage(Customer customer, Store store, string languageId);-- /// <summary>- /// Sends password recovery message to a customer- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerPasswordRecoveryMessage(Customer customer, Store store, string languageId);-- /// <summary>- /// Sends a new customer note added notification to a customer- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="customerNote">Customer note</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewCustomerNoteMessage(CustomerNote customerNote, Customer customer, Store store, string languageId);-- /// <summary>- /// Send an email token validation message to a customer- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerEmailTokenValidationMessage(Customer customer, Store store, string languageId);-- #endregion-- #region Order messages-- /// <summary>- /// Sends an order placed notification to a vendor- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="vendor">Vendor instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPlacedVendorMessage(Order order, Customer customer, Vendor vendor, string languageId);-- /// <summary>- /// Sends an order placed notification to a store owner- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPlacedStoreOwnerMessage(Order order, Customer customer, string languageId);-- /// <summary>- /// Sends an order paid notification to a store owner- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPaidStoreOwnerMessage(Order order, Customer customer, string languageId);-- /// <summary>- /// Sends an order paid notification to a customer- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="attachmentFilePath">Attachment file path</param>- /// <param name="attachmentFileName">Attachment file name. If specified, then this file name will be sent to a recipient. Otherwise, "AttachmentFilePath" name will be used.</param>- /// <param name="attachments">Attachments ident</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPaidCustomerMessage(Order order, Customer customer, string languageId,- string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);-- /// <summary>- /// Sends an order paid notification to a vendor- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="vendor">Vendor instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPaidVendorMessage(Order order, Vendor vendor, string languageId);-- /// <summary>- /// Sends an order placed notification to a customer- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="attachmentFilePath">Attachment file path</param>- /// <param name="attachmentFileName">Attachment file name. If specified, then this file name will be sent to a recipient. Otherwise, "AttachmentFilePath" name will be used.</param>- /// <param name="attachments">Attachments ident</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderPlacedCustomerMessage(Order order, Customer customer, string languageId,- string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);-- /// <summary>- /// Sends a shipment sent notification to a customer- /// </summary>- /// <param name="shipment">Shipment</param>- /// <param name="order">Order</param>- /// <returns>Queued email identifier</returns>- Task<int> SendShipmentSentCustomerMessage(Shipment shipment, Order order);-- /// <summary>- /// Sends a shipment delivered notification to a customer- /// </summary>- /// <param name="shipment">Shipment</param>- /// <param name="order">Order</param>- /// <returns>Queued email identifier</returns>- Task<int> SendShipmentDeliveredCustomerMessage(Shipment shipment, Order order);-- /// <summary>- /// Sends an order completed notification to a customer- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="attachmentFilePath">Attachment file path</param>- /// <param name="attachmentFileName">Attachment file name. If specified, then this file name will be sent to a recipient. Otherwise, "AttachmentFilePath" name will be used.</param>- /// <param name="attachments">Attachments ident</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderCompletedCustomerMessage(Order order, Customer customer, string languageId,- string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);-- /// <summary>- /// Sends an order cancelled notification to a customer- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderCancelledCustomerMessage(Order order, Customer customer, string languageId);-- /// <summary>- /// Sends an order cancelled notification to a store owner- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="customer">Customer instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderCancelledStoreOwnerMessage(Order order, Customer customer, string languageId);-- /// <summary>- /// Sends an order cancel notification to a vendor- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="vendor">Vendor instance</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderCancelledVendorMessage(Order order, Vendor vendor, string languageId);-- /// <summary>- /// Sends an order refunded notification to a store owner- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="refundedAmount">Amount refunded</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderRefundedStoreOwnerMessage(Order order, double refundedAmount, string languageId);-- /// <summary>- /// Sends an order refunded notification to a customer- /// </summary>- /// <param name="order">Order instance</param>- /// <param name="refundedAmount">Amount refunded</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOrderRefundedCustomerMessage(Order order, double refundedAmount, string languageId);-- /// <summary>- /// Sends a new order note added notification to a customer- /// </summary>- /// <param name="order">Order</param>- /// <param name="orderNote">Order note</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewOrderNoteAddedCustomerMessage(Order order, OrderNote orderNote);-- #endregion-- #region Newsletter messages-- /// <summary>- /// Sends a newsletter subscription activation message- /// </summary>- /// <param name="subscription">Newsletter subscription</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewsLetterSubscriptionActivationMessage(NewsLetterSubscription subscription,- string languageId);-- /// <summary>- /// Sends a newsletter subscription deactivation message- /// </summary>- /// <param name="subscription">Newsletter subscription</param>- /// <param name="languageId">Language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewsLetterSubscriptionDeactivationMessage(NewsLetterSubscription subscription,- string languageId);-- #endregion-- #region Send a message to a friend, ask question-- /// <summary>- /// Sends "email a friend" message- /// </summary>- /// <param name="customer">Customer instance</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="product">Product instance</param>- /// <param name="customerEmail">Customer's email</param>- /// <param name="friendsEmail">Friend's email</param>- /// <param name="personalMessage">Personal message</param>- /// <returns>Queued email identifier</returns>- Task<int> SendProductEmailAFriendMessage(Customer customer, Store store, string languageId,- Product product, string customerEmail, string friendsEmail, string personalMessage);-- /// <summary>- /// Sends wishlist "email a friend" message- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="customerEmail">Customer's email</param>- /// <param name="friendsEmail">Friend's email</param>- /// <param name="personalMessage">Personal message</param>- /// <returns>Queued email identifier</returns>- Task<int> SendWishlistEmailAFriendMessage(Customer customer, Store store, string languageId,- string customerEmail, string friendsEmail, string personalMessage);--- /// <summary>- /// Sends "email a friend" message- /// </summary>- /// <returns>Queued email identifier</returns>- Task<int> SendProductQuestionMessage(Customer customer, Store store, string languageId,- Product product, string customerEmail, string fullName, string phone, string message, string ipaddress);-- #endregion-- #region Merchandise returns-- /// <summary>- /// Sends 'New Merchandise Return' message to a store owner- /// </summary>- /// <param name="merchandiseReturn">Merchandise return</param>- /// <param name="order">Order</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewMerchandiseReturnStoreOwnerMessage(MerchandiseReturn merchandiseReturn, Order order, string languageId);--- /// <summary>- /// Sends 'Merchandise Return status changed' message to a customer- /// </summary>- /// <param name="merchandiseReturn">Merchandise return</param>- /// <param name="order">Order item</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendMerchandiseReturnStatusChangedCustomerMessage(MerchandiseReturn merchandiseReturn, Order order, string languageId);-- /// <summary>- /// Sends 'New Merchandise Return' message to a customer- /// </summary>- /// <param name="merchandiseReturn"></param>- /// <param name="order"></param>- /// <param name="languageId"></param>- /// <returns></returns>- Task<int> SendNewMerchandiseReturnCustomerMessage(MerchandiseReturn merchandiseReturn, Order order, string languageId);-- /// <summary>- /// Sends a new merchandise return note added notification to a customer- /// </summary>- /// <param name="merchandiseReturn">Merchandise return</param>- /// <param name="merchandiseReturnNote">Merchandise return note</param>- /// <param name="order">Order</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewMerchandiseReturnNoteAddedCustomerMessage(MerchandiseReturn merchandiseReturn, MerchandiseReturnNote merchandiseReturnNote, Order order);-- #endregion-- #region Misc-- /// <summary>- /// Sends 'New vendor account submitted' message to a store owner- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="vendor">Vendor</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewVendorAccountApplyStoreOwnerMessage(Customer customer, Vendor vendor, Store store, string languageId);--- /// <summary>- /// Sends 'Vendor information change' message to a store owner- /// </summary>- /// <param name="vendor">Vendor</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendVendorInformationChangeMessage(Vendor vendor, Store store, string languageId);-- /// <summary>- /// Sends a product review notification message to a store owner- /// </summary>- /// <param name="product">Product</param>- /// <param name="productReview">Product review</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendProductReviewMessage(Product product, ProductReview productReview, Store store, string languageId);-- /// <summary>- /// Sends a vendor review notification message to a store owner- /// </summary>- /// <param name="vendorReview">Vendor review</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendVendorReviewMessage(VendorReview vendorReview, Store store, string languageId);-- /// <summary>- /// Sends a gift voucher notification- /// </summary>- /// <param name="giftVoucher">Gift voucher</param>- /// <param name="order">Order</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendGiftVoucherMessage(GiftVoucher giftVoucher, Order order, string languageId);--- /// <summary>- /// Sends a "quantity below" notification to a store owner- /// </summary>- /// <param name="product">Product</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendQuantityBelowStoreOwnerMessage(Product product, string languageId);-- /// <summary>- /// Sends a "quantity below" notification to a store owner- /// </summary>- /// <param name="product">Product</param>- /// <param name="combination">Attribute combination</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendQuantityBelowStoreOwnerMessage(Product product, ProductAttributeCombination combination, string languageId);-- /// <summary>- /// Sends a "customer delete" notification to a store owner- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendCustomerDeleteStoreOwnerMessage(Customer customer, string languageId);-- /// <summary>- /// Sends a blog comment notification message to a store owner- /// </summary>- /// <returns>Queued email identifier</returns>- Task<int> SendBlogCommentMessage(BlogPost blogPost, BlogComment blogComment, string languageId);-- /// <summary>- /// Sends an article comment notification message to a store owner- /// </summary>- /// <param name="article">Article</param>- /// <param name="articleComment">Article comment</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendArticleCommentMessage(KnowledgebaseArticle article, KnowledgebaseArticleComment articleComment, string languageId);-- /// <summary>- /// Sends a news comment notification message to a store owner- /// </summary>- /// <param name="newsItem">News item</param>- /// <param name="newsComment">News comment</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNewsCommentMessage(NewsItem newsItem, NewsComment newsComment, string languageId);-- /// <summary>- /// Sends a 'Back in stock' notification message to a customer- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="product">Product</param>- /// <param name="subscription">Subscription</param>- /// <param name="languageId">Message language identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendBackInStockMessage(Customer customer, Product product, OutOfStockSubscription subscription, string languageId);--- /// <summary>- /// Sends "contact us" message- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="store">Store</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="senderEmail">Sender email</param>- /// <param name="senderName">Sender name</param>- /// <param name="subject">Email subject. Pass null if you want a message template subject to be used.</param>- /// <param name="body">Email body</param>- /// <param name="attrInfo">Attr info</param>- /// <param name="customAttributes">Custom Attributes</param>- /// <param name="ipaddress">ip address</param>- /// <returns>Queued email identifier</returns>- Task<int> SendContactUsMessage(Customer customer, Store store, string languageId, string senderEmail, string senderName, string subject, string body, string attrInfo, IList<CustomAttribute> customAttributes, string ipaddress);-- /// <summary>- /// Sends "contact vendor" message- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="store">Store</param>- /// <param name="vendor">Vendor</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="senderEmail">Sender email</param>- /// <param name="senderName">Sender name</param>- /// <param name="subject">Email subject. Pass null if you want a message template subject to be used.</param>- /// <param name="body">Email body</param>- /// <param name="ipaddress">Ip Address</param>- /// <returns>Queued email identifier</returns>- Task<int> SendContactVendorMessage(Customer customer, Store store, Vendor vendor, string languageId, string senderEmail, string senderName, string subject, string body, string ipaddress);-- /// <summary>- /// Sends auction ended notification to a customer (winner)- /// </summary>- /// <param name="product">Auction</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="bid">Bid</param>- /// <returns>Queued email identifier</returns>- Task<int> SendAuctionWinEndedCustomerMessage(Product product, string languageId, Bid bid);-- /// <summary>- /// Sends auction ended notification to a customer (loser)- /// </summary>- /// <param name="product">Auction</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="bid"></param>- /// <returns>Queued email identifier</returns>- Task<int> SendAuctionEndedLostCustomerMessage(Product product, string languageId, Bid bid);-- /// <summary>- /// Sends auction ended notification to a customer (loser - bin)- /// </summary>- /// <param name="product">Auction</param>- /// <param name="customerId">Customer identifier</param>- /// <param name="languageId">Message language identifier</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Queued email identifier</returns>- Task<int> SendAuctionEndedBinCustomerMessage(Product product, string customerId, string languageId, string storeId);-- /// <summary>- /// Sends auction ended notification to a store owner- /// </summary>- /// <param name="languageId">Message language identifier</param>- /// <param name="product">Auction</param>- /// <param name="bid">Bid</param>- /// <returns>Queued email identifier</returns>- Task<int> SendAuctionEndedStoreOwnerMessage(Product product, string languageId, Bid bid);-- /// <summary>- /// Send outbid notification to a customer- /// </summary>- /// <param name="languageId">Message language identifier</param>- /// <param name="product">Product</param>- /// <param name="bid">Bid</param>- /// <returns>Queued email identifier</returns>- Task<int> SendOutBidCustomerMessage(Product product, string languageId, Bid bid);-- /// <summary>- /// Send notification- /// </summary>- /// <param name="messageTemplate">Message template</param>- /// <param name="emailAccount">Email account</param>- /// <param name="languageId">Language identifier</param>- /// <param name="liquidObject">LiquidObject</param>- /// <param name="toEmailAddress">Recipient email address</param>- /// <param name="toName">Recipient name</param>- /// <param name="attachmentFilePath">Attachment file path</param>- /// <param name="attachmentFileName">Attachment file name</param>- /// <param name="attachedDownloads">Attached downloads ident</param>- /// <param name="replyToEmailAddress">"Reply to" email</param>- /// <param name="replyToName">"Reply to" name</param>- /// <param name="fromEmail">Sender email. If specified, then it overrides passed "emailAccount" details</param>- /// <param name="fromName">Sender name. If specified, then it overrides passed "emailAccount" details</param>- /// <param name="subject">Subject. If specified, then it overrides subject of a message template</param>- /// <param name="reference">Reference object</param>- /// <param name="objectId">Reference object ident</param>- /// <returns>Queued email identifier</returns>- Task<int> SendNotification(MessageTemplate messageTemplate,- EmailAccount emailAccount, string languageId, LiquidObject liquidObject,- string toEmailAddress, string toName,- string attachmentFilePath = null, string attachmentFileName = null,- IEnumerable<string> attachedDownloads = null,- string replyToEmailAddress = null, string replyToName = null,- string fromEmail = null, string fromName = null, string subject = null,- Reference reference = Reference.None, string objectId = "");-- #endregion- }+ #region Customer messages++ /// <summary>+ /// Sends 'New customer' notification message to a store owner+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerRegisteredMessage(Customer customer, Store store, string languageId);++ /// <summary>+ /// Sends a welcome message to a customer+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerWelcomeMessage(Customer customer, Store store, string languageId);++ /// <summary>+ /// Sends an email validation message to a customer+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerEmailValidationMessage(Customer customer, Store store, string languageId);++ /// <summary>+ /// Sends password recovery message to a customer+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerPasswordRecoveryMessage(Customer customer, Store store, string languageId);++ /// <summary>+ /// Sends a new customer note added notification to a customer+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="customerNote">Customer note</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewCustomerNoteMessage(CustomerNote customerNote, Customer customer, Store store, string languageId);++ /// <summary>+ /// Send an email token validation message to a customer+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerEmailTokenValidationMessage(Customer customer, Store store, string languageId);++ #endregion++ #region Order messages++ /// <summary>+ /// Sends an order placed notification to a vendor+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="vendor">Vendor instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPlacedVendorMessage(Order order, Customer customer, Vendor vendor, string languageId);++ /// <summary>+ /// Sends an order placed notification to a store owner+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPlacedStoreOwnerMessage(Order order, Customer customer, string languageId);++ /// <summary>+ /// Sends an order paid notification to a store owner+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPaidStoreOwnerMessage(Order order, Customer customer, string languageId);++ /// <summary>+ /// Sends an order paid notification to a customer+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="attachmentFilePath">Attachment file path</param>+ /// <param name="attachmentFileName">+ /// Attachment file name. If specified, then this file name will be sent to a recipient.+ /// Otherwise, "AttachmentFilePath" name will be used.+ /// </param>+ /// <param name="attachments">Attachments ident</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPaidCustomerMessage(Order order, Customer customer, string languageId,+ string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);++ /// <summary>+ /// Sends an order paid notification to a vendor+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="vendor">Vendor instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPaidVendorMessage(Order order, Vendor vendor, string languageId);++ /// <summary>+ /// Sends an order placed notification to a customer+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="attachmentFilePath">Attachment file path</param>+ /// <param name="attachmentFileName">+ /// Attachment file name. If specified, then this file name will be sent to a recipient.+ /// Otherwise, "AttachmentFilePath" name will be used.+ /// </param>+ /// <param name="attachments">Attachments ident</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderPlacedCustomerMessage(Order order, Customer customer, string languageId,+ string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);++ /// <summary>+ /// Sends a shipment sent notification to a customer+ /// </summary>+ /// <param name="shipment">Shipment</param>+ /// <param name="order">Order</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendShipmentSentCustomerMessage(Shipment shipment, Order order);++ /// <summary>+ /// Sends a shipment delivered notification to a customer+ /// </summary>+ /// <param name="shipment">Shipment</param>+ /// <param name="order">Order</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendShipmentDeliveredCustomerMessage(Shipment shipment, Order order);++ /// <summary>+ /// Sends an order completed notification to a customer+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="attachmentFilePath">Attachment file path</param>+ /// <param name="attachmentFileName">+ /// Attachment file name. If specified, then this file name will be sent to a recipient.+ /// Otherwise, "AttachmentFilePath" name will be used.+ /// </param>+ /// <param name="attachments">Attachments ident</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderCompletedCustomerMessage(Order order, Customer customer, string languageId,+ string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null);++ /// <summary>+ /// Sends an order cancelled notification to a customer+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderCancelledCustomerMessage(Order order, Customer customer, string languageId);++ /// <summary>+ /// Sends an order cancelled notification to a store owner+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="customer">Customer instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderCancelledStoreOwnerMessage(Order order, Customer customer, string languageId);++ /// <summary>+ /// Sends an order cancel notification to a vendor+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="vendor">Vendor instance</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderCancelledVendorMessage(Order order, Vendor vendor, string languageId);++ /// <summary>+ /// Sends an order refunded notification to a store owner+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="refundedAmount">Amount refunded</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderRefundedStoreOwnerMessage(Order order, double refundedAmount, string languageId);++ /// <summary>+ /// Sends an order refunded notification to a customer+ /// </summary>+ /// <param name="order">Order instance</param>+ /// <param name="refundedAmount">Amount refunded</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOrderRefundedCustomerMessage(Order order, double refundedAmount, string languageId);++ /// <summary>+ /// Sends a new order note added notification to a customer+ /// </summary>+ /// <param name="order">Order</param>+ /// <param name="orderNote">Order note</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewOrderNoteAddedCustomerMessage(Order order, OrderNote orderNote);++ #endregion++ #region Newsletter messages++ /// <summary>+ /// Sends a newsletter subscription activation message+ /// </summary>+ /// <param name="subscription">Newsletter subscription</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewsLetterSubscriptionActivationMessage(NewsLetterSubscription subscription,+ string languageId);++ /// <summary>+ /// Sends a newsletter subscription deactivation message+ /// </summary>+ /// <param name="subscription">Newsletter subscription</param>+ /// <param name="languageId">Language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewsLetterSubscriptionDeactivationMessage(NewsLetterSubscription subscription,+ string languageId);++ #endregion++ #region Send a message to a friend, ask question++ /// <summary>+ /// Sends "email a friend" message+ /// </summary>+ /// <param name="customer">Customer instance</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="product">Product instance</param>+ /// <param name="customerEmail">Customer's email</param>+ /// <param name="friendsEmail">Friend's email</param>+ /// <param name="personalMessage">Personal message</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendProductEmailAFriendMessage(Customer customer, Store store, string languageId,+ Product product, string customerEmail, string friendsEmail, string personalMessage);++ /// <summary>+ /// Sends wishlist "email a friend" message+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="customerEmail">Customer's email</param>+ /// <param name="friendsEmail">Friend's email</param>+ /// <param name="personalMessage">Personal message</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendWishlistEmailAFriendMessage(Customer customer, Store store, string languageId,+ string customerEmail, string friendsEmail, string personalMessage);+++ /// <summary>+ /// Sends "email a friend" message+ /// </summary>+ /// <returns>Queued email identifier</returns>+ Task<int> SendProductQuestionMessage(Customer customer, Store store, string languageId,+ Product product, string customerEmail, string fullName, string phone, string message, string ipaddress);++ #endregion++ #region Merchandise returns++ /// <summary>+ /// Sends 'New Merchandise Return' message to a store owner+ /// </summary>+ /// <param name="merchandiseReturn">Merchandise return</param>+ /// <param name="order">Order</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewMerchandiseReturnStoreOwnerMessage(MerchandiseReturn merchandiseReturn, Order order,+ string languageId);+++ /// <summary>+ /// Sends 'Merchandise Return status changed' message to a customer+ /// </summary>+ /// <param name="merchandiseReturn">Merchandise return</param>+ /// <param name="order">Order item</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendMerchandiseReturnStatusChangedCustomerMessage(MerchandiseReturn merchandiseReturn, Order order,+ string languageId);++ /// <summary>+ /// Sends 'New Merchandise Return' message to a customer+ /// </summary>+ /// <param name="merchandiseReturn"></param>+ /// <param name="order"></param>+ /// <param name="languageId"></param>+ /// <returns></returns>+ Task<int> SendNewMerchandiseReturnCustomerMessage(MerchandiseReturn merchandiseReturn, Order order,+ string languageId);++ /// <summary>+ /// Sends a new merchandise return note added notification to a customer+ /// </summary>+ /// <param name="merchandiseReturn">Merchandise return</param>+ /// <param name="merchandiseReturnNote">Merchandise return note</param>+ /// <param name="order">Order</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewMerchandiseReturnNoteAddedCustomerMessage(MerchandiseReturn merchandiseReturn,+ MerchandiseReturnNote merchandiseReturnNote, Order order);++ #endregion++ #region Misc++ /// <summary>+ /// Sends 'New vendor account submitted' message to a store owner+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="vendor">Vendor</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewVendorAccountApplyStoreOwnerMessage(Customer customer, Vendor vendor, Store store,+ string languageId);+++ /// <summary>+ /// Sends 'Vendor information change' message to a store owner+ /// </summary>+ /// <param name="vendor">Vendor</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendVendorInformationChangeMessage(Vendor vendor, Store store, string languageId);++ /// <summary>+ /// Sends a product review notification message to a store owner+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="productReview">Product review</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendProductReviewMessage(Product product, ProductReview productReview, Store store, string languageId);++ /// <summary>+ /// Sends a vendor review notification message to a store owner+ /// </summary>+ /// <param name="vendorReview">Vendor review</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendVendorReviewMessage(VendorReview vendorReview, Store store, string languageId);++ /// <summary>+ /// Sends a gift voucher notification+ /// </summary>+ /// <param name="giftVoucher">Gift voucher</param>+ /// <param name="order">Order</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendGiftVoucherMessage(GiftVoucher giftVoucher, Order order, string languageId);+++ /// <summary>+ /// Sends a "quantity below" notification to a store owner+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendQuantityBelowStoreOwnerMessage(Product product, string languageId);++ /// <summary>+ /// Sends a "quantity below" notification to a store owner+ /// </summary>+ /// <param name="product">Product</param>+ /// <param name="combination">Attribute combination</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendQuantityBelowStoreOwnerMessage(Product product, ProductAttributeCombination combination,+ string languageId);++ /// <summary>+ /// Sends a "customer delete" notification to a store owner+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendCustomerDeleteStoreOwnerMessage(Customer customer, string languageId);++ /// <summary>+ /// Sends a blog comment notification message to a store owner+ /// </summary>+ /// <returns>Queued email identifier</returns>+ Task<int> SendBlogCommentMessage(BlogPost blogPost, BlogComment blogComment, string languageId);++ /// <summary>+ /// Sends an article comment notification message to a store owner+ /// </summary>+ /// <param name="article">Article</param>+ /// <param name="articleComment">Article comment</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendArticleCommentMessage(KnowledgebaseArticle article, KnowledgebaseArticleComment articleComment,+ string languageId);++ /// <summary>+ /// Sends a news comment notification message to a store owner+ /// </summary>+ /// <param name="newsItem">News item</param>+ /// <param name="newsComment">News comment</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNewsCommentMessage(NewsItem newsItem, NewsComment newsComment, string languageId);++ /// <summary>+ /// Sends a 'Back in stock' notification message to a customer+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="product">Product</param>+ /// <param name="subscription">Subscription</param>+ /// <param name="languageId">Message language identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendBackInStockMessage(Customer customer, Product product, OutOfStockSubscription subscription,+ string languageId);+++ /// <summary>+ /// Sends "contact us" message+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="store">Store</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="senderEmail">Sender email</param>+ /// <param name="senderName">Sender name</param>+ /// <param name="subject">Email subject. Pass null if you want a message template subject to be used.</param>+ /// <param name="body">Email body</param>+ /// <param name="attrInfo">Attr info</param>+ /// <param name="customAttributes">Custom Attributes</param>+ /// <param name="ipaddress">ip address</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendContactUsMessage(Customer customer, Store store, string languageId, string senderEmail,+ string senderName, string subject, string body, string attrInfo, IList<CustomAttribute> customAttributes,+ string ipaddress);++ /// <summary>+ /// Sends "contact vendor" message+ /// </summary>+ /// <param name="customer">Customer</param>+ /// <param name="store">Store</param>+ /// <param name="vendor">Vendor</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="senderEmail">Sender email</param>+ /// <param name="senderName">Sender name</param>+ /// <param name="subject">Email subject. Pass null if you want a message template subject to be used.</param>+ /// <param name="body">Email body</param>+ /// <param name="ipaddress">Ip Address</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendContactVendorMessage(Customer customer, Store store, Vendor vendor, string languageId,+ string senderEmail, string senderName, string subject, string body, string ipaddress);++ /// <summary>+ /// Sends auction ended notification to a customer (winner)+ /// </summary>+ /// <param name="product">Auction</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="bid">Bid</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendAuctionWinEndedCustomerMessage(Product product, string languageId, Bid bid);++ /// <summary>+ /// Sends auction ended notification to a customer (loser)+ /// </summary>+ /// <param name="product">Auction</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="bid"></param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendAuctionEndedLostCustomerMessage(Product product, string languageId, Bid bid);++ /// <summary>+ /// Sends auction ended notification to a customer (loser - bin)+ /// </summary>+ /// <param name="product">Auction</param>+ /// <param name="customerId">Customer identifier</param>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendAuctionEndedBinCustomerMessage(Product product, string customerId, string languageId, string storeId);++ /// <summary>+ /// Sends auction ended notification to a store owner+ /// </summary>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="product">Auction</param>+ /// <param name="bid">Bid</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendAuctionEndedStoreOwnerMessage(Product product, string languageId, Bid bid);++ /// <summary>+ /// Send outbid notification to a customer+ /// </summary>+ /// <param name="languageId">Message language identifier</param>+ /// <param name="product">Product</param>+ /// <param name="bid">Bid</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendOutBidCustomerMessage(Product product, string languageId, Bid bid);++ /// <summary>+ /// Send notification+ /// </summary>+ /// <param name="messageTemplate">Message template</param>+ /// <param name="emailAccount">Email account</param>+ /// <param name="languageId">Language identifier</param>+ /// <param name="liquidObject">LiquidObject</param>+ /// <param name="toEmailAddress">Recipient email address</param>+ /// <param name="toName">Recipient name</param>+ /// <param name="attachmentFilePath">Attachment file path</param>+ /// <param name="attachmentFileName">Attachment file name</param>+ /// <param name="attachedDownloads">Attached downloads ident</param>+ /// <param name="replyToEmailAddress">"Reply to" email</param>+ /// <param name="replyToName">"Reply to" name</param>+ /// <param name="fromEmail">Sender email. If specified, then it overrides passed "emailAccount" details</param>+ /// <param name="fromName">Sender name. If specified, then it overrides passed "emailAccount" details</param>+ /// <param name="subject">Subject. If specified, then it overrides subject of a message template</param>+ /// <param name="reference">Reference object</param>+ /// <param name="objectId">Reference object ident</param>+ /// <returns>Queued email identifier</returns>+ Task<int> SendNotification(MessageTemplate messageTemplate,+ EmailAccount emailAccount, string languageId, LiquidObject liquidObject,+ string toEmailAddress, string toName,+ string attachmentFilePath = null, string attachmentFileName = null,+ IEnumerable<string> attachedDownloads = null,+ string replyToEmailAddress = null, string replyToName = null,+ string fromEmail = null, string fromName = null, string subject = null,+ Reference reference = Reference.None, string objectId = "");++ #endregion}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTemplateService.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTemplateService.csindex f03c9bfa5..491e4fb24 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTemplateService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTemplateService.cs@@ -1,57 +1,56 @@using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++/// <summary>+/// Message template service+/// </summary>+public interface IMessageTemplateService{/// <summary>- /// Message template service+ /// Inserts a message template+ /// </summary>+ /// <param name="messageTemplate">Message template</param>+ Task InsertMessageTemplate(MessageTemplate messageTemplate);++ /// <summary>+ /// Updates a message template+ /// </summary>+ /// <param name="messageTemplate">Message template</param>+ Task UpdateMessageTemplate(MessageTemplate messageTemplate);++ /// <summary>+ /// Delete a message template+ /// </summary>+ /// <param name="messageTemplate">Message template</param>+ Task DeleteMessageTemplate(MessageTemplate messageTemplate);++ /// <summary>+ /// Gets a message template by identifier+ /// </summary>+ /// <param name="messageTemplateId">Message template identifier</param>+ /// <returns>Message template</returns>+ Task<MessageTemplate> GetMessageTemplateById(string messageTemplateId);++ /// <summary>+ /// Gets a message template by name+ /// </summary>+ /// <param name="messageTemplateName">Message template name</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Message template</returns>+ Task<MessageTemplate> GetMessageTemplateByName(string messageTemplateName, string storeId);++ /// <summary>+ /// Gets all message templates+ /// </summary>+ /// <param name="storeId">Store identifier; pass "" to load all records</param>+ /// <returns>Message template list</returns>+ Task<IList<MessageTemplate>> GetAllMessageTemplates(string storeId);++ /// <summary>+ /// Create a copy of message template with all depended data/// </summary>- public interface IMessageTemplateService- {- /// <summary>- /// Inserts a message template- /// </summary>- /// <param name="messageTemplate">Message template</param>- Task InsertMessageTemplate(MessageTemplate messageTemplate);-- /// <summary>- /// Updates a message template- /// </summary>- /// <param name="messageTemplate">Message template</param>- Task UpdateMessageTemplate(MessageTemplate messageTemplate);-- /// <summary>- /// Delete a message template- /// </summary>- /// <param name="messageTemplate">Message template</param>- Task DeleteMessageTemplate(MessageTemplate messageTemplate);-- /// <summary>- /// Gets a message template by identifier- /// </summary>- /// <param name="messageTemplateId">Message template identifier</param>- /// <returns>Message template</returns>- Task<MessageTemplate> GetMessageTemplateById(string messageTemplateId);-- /// <summary>- /// Gets a message template by name- /// </summary>- /// <param name="messageTemplateName">Message template name</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Message template</returns>- Task<MessageTemplate> GetMessageTemplateByName(string messageTemplateName, string storeId);-- /// <summary>- /// Gets all message templates- /// </summary>- /// <param name="storeId">Store identifier; pass "" to load all records</param>- /// <returns>Message template list</returns>- Task<IList<MessageTemplate>> GetAllMessageTemplates(string storeId);-- /// <summary>- /// Create a copy of message template with all depended data- /// </summary>- /// <param name="messageTemplate">Message template</param>- /// <returns>Message template copy</returns>- Task<MessageTemplate> CopyMessageTemplate(MessageTemplate messageTemplate);- }-}+ /// <param name="messageTemplate">Message template</param>+ /// <returns>Message template copy</returns>+ Task<MessageTemplate> CopyMessageTemplate(MessageTemplate messageTemplate);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTokenProvider.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTokenProvider.csindex a98587cad..e74ffe4e9 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTokenProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IMessageTokenProvider.cs@@ -1,8 +1,7 @@-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++public interface IMessageTokenProvider{- public interface IMessageTokenProvider- {- string[] GetListOfCampaignAllowedTokens();- string[] GetListOfAllowedTokens();- }+ string[] GetListOfCampaignAllowedTokens();+ string[] GetListOfAllowedTokens();}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IMimeMappingService.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IMimeMappingService.csindex 3b50859d9..00dd20df3 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IMimeMappingService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IMimeMappingService.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++public interface IMimeMappingService{- public interface IMimeMappingService- {- string Map(string fName);- }-}+ string Map(string fName);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Messages/IQueuedEmailService.cs b/src/Business/Grand.Business.Core/Interfaces/Messages/IQueuedEmailService.csindex 803df65ef..1e0f1f054 100644--- a/src/Business/Grand.Business.Core/Interfaces/Messages/IQueuedEmailService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Messages/IQueuedEmailService.cs@@ -1,74 +1,73 @@using Grand.Domain;using Grand.Domain.Messages;-namespace Grand.Business.Core.Interfaces.Messages+namespace Grand.Business.Core.Interfaces.Messages;++public interface IQueuedEmailService{- public interface IQueuedEmailService- {- /// <summary>- /// Inserts a queued email- /// </summary>- /// <param name="queuedEmail">Queued email</param>- Task InsertQueuedEmail(QueuedEmail queuedEmail);+ /// <summary>+ /// Inserts a queued email+ /// </summary>+ /// <param name="queuedEmail">Queued email</param>+ Task InsertQueuedEmail(QueuedEmail queuedEmail);- /// <summary>- /// Updates a queued email- /// </summary>- /// <param name="queuedEmail">Queued email</param>- Task UpdateQueuedEmail(QueuedEmail queuedEmail);+ /// <summary>+ /// Updates a queued email+ /// </summary>+ /// <param name="queuedEmail">Queued email</param>+ Task UpdateQueuedEmail(QueuedEmail queuedEmail);- /// <summary>- /// Deleted a queued email- /// </summary>- /// <param name="queuedEmail">Queued email</param>- Task DeleteQueuedEmail(QueuedEmail queuedEmail);+ /// <summary>+ /// Deleted a queued email+ /// </summary>+ /// <param name="queuedEmail">Queued email</param>+ Task DeleteQueuedEmail(QueuedEmail queuedEmail);- /// <summary>- /// Deleted a customer emails- /// </summary>- /// <param name="email">email</param>- Task DeleteCustomerEmail(string email);+ /// <summary>+ /// Deleted a customer emails+ /// </summary>+ /// <param name="email">email</param>+ Task DeleteCustomerEmail(string email);- /// <summary>- /// Gets a queued email by identifier- /// </summary>- /// <param name="queuedEmailId">Queued email identifier</param>- /// <returns>Queued email</returns>- Task<QueuedEmail> GetQueuedEmailById(string queuedEmailId);+ /// <summary>+ /// Gets a queued email by identifier+ /// </summary>+ /// <param name="queuedEmailId">Queued email identifier</param>+ /// <returns>Queued email</returns>+ Task<QueuedEmail> GetQueuedEmailById(string queuedEmailId);- /// <summary>- /// Get queued emails by identifiers- /// </summary>- /// <param name="queuedEmailIds">queued email identifiers</param>- /// <returns>Queued emails</returns>- Task<IList<QueuedEmail>> GetQueuedEmailsByIds(string[] queuedEmailIds);+ /// <summary>+ /// Get queued emails by identifiers+ /// </summary>+ /// <param name="queuedEmailIds">queued email identifiers</param>+ /// <returns>Queued emails</returns>+ Task<IList<QueuedEmail>> GetQueuedEmailsByIds(string[] queuedEmailIds);- /// <summary>- /// Search queued emails- /// </summary>- /// <param name="fromEmail">From Email</param>- /// <param name="toEmail">To Email</param>- /// <param name="text">Text</param>- /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>- /// <param name="loadNotSentItemsOnly">A value indicating whether to load only not sent emails</param>- /// <param name="maxSendTries">Maximum send tries</param>- /// <param name="loadOnlyItemsToBeSent">Load only items to be sent</param>- /// <param name="loadNewest">A value indicating whether we should sort queued email descending; otherwise, ascending.</param>- /// <param name="referenceId">Reference object</param>- /// <param name="objectId">Object reference id</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Queued emails</returns>- Task<IPagedList<QueuedEmail>> SearchEmails(string fromEmail,- string toEmail, string text, DateTime? createdFromUtc, DateTime? createdToUtc,- bool loadNotSentItemsOnly, bool loadOnlyItemsToBeSent, int maxSendTries,- bool loadNewest, int referenceId = -1, string objectId = "",- int pageIndex = 0, int pageSize = int.MaxValue);+ /// <summary>+ /// Search queued emails+ /// </summary>+ /// <param name="fromEmail">From Email</param>+ /// <param name="toEmail">To Email</param>+ /// <param name="text">Text</param>+ /// <param name="createdFromUtc">Created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Created date to (UTC); null to load all records</param>+ /// <param name="loadNotSentItemsOnly">A value indicating whether to load only not sent emails</param>+ /// <param name="maxSendTries">Maximum send tries</param>+ /// <param name="loadOnlyItemsToBeSent">Load only items to be sent</param>+ /// <param name="loadNewest">A value indicating whether we should sort queued email descending; otherwise, ascending.</param>+ /// <param name="referenceId">Reference object</param>+ /// <param name="objectId">Object reference id</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Queued emails</returns>+ Task<IPagedList<QueuedEmail>> SearchEmails(string fromEmail,+ string toEmail, string text, DateTime? createdFromUtc, DateTime? createdToUtc,+ bool loadNotSentItemsOnly, bool loadOnlyItemsToBeSent, int maxSendTries,+ bool loadNewest, int referenceId = -1, string objectId = "",+ int pageIndex = 0, int pageSize = int.MaxValue);- /// <summary>- /// Delete all queued emails- /// </summary>- Task DeleteAllEmails();- }-}+ /// <summary>+ /// Delete all queued emails+ /// </summary>+ Task DeleteAllEmails();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Storage/IDownloadService.cs b/src/Business/Grand.Business.Core/Interfaces/Storage/IDownloadService.csindex 369431224..5e6465edf 100644--- a/src/Business/Grand.Business.Core/Interfaces/Storage/IDownloadService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Storage/IDownloadService.cs@@ -1,43 +1,41 @@using Grand.Domain.Media;-namespace Grand.Business.Core.Interfaces.Storage+namespace Grand.Business.Core.Interfaces.Storage;++/// <summary>+/// Download service interface+/// </summary>+public interface IDownloadService{/// <summary>- /// Download service interface+ /// Gets a download/// </summary>- public interface IDownloadService- {- /// <summary>- /// Gets a download- /// </summary>- /// <param name="downloadId">Download identifier</param>- /// <returns>Download</returns>- Task<Download> GetDownloadById(string downloadId);-- /// <summary>- /// Gets a download by GUID- /// </summary>- /// <param name="downloadGuid">Download GUID</param>- /// <returns>Download</returns>- Task<Download> GetDownloadByGuid(Guid downloadGuid);+ /// <param name="downloadId">Download identifier</param>+ /// <returns>Download</returns>+ Task<Download> GetDownloadById(string downloadId);- /// <summary>- /// Inserts a download- /// </summary>- /// <param name="download">Download</param>- Task InsertDownload(Download download);+ /// <summary>+ /// Gets a download by GUID+ /// </summary>+ /// <param name="downloadGuid">Download GUID</param>+ /// <returns>Download</returns>+ Task<Download> GetDownloadByGuid(Guid downloadGuid);- /// <summary>- /// Updates the download- /// </summary>- /// <param name="download">Download</param>- Task UpdateDownload(Download download);+ /// <summary>+ /// Inserts a download+ /// </summary>+ /// <param name="download">Download</param>+ Task InsertDownload(Download download);- /// <summary>- /// Deletes a download- /// </summary>- /// <param name="download">Download</param>- Task DeleteDownload(Download download);+ /// <summary>+ /// Updates the download+ /// </summary>+ /// <param name="download">Download</param>+ Task UpdateDownload(Download download);- }-}+ /// <summary>+ /// Deletes a download+ /// </summary>+ /// <param name="download">Download</param>+ Task DeleteDownload(Download download);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStore.cs b/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStore.csindex c58738ed7..35f3a45ce 100644--- a/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStore.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStore.cs@@ -2,172 +2,187 @@using Microsoft.Extensions.FileProviders.Physical;-namespace Grand.Business.Core.Interfaces.Storage+namespace Grand.Business.Core.Interfaces.Storage;++/// <summary>+/// Represents a generic abstraction over a virtual file store.+/// </summary>+public interface IFileStore+{+ /// <summary>+ /// Retrieves information about the given file within the file store.+ /// </summary>+ /// <param name="path">The path within the file store.</param>+ /// <returns>A <see cref="IFileStoreEntry" /> object representing the file, or <c>null</c> if the file does not exist.</returns>+ Task<IFileStoreEntry> GetFileInfo(string path);++ /// <summary>+ /// Retrieves information about the given directory within the file store.+ /// </summary>+ /// <param name="path">The path within the file store.</param>+ /// <returns>+ /// A <see cref="IFileStoreEntry" /> object representing the directory, or <c>null</c> if the directory does not+ /// exist.+ /// </returns>+ IFileStoreEntry GetDirectoryInfo(string path);++ /// <summary>+ /// Retrieves information about the given directory within the file store.+ /// </summary>+ /// <returns>+ /// A <see cref="PhysicalDirectoryInfo" /> object representing the directory, or <c>null</c> if the directory does+ /// not exist.+ /// </returns>+ Task<PhysicalDirectoryInfo> GetPhysicalDirectoryInfo(string directoryPath);++ /// <summary>+ /// Enumerates the content (files and directories) in a given directory within the file store.+ /// </summary>+ /// <remarks>+ /// Results are grouped by entry type, where directories are followed by files.+ /// </remarks>+ IList<IFileStoreEntry> GetDirectoryContent(string path = null, bool includeSubDirectories = false,+ bool listDirectories = true, bool listFiles = true);++ /// <summary>+ /// Creates a directory in the file store if it doesn't already exist.+ /// </summary>+ /// <param name="path">The path of the directory to be created.</param>+ /// <returns><c>true</c> if the directory was created; <c>false</c> if the directory already existed.</returns>+ bool TryCreateDirectory(string path);++ /// <summary>+ /// Rename a directory in the file store if it doesn't already exist.+ /// </summary>+ /// <param name="path">The path of the directory to be created.</param>+ /// <param name="newName">The new name of the directory</param>+ /// <returns><c>true</c> if the directory was rename; <c>false</c> if the directory already existed.</returns>+ Task<bool> TryRenameDirectory(string path, string newName);++ /// <summary>+ /// Deletes a file in the file store if it exists.+ /// </summary>+ /// <param name="path">The path of the file to be deleted.</param>+ /// <returns><c>true</c> if the file was deleted; <c>false</c> if the file did not exist.</returns>+ Task<bool> TryDeleteFile(string path);++ /// <summary>+ /// Deletes a directory in the file store if it exists.+ /// </summary>+ /// <param name="path">The path of the directory to be deleted.</param>+ Task<bool> TryDeleteDirectory(string path);++ /// <summary>+ /// Renames or moves a file to another location in the file store.+ /// </summary>+ /// <param name="oldPath">The path of the file to be renamed/moved.</param>+ /// <param name="newPath">The new path of the file after the rename/move.</param>+ Task MoveFile(string oldPath, string newPath);++ /// <summary>+ /// Creates a copy of a file in the file store.+ /// </summary>+ /// <param name="srcPath">The path of the source file to be copied.</param>+ /// <param name="dstPath">The path of the destination file to be created.</param>+ Task CopyFile(string srcPath, string dstPath);++ /// <summary>+ /// Rename of a file in the file store.+ /// </summary>+ /// <param name="file">The source file.</param>+ /// <param name="newName">The destination file.</param>+ Task RenameFile(string file, string newName);++ /// <summary>+ /// Creates a stream to read the contents of a file in the file store.+ /// </summary>+ /// <param name="path">The path of the file to be read.</param>+ /// <returns>+ /// An instance of <see cref="System.IO.Stream" /> that can be used to read the contents of the file. The caller+ /// must close the stream when finished.+ /// </returns>+ /// <exception cref="FileStoreException">Thrown if the specified file does not exist.</exception>+ Task<Stream> GetFileStream(string path);++ /// <summary>+ /// Creates a stream to read the contents of a file in the file store.+ /// </summary>+ /// <param name="fileStoreEntry">The IFileStoreEntry to be read.</param>+ /// <returns>+ /// An instance of <see cref="System.IO.Stream" /> that can be used to read the contents of the file. The caller+ /// must close the stream when finished.+ /// </returns>+ /// <exception cref="FileStoreException">Thrown if the specified file does not exist.</exception>+ Task<Stream> GetFileStream(IFileStoreEntry fileStoreEntry);++ /// <summary>+ /// Creates a new file in the file store from the contents of an input stream.+ /// </summary>+ /// <param name="path">The path of the file to be created.</param>+ /// <param name="inputStream">The stream whose contents to write to the new file.</param>+ /// <param name="overwrite">+ /// <c>true</c> to overwrite if a file already exists; <c>false</c> to throw an exception if the+ /// file already exists.+ /// </param>+ /// <exception cref="FileStoreException">+ /// Thrown if the specified file already exists and <paramref name="overwrite" /> was+ /// not set to <c>true</c>, or if the specified path exists but is not a file.+ /// </exception>+ /// <remarks>+ /// If the specified path contains one or more directories, then those directories are+ /// created if they do not already exist.+ /// </remarks>+ Task<string> CreateFileFromStream(string path, Stream inputStream, bool overwrite = false);++ /// <summary>+ /// Get text from file+ /// </summary>+ /// <param name="path"></param>+ /// <returns></returns>+ Task<string> ReadAllText(string path);++ /// <summary>+ /// Write text to file+ /// </summary>+ /// <param name="path"></param>+ /// <param name="text"></param>+ /// <returns></returns>+ Task WriteAllText(string path, string text);+}++public static class IFileStoreExtensions{/// <summary>- /// Represents a generic abstraction over a virtual file store.+ /// Combines multiple path parts using the path delimiter semantics of the abstract virtual file store./// </summary>- public interface IFileStore+ /// <param name="fileStore">The <see cref="IFileStore" />.</param>+ /// <param name="paths">The path parts to combine.</param>+ /// <returns>The full combined path.</returns>+ public static string Combine(this IFileStore fileStore, params string[] paths){- /// <summary>- /// Retrieves information about the given file within the file store.- /// </summary>- /// <param name="path">The path within the file store.</param>- /// <returns>A <see cref="IFileStoreEntry"/> object representing the file, or <c>null</c> if the file does not exist.</returns>- Task<IFileStoreEntry> GetFileInfo(string path);-- /// <summary>- /// Retrieves information about the given directory within the file store.- /// </summary>- /// <param name="path">The path within the file store.</param>- /// <returns>A <see cref="IFileStoreEntry"/> object representing the directory, or <c>null</c> if the directory does not exist.</returns>- IFileStoreEntry GetDirectoryInfo(string path);-- /// <summary>- /// Retrieves information about the given directory within the file store.- /// </summary>- /// <returns>A <see cref="PhysicalDirectoryInfo"/> object representing the directory, or <c>null</c> if the directory does not exist.</returns>- Task<PhysicalDirectoryInfo> GetPhysicalDirectoryInfo(string directoryPath);-- /// <summary>- /// Enumerates the content (files and directories) in a given directory within the file store.- /// </summary>- /// <remarks>- /// Results are grouped by entry type, where directories are followed by files.- /// </remarks>- IList<IFileStoreEntry> GetDirectoryContent(string path = null, bool includeSubDirectories = false, bool listDirectories = true, bool listFiles = true);-- /// <summary>- /// Creates a directory in the file store if it doesn't already exist.- /// </summary>- /// <param name="path">The path of the directory to be created.</param>- /// <returns><c>true</c> if the directory was created; <c>false</c> if the directory already existed.</returns>- bool TryCreateDirectory(string path);-- /// <summary>- /// Rename a directory in the file store if it doesn't already exist.- /// </summary>- /// <param name="path">The path of the directory to be created.</param>- /// <param name="newName">The new name of the directory</param>- /// <returns><c>true</c> if the directory was rename; <c>false</c> if the directory already existed.</returns>- Task<bool> TryRenameDirectory(string path, string newName);-- /// <summary>- /// Deletes a file in the file store if it exists.- /// </summary>- /// <param name="path">The path of the file to be deleted.</param>- /// <returns><c>true</c> if the file was deleted; <c>false</c> if the file did not exist.</returns>- Task<bool> TryDeleteFile(string path);-- /// <summary>- /// Deletes a directory in the file store if it exists.- /// </summary>- /// <param name="path">The path of the directory to be deleted.</param>- Task<bool> TryDeleteDirectory(string path);-- /// <summary>- /// Renames or moves a file to another location in the file store.- /// </summary>- /// <param name="oldPath">The path of the file to be renamed/moved.</param>- /// <param name="newPath">The new path of the file after the rename/move.</param>- Task MoveFile(string oldPath, string newPath);-- /// <summary>- /// Creates a copy of a file in the file store.- /// </summary>- /// <param name="srcPath">The path of the source file to be copied.</param>- /// <param name="dstPath">The path of the destination file to be created.</param>- Task CopyFile(string srcPath, string dstPath);-- /// <summary>- /// Rename of a file in the file store.- /// </summary>- /// <param name="file">The source file.</param>- /// <param name="newName">The destination file.</param>- Task RenameFile(string file, string newName);-- /// <summary>- /// Creates a stream to read the contents of a file in the file store.- /// </summary>- /// <param name="path">The path of the file to be read.</param>- /// <returns>An instance of <see cref="System.IO.Stream"/> that can be used to read the contents of the file. The caller must close the stream when finished.</returns>- /// <exception cref="FileStoreException">Thrown if the specified file does not exist.</exception>- Task<Stream> GetFileStream(string path);-- /// <summary>- /// Creates a stream to read the contents of a file in the file store.- /// </summary>- /// <param name="fileStoreEntry">The IFileStoreEntry to be read.</param>- /// <returns>An instance of <see cref="System.IO.Stream"/> that can be used to read the contents of the file. The caller must close the stream when finished.</returns>- /// <exception cref="FileStoreException">Thrown if the specified file does not exist.</exception>- Task<Stream> GetFileStream(IFileStoreEntry fileStoreEntry);-- /// <summary>- /// Creates a new file in the file store from the contents of an input stream.- /// </summary>- /// <param name="path">The path of the file to be created.</param>- /// <param name="inputStream">The stream whose contents to write to the new file.</param>- /// <param name="overwrite"><c>true</c> to overwrite if a file already exists; <c>false</c> to throw an exception if the file already exists.</param>- /// <exception cref="FileStoreException">Thrown if the specified file already exists and <paramref name="overwrite"/> was not set to <c>true</c>, or if the specified path exists but is not a file.</exception>- /// <remarks>- /// If the specified path contains one or more directories, then those directories are- /// created if they do not already exist.- /// </remarks>- Task<string> CreateFileFromStream(string path, Stream inputStream, bool overwrite = false);-- /// <summary>- /// Get text from file- /// </summary>- /// <param name="path"></param>- /// <returns></returns>- Task<string> ReadAllText(string path);-- /// <summary>- /// Write text to file- /// </summary>- /// <param name="path"></param>- /// <param name="text"></param>- /// <returns></returns>- Task WriteAllText(string path, string text);+ if (paths.Length == 0)+ return null;++ var normalizedParts =+ paths+ .Select(x => fileStore.NormalizePath(x))+ .Where(x => !string.IsNullOrEmpty(x))+ .ToArray();++ var combined = string.Join("/", normalizedParts);+ if (!Path.IsPathRooted(combined)) combined = "/" + combined;+ return combined;}- public static class IFileStoreExtensions+ /// <summary>+ /// Normalizes a path using the path delimiter semantics of the abstract virtual file store.+ /// </summary>+ /// <remarks>+ /// Backslash is converted to forward slash and any leading or trailing slashes+ /// are removed.+ /// </remarks>+ public static string NormalizePath(this IFileStore fileStore, string path){- /// <summary>- /// Combines multiple path parts using the path delimiter semantics of the abstract virtual file store.- /// </summary>- /// <param name="fileStore">The <see cref="IFileStore"/>.</param>- /// <param name="paths">The path parts to combine.</param>- /// <returns>The full combined path.</returns>- public static string Combine(this IFileStore fileStore, params string[] paths)- {- if (paths.Length == 0)- return null;-- var normalizedParts =- paths- .Select(x => fileStore.NormalizePath(x))- .Where(x => !string.IsNullOrEmpty(x))- .ToArray();-- var combined = string.Join("/", normalizedParts);- if (!Path.IsPathRooted(combined))- {- combined = "/" + combined;- }- return combined;- }-- /// <summary>- /// Normalizes a path using the path delimiter semantics of the abstract virtual file store.- /// </summary>- /// <remarks>- /// Backslash is converted to forward slash and any leading or trailing slashes- /// are removed.- /// </remarks>- public static string NormalizePath(this IFileStore fileStore, string path)- {- return path?.Replace('\\', '/').Trim('/', ' ');- }+ return path?.Replace('\\', '/').Trim('/', ' ');}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStoreEntry.cs b/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStoreEntry.csindex 98918c387..0f102dd54 100644--- a/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStoreEntry.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Storage/IFileStoreEntry.cs@@ -1,42 +1,41 @@//Source https://github.com/OrchardCMS/OrchardCore/tree/dev/src/OrchardCore-namespace Grand.Business.Core.Interfaces.Storage+namespace Grand.Business.Core.Interfaces.Storage;++public interface IFileStoreEntry{- public interface IFileStoreEntry- {- /// <summary>- /// Gets the full path of the file store entry within the file store.- /// </summary>- string Path { get; }-- /// <summary>- /// Gets the name of the file store entry.- /// </summary>- string Name { get; }-- /// <summary>- /// Gets the full path of the file store entry's containing directory within the file store.- /// </summary>- string DirectoryPath { get; }-- /// <summary>- /// Gets the full path of the file store entry's containing directory within the file store.- /// </summary>- string PhysicalPath { get; }-- /// <summary>- /// Gets the length of the file (0 if the file story entry is a directory).- /// </summary>- long Length { get; }-- /// <summary>- /// Gets the date and time in UTC when the file store entry was last modified.- /// </summary>- DateTime LastModifiedUtc { get; }-- /// <summary>- /// Gets a boolean indicating whether the file store entry is a directory.- /// </summary>- bool IsDirectory { get; }- }-}+ /// <summary>+ /// Gets the full path of the file store entry within the file store.+ /// </summary>+ string Path { get; }++ /// <summary>+ /// Gets the name of the file store entry.+ /// </summary>+ string Name { get; }++ /// <summary>+ /// Gets the full path of the file store entry's containing directory within the file store.+ /// </summary>+ string DirectoryPath { get; }++ /// <summary>+ /// Gets the full path of the file store entry's containing directory within the file store.+ /// </summary>+ string PhysicalPath { get; }++ /// <summary>+ /// Gets the length of the file (0 if the file story entry is a directory).+ /// </summary>+ long Length { get; }++ /// <summary>+ /// Gets the date and time in UTC when the file store entry was last modified.+ /// </summary>+ DateTime LastModifiedUtc { get; }++ /// <summary>+ /// Gets a boolean indicating whether the file store entry is a directory.+ /// </summary>+ bool IsDirectory { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Storage/IMediaFileStore.cs b/src/Business/Grand.Business.Core/Interfaces/Storage/IMediaFileStore.csindex f9e02d15e..edb0a9287 100644--- a/src/Business/Grand.Business.Core/Interfaces/Storage/IMediaFileStore.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Storage/IMediaFileStore.cs@@ -1,12 +1,10 @@//Source https://github.com/OrchardCMS/OrchardCore/tree/dev/src/OrchardCore-namespace Grand.Business.Core.Interfaces.Storage+namespace Grand.Business.Core.Interfaces.Storage;++/// <summary>+/// Represents an abstraction over a specialized file store for storing media and service it to clients.+/// </summary>+public interface IMediaFileStore : IFileStore{- /// <summary>- /// Represents an abstraction over a specialized file store for storing media and service it to clients.- /// </summary>- public interface IMediaFileStore : IFileStore- {-- }-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/Storage/IPictureService.cs b/src/Business/Grand.Business.Core/Interfaces/Storage/IPictureService.csindex 3555bee53..cee91a5d7 100644--- a/src/Business/Grand.Business.Core/Interfaces/Storage/IPictureService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/Storage/IPictureService.cs@@ -3,193 +3,192 @@ using Grand.Domain.Common;using Grand.Domain.Media;using System.Linq.Expressions;-namespace Grand.Business.Core.Interfaces.Storage+namespace Grand.Business.Core.Interfaces.Storage;++/// <summary>+/// Picture service interface+/// </summary>+public interface IPictureService{/// <summary>- /// Picture service interface- /// </summary>- public interface IPictureService- {- /// <summary>- /// Gets the loaded picture binary depending on picture storage settings- /// </summary>- /// <param name="picture">Picture</param>- /// <returns>Picture binary</returns>- Task<byte[]> LoadPictureBinary(Picture picture);-- /// <summary>- /// Gets the loaded picture binary depending on picture storage settings- /// </summary>- /// <param name="picture">Picture</param>- /// <param name="fromDb">Load from database; otherwise, from file system</param>- /// <returns>Picture binary</returns>- Task<byte[]> LoadPictureBinary(Picture picture, bool fromDb);-- /// <summary>- /// Get picture SEO friendly name- /// </summary>- /// <param name="name">Name</param>- /// <returns>Result</returns>- string GetPictureSeName(string name);-- /// <summary>- /// Gets the default picture URL- /// </summary>- /// <param name="targetSize">The target picture size (longest side)</param>- /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>- /// <returns>Picture URL</returns>- Task<string> GetDefaultPictureUrl(int targetSize = 0, string storeLocation = null);-- /// <summary>- /// Get a picture URL- /// </summary>- /// <param name="pictureId">Picture identifier</param>- /// <param name="targetSize">The target picture size (longest side)</param>- /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>- /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>- /// <returns>Picture URL</returns>- Task<string> GetPictureUrl(string pictureId,- int targetSize = 0,- bool showDefaultPicture = true,- string storeLocation = null);-- /// <summary>- /// Get a picture URL- /// </summary>- /// <param name="picture">Picture instance</param>- /// <param name="targetSize">The target picture size (longest side)</param>- /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>- /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>- /// <returns>Picture URL</returns>- Task<string> GetPictureUrl(Picture picture,- int targetSize = 0,- bool showDefaultPicture = true,- string storeLocation = null);-- /// <summary>- /// Get a picture local path- /// </summary>- /// <param name="picture">Picture instance</param>- /// <param name="targetSize">The target picture size (longest side)</param>- /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>- /// <returns></returns>- Task<string> GetThumbPhysicalPath(Picture picture, int targetSize = 0, bool showDefaultPicture = true);-- /// <summary>- /// Gets a picture- /// </summary>- /// <param name="pictureId">Picture identifier</param>- /// <returns>Picture</returns>- Task<Picture> GetPictureById(string pictureId);-- /// <summary>- /// Deletes a picture- /// </summary>- /// <param name="picture">Picture</param>- Task DeletePicture(Picture picture);-- /// <summary>- /// Deletes a picture on file system- /// </summary>- /// <param name="picture">Picture</param>- Task DeletePictureOnFileSystem(Picture picture);-- /// <summary>- /// Save picture on file system- /// </summary>- /// <param name="pictureId">Picture identifier</param>- /// <param name="pictureBinary">Picture binary</param>- /// <param name="mimeType">MIME type</param>- Task SavePictureInFile(string pictureId, byte[] pictureBinary, string mimeType);-- /// <summary>- /// Clear Pictures stored in Assets/Images/Thumbs- /// </summary>- Task ClearThumbs();-- /// <summary>- /// Gets a collection of pictures- /// </summary>- /// <param name="pageIndex">Current page</param>- /// <param name="pageSize">Items on each page</param>- /// <returns>Paged list of pictures</returns>- IPagedList<Picture> GetPictures(int pageIndex = 0, int pageSize = int.MaxValue);-- /// <summary>- /// Inserts a picture- /// </summary>- /// <param name="pictureBinary">The picture binary</param>- /// <param name="mimeType">The picture MIME type</param>- /// <param name="seoFilename">The SEO filename</param>- /// <param name="altAttribute">"alt" attribute for "img" HTML element</param>- /// <param name="titleAttribute">"title" attribute for "img" HTML element</param>- /// <param name="isNew">A value indicating whether the picture is new</param>- /// <param name="reference">Reference type</param>- /// <param name="objectId">Object id for reference</param>- /// <param name="validateBinary">A value indicating whether to validated provided picture binary</param>- /// <returns>Picture</returns>- Task<Picture> InsertPicture(byte[] pictureBinary, string mimeType, string seoFilename,- string altAttribute = null, string titleAttribute = null,- bool isNew = true, Reference reference = Reference.None, string objectId = "", bool validateBinary = false);-- /// <summary>- /// Updates the picture- /// </summary>- /// <param name="pictureId">The picture identifier</param>- /// <param name="pictureBinary">The picture binary</param>- /// <param name="mimeType">The picture MIME type</param>- /// <param name="seoFilename">The SEO filename</param>- /// <param name="altAttribute">"alt" attribute for "img" HTML element</param>- /// <param name="titleAttribute">"title" attribute for "img" HTML element</param>- /// <param name="style">style attribute for "img" HTML element</param>- /// <param name="extraField">Extra field</param>- /// <param name="isNew">A value indicating whether the picture is new</param>- /// <param name="validateBinary">A value indicating whether to validated provided picture binary</param>- /// <returns>Picture</returns>- Task<Picture> UpdatePicture(string pictureId, byte[] pictureBinary, string mimeType,- string seoFilename, string altAttribute = null, string titleAttribute = null,- string style = null, string extraField = null,- bool isNew = true, bool validateBinary = true);-- /// <summary>- /// Updates the picture- /// </summary>- /// <param name="picture">Picture</param>- /// <returns>Picture</returns>- Task<Picture> UpdatePicture(Picture picture);-- /// <summary>- /// Updates the picture field- /// </summary>- /// <param name="picture">Picture</param>- /// <param name="expression"></param>- /// <param name="value"></param>- Task UpdatePictureField<T>(Picture picture,- Expression<Func<Picture, T>> expression, T value);-- /// <summary>- /// Updates a SEO filename of a picture- /// </summary>- /// <param name="picture">The picture</param>- /// <param name="seoFilename">The SEO filename</param>- /// <returns>Picture</returns>- Task<Picture> SetSeoFilename(Picture picture, string seoFilename);-- /// <summary>- /// Validates input picture dimensions- /// </summary>- /// <param name="pictureBinary">Picture binary</param>- /// <param name="mimeType">MIME type</param>- /// <returns>Picture binary or throws an exception</returns>- byte[] ValidatePicture(byte[] pictureBinary, string mimeType);-- /// <summary>- /// Convert picture- /// </summary>- /// <param name="pictureBinary">Picture binary</param>- /// <param name="imageQuality">Image quality</param>- /// <param name="format">Format</param>- /// <returns>Picture binary or throws an exception</returns>- byte[] ConvertPicture(byte[] pictureBinary, int imageQuality, string format = "Webp");- }-}+ /// Gets the loaded picture binary depending on picture storage settings+ /// </summary>+ /// <param name="picture">Picture</param>+ /// <returns>Picture binary</returns>+ Task<byte[]> LoadPictureBinary(Picture picture);++ /// <summary>+ /// Gets the loaded picture binary depending on picture storage settings+ /// </summary>+ /// <param name="picture">Picture</param>+ /// <param name="fromDb">Load from database; otherwise, from file system</param>+ /// <returns>Picture binary</returns>+ Task<byte[]> LoadPictureBinary(Picture picture, bool fromDb);++ /// <summary>+ /// Get picture SEO friendly name+ /// </summary>+ /// <param name="name">Name</param>+ /// <returns>Result</returns>+ string GetPictureSeName(string name);++ /// <summary>+ /// Gets the default picture URL+ /// </summary>+ /// <param name="targetSize">The target picture size (longest side)</param>+ /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>+ /// <returns>Picture URL</returns>+ Task<string> GetDefaultPictureUrl(int targetSize = 0, string storeLocation = null);++ /// <summary>+ /// Get a picture URL+ /// </summary>+ /// <param name="pictureId">Picture identifier</param>+ /// <param name="targetSize">The target picture size (longest side)</param>+ /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>+ /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>+ /// <returns>Picture URL</returns>+ Task<string> GetPictureUrl(string pictureId,+ int targetSize = 0,+ bool showDefaultPicture = true,+ string storeLocation = null);++ /// <summary>+ /// Get a picture URL+ /// </summary>+ /// <param name="picture">Picture instance</param>+ /// <param name="targetSize">The target picture size (longest side)</param>+ /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>+ /// <param name="storeLocation">Store location URL; null to use determine the current store location automatically</param>+ /// <returns>Picture URL</returns>+ Task<string> GetPictureUrl(Picture picture,+ int targetSize = 0,+ bool showDefaultPicture = true,+ string storeLocation = null);++ /// <summary>+ /// Get a picture local path+ /// </summary>+ /// <param name="picture">Picture instance</param>+ /// <param name="targetSize">The target picture size (longest side)</param>+ /// <param name="showDefaultPicture">A value indicating whether the default picture is shown</param>+ /// <returns></returns>+ Task<string> GetThumbPhysicalPath(Picture picture, int targetSize = 0, bool showDefaultPicture = true);++ /// <summary>+ /// Gets a picture+ /// </summary>+ /// <param name="pictureId">Picture identifier</param>+ /// <returns>Picture</returns>+ Task<Picture> GetPictureById(string pictureId);++ /// <summary>+ /// Deletes a picture+ /// </summary>+ /// <param name="picture">Picture</param>+ Task DeletePicture(Picture picture);++ /// <summary>+ /// Deletes a picture on file system+ /// </summary>+ /// <param name="picture">Picture</param>+ Task DeletePictureOnFileSystem(Picture picture);++ /// <summary>+ /// Save picture on file system+ /// </summary>+ /// <param name="pictureId">Picture identifier</param>+ /// <param name="pictureBinary">Picture binary</param>+ /// <param name="mimeType">MIME type</param>+ Task SavePictureInFile(string pictureId, byte[] pictureBinary, string mimeType);++ /// <summary>+ /// Clear Pictures stored in Assets/Images/Thumbs+ /// </summary>+ Task ClearThumbs();++ /// <summary>+ /// Gets a collection of pictures+ /// </summary>+ /// <param name="pageIndex">Current page</param>+ /// <param name="pageSize">Items on each page</param>+ /// <returns>Paged list of pictures</returns>+ IPagedList<Picture> GetPictures(int pageIndex = 0, int pageSize = int.MaxValue);++ /// <summary>+ /// Inserts a picture+ /// </summary>+ /// <param name="pictureBinary">The picture binary</param>+ /// <param name="mimeType">The picture MIME type</param>+ /// <param name="seoFilename">The SEO filename</param>+ /// <param name="altAttribute">"alt" attribute for "img" HTML element</param>+ /// <param name="titleAttribute">"title" attribute for "img" HTML element</param>+ /// <param name="isNew">A value indicating whether the picture is new</param>+ /// <param name="reference">Reference type</param>+ /// <param name="objectId">Object id for reference</param>+ /// <param name="validateBinary">A value indicating whether to validated provided picture binary</param>+ /// <returns>Picture</returns>+ Task<Picture> InsertPicture(byte[] pictureBinary, string mimeType, string seoFilename,+ string altAttribute = null, string titleAttribute = null,+ bool isNew = true, Reference reference = Reference.None, string objectId = "", bool validateBinary = false);++ /// <summary>+ /// Updates the picture+ /// </summary>+ /// <param name="pictureId">The picture identifier</param>+ /// <param name="pictureBinary">The picture binary</param>+ /// <param name="mimeType">The picture MIME type</param>+ /// <param name="seoFilename">The SEO filename</param>+ /// <param name="altAttribute">"alt" attribute for "img" HTML element</param>+ /// <param name="titleAttribute">"title" attribute for "img" HTML element</param>+ /// <param name="style">style attribute for "img" HTML element</param>+ /// <param name="extraField">Extra field</param>+ /// <param name="isNew">A value indicating whether the picture is new</param>+ /// <param name="validateBinary">A value indicating whether to validated provided picture binary</param>+ /// <returns>Picture</returns>+ Task<Picture> UpdatePicture(string pictureId, byte[] pictureBinary, string mimeType,+ string seoFilename, string altAttribute = null, string titleAttribute = null,+ string style = null, string extraField = null,+ bool isNew = true, bool validateBinary = true);++ /// <summary>+ /// Updates the picture+ /// </summary>+ /// <param name="picture">Picture</param>+ /// <returns>Picture</returns>+ Task<Picture> UpdatePicture(Picture picture);++ /// <summary>+ /// Updates the picture field+ /// </summary>+ /// <param name="picture">Picture</param>+ /// <param name="expression"></param>+ /// <param name="value"></param>+ Task UpdatePictureField<T>(Picture picture,+ Expression<Func<Picture, T>> expression, T value);++ /// <summary>+ /// Updates a SEO filename of a picture+ /// </summary>+ /// <param name="picture">The picture</param>+ /// <param name="seoFilename">The SEO filename</param>+ /// <returns>Picture</returns>+ Task<Picture> SetSeoFilename(Picture picture, string seoFilename);++ /// <summary>+ /// Validates input picture dimensions+ /// </summary>+ /// <param name="pictureBinary">Picture binary</param>+ /// <param name="mimeType">MIME type</param>+ /// <returns>Picture binary or throws an exception</returns>+ byte[] ValidatePicture(byte[] pictureBinary, string mimeType);++ /// <summary>+ /// Convert picture+ /// </summary>+ /// <param name="pictureBinary">Picture binary</param>+ /// <param name="imageQuality">Image quality</param>+ /// <param name="format">Format</param>+ /// <returns>Picture binary or throws an exception</returns>+ byte[] ConvertPicture(byte[] pictureBinary, int imageQuality, string format = "Webp");+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Admin/IAdminSiteMapService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Admin/IAdminSiteMapService.csindex 7cce1e59d..fa20a9949 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Admin/IAdminSiteMapService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Admin/IAdminSiteMapService.cs@@ -1,13 +1,11 @@using Grand.Domain.Admin;-namespace Grand.Business.Core.Interfaces.System.Admin+namespace Grand.Business.Core.Interfaces.System.Admin;++public interface IAdminSiteMapService{- public interface IAdminSiteMapService- {- Task<IList<AdminSiteMap>> GetSiteMap();- Task InsertSiteMap(AdminSiteMap entity);- Task UpdateSiteMap(AdminSiteMap entity);- Task DeleteSiteMap(AdminSiteMap entity);-- }-}+ Task<IList<AdminSiteMap>> GetSiteMap();+ Task InsertSiteMap(AdminSiteMap entity);+ Task UpdateSiteMap(AdminSiteMap entity);+ Task DeleteSiteMap(AdminSiteMap entity);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationLocalizedService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationLocalizedService.csindex 15a1b9aed..8b1d4516c 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationLocalizedService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationLocalizedService.cs@@ -1,37 +1,36 @@using Grand.Business.Core.Utilities.System;-namespace Grand.Business.Core.Interfaces.System.Installation+namespace Grand.Business.Core.Interfaces.System.Installation;++/// <summary>+/// Translation service for installation process+/// </summary>+public interface IInstallationLocalizedService{/// <summary>- /// Translation service for installation process+ /// Get locale resource value/// </summary>- public interface IInstallationLocalizedService- {- /// <summary>- /// Get locale resource value- /// </summary>- /// <param name="languageCode">Language code</param>- /// <param name="resourceName">Resource name</param>- /// <returns>Resource value</returns>- string GetResource(string languageCode, string resourceName);+ /// <param name="languageCode">Language code</param>+ /// <param name="resourceName">Resource name</param>+ /// <returns>Resource value</returns>+ string GetResource(string languageCode, string resourceName);- /// <summary>- /// Get current language for the installation page- /// </summary>- /// <returns>Current language</returns>- /// <param name="languageCode">Language Code</param>- InstallationLanguage GetCurrentLanguage(string languageCode = default);+ /// <summary>+ /// Get current language for the installation page+ /// </summary>+ /// <returns>Current language</returns>+ /// <param name="languageCode">Language Code</param>+ InstallationLanguage GetCurrentLanguage(string languageCode = default);- /// <summary>- /// Get a list of available languages- /// </summary>- /// <returns>Available installation languages</returns>- IList<InstallationLanguage> GetAvailableLanguages();+ /// <summary>+ /// Get a list of available languages+ /// </summary>+ /// <returns>Available installation languages</returns>+ IList<InstallationLanguage> GetAvailableLanguages();- /// <summary>- /// Get a list of available collactions- /// </summary>- /// <returns>Available collations mongodb</returns>- IList<InstallationCollation> GetAvailableCollations();- }-}+ /// <summary>+ /// Get a list of available collactions+ /// </summary>+ /// <returns>Available collations mongodb</returns>+ IList<InstallationCollation> GetAvailableCollations();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationService.csindex 43b3afc8b..3c156e5f4 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Installation/IInstallationService.cs@@ -1,12 +1,11 @@using Microsoft.AspNetCore.Http;-namespace Grand.Business.Core.Interfaces.System.Installation+namespace Grand.Business.Core.Interfaces.System.Installation;++public interface IInstallationService{- public interface IInstallationService- {- Task InstallData(- string httpscheme, HostString host,- string defaultUserEmail, string defaultUserPassword, string collation, bool installSampleData = true,- string companyName = "", string companyAddress = "", string companyPhoneNumber = "", string companyEmail = "");- }-}+ Task InstallData(+ string httpscheme, HostString host,+ string defaultUserEmail, string defaultUserPassword, string collation, bool installSampleData = true,+ string companyName = "", string companyAddress = "", string companyPhoneNumber = "", string companyEmail = "");+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/MachineNameProvider/IMachineNameProvider.cs b/src/Business/Grand.Business.Core/Interfaces/System/MachineNameProvider/IMachineNameProvider.csindex 16fccafb1..ce7a2deac 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/MachineNameProvider/IMachineNameProvider.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/MachineNameProvider/IMachineNameProvider.cs@@ -1,14 +1,14 @@//Contribution: Orchard project (http://www.orchardproject.net/)-namespace Grand.Business.Core.Interfaces.System.MachineNameProvider++namespace Grand.Business.Core.Interfaces.System.MachineNameProvider;++/// <summary>+/// Describes a service which the name of the machine (instance) running the application.+/// </summary>+public interface IMachineNameProvider{/// <summary>- /// Describes a service which the name of the machine (instance) running the application.+ /// Returns the name of the machine (instance) running the application./// </summary>- public interface IMachineNameProvider- {- /// <summary>- /// Returns the name of the machine (instance) running the application.- /// </summary>- string GetMachineName();- }-}+ string GetMachineName();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Reports/ICustomerReportService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Reports/ICustomerReportService.csindex 71a719e6c..58bc556a5 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Reports/ICustomerReportService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Reports/ICustomerReportService.cs@@ -3,45 +3,46 @@ using Grand.Domain;using Grand.Domain.Payments;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.System.Reports+namespace Grand.Business.Core.Interfaces.System.Reports;++/// <summary>+/// Customer report service interface+/// </summary>+public interface ICustomerReportService{/// <summary>- /// Customer report service interface+ /// Get best customers/// </summary>- public interface ICustomerReportService- {- /// <summary>- /// Get best customers- /// </summary>- /// <param name="storeId">Store ident</param>- /// <param name="vendorId">Vendor ident</param>- /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>- /// <param name="os">Order status; null to load all records</param>- /// <param name="ps">Order payment status; null to load all records</param>- /// <param name="ss">Order shipment status; null to load all records</param>- /// <param name="orderBy">1 - order by order total, 2 - order by number of orders</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <returns>Report</returns>- IPagedList<BestCustomerReportLine> GetBestCustomersReport(string storeId = "", string vendorId = "", DateTime? createdFromUtc = null,- DateTime? createdToUtc = null, int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null, int orderBy = 0,- int pageIndex = 0, int pageSize = 214748364);+ /// <param name="storeId">Store ident</param>+ /// <param name="vendorId">Vendor ident</param>+ /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>+ /// <param name="os">Order status; null to load all records</param>+ /// <param name="ps">Order payment status; null to load all records</param>+ /// <param name="ss">Order shipment status; null to load all records</param>+ /// <param name="orderBy">1 - order by order total, 2 - order by number of orders</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <returns>Report</returns>+ IPagedList<BestCustomerReportLine> GetBestCustomersReport(string storeId = "", string vendorId = "",+ DateTime? createdFromUtc = null,+ DateTime? createdToUtc = null, int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,+ int orderBy = 0,+ int pageIndex = 0, int pageSize = 214748364);- /// Gets a report of customers registered in the last days- /// <param name="storeId">Store ident</param>- /// <param name="days">Customers registered in the last days</param>- /// <returns>Number of registered customers</returns>- Task<int> GetRegisteredCustomersReport(string storeId, int days);+ /// Gets a report of customers registered in the last days+ /// <param name="storeId">Store ident</param>+ /// <param name="days">Customers registered in the last days</param>+ /// <returns>Number of registered customers</returns>+ Task<int> GetRegisteredCustomersReport(string storeId, int days);- /// <summary>- /// Get "customer by time" report- /// </summary>- /// <param name="storeId">Store ident</param>- /// <param name="startTimeUtc">Start date</param>- /// <param name="endTimeUtc">End date</param>- /// <returns>Result</returns>- Task<IList<CustomerByTimeReportLine>> GetCustomerByTimeReport(string storeId, DateTime? startTimeUtc = null,- DateTime? endTimeUtc = null);- }+ /// <summary>+ /// Get "customer by time" report+ /// </summary>+ /// <param name="storeId">Store ident</param>+ /// <param name="startTimeUtc">Start date</param>+ /// <param name="endTimeUtc">End date</param>+ /// <returns>Result</returns>+ Task<IList<CustomerByTimeReportLine>> GetCustomerByTimeReport(string storeId, DateTime? startTimeUtc = null,+ DateTime? endTimeUtc = null);}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Reports/IOrderReportService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Reports/IOrderReportService.csindex 6310b179d..8fc0c10ff 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Reports/IOrderReportService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Reports/IOrderReportService.cs@@ -4,138 +4,136 @@ using Grand.Domain.Catalog;using Grand.Domain.Payments;using Grand.Domain.Shipping;-namespace Grand.Business.Core.Interfaces.System.Reports+namespace Grand.Business.Core.Interfaces.System.Reports;++/// <summary>+/// Order report service interface+/// </summary>+public interface IOrderReportService{/// <summary>- /// Order report service interface+ /// Get "order by country" report/// </summary>- public interface IOrderReportService- {- /// <summary>- /// Get "order by country" report- /// </summary>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="os">Order status</param>- /// <param name="ps">Payment status</param>- /// <param name="ss">Shipping status</param>- /// <param name="startTimeUtc">Start date</param>- /// <param name="endTimeUtc">End date</param>- /// <returns>Result</returns>- Task<IList<OrderByCountryReportLine>> GetCountryReport(string storeId = "",- string vendorId = "", int? os = null,- PaymentStatus? ps = null, ShippingStatus? ss = null,- DateTime? startTimeUtc = null, DateTime? endTimeUtc = null);-+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="os">Order status</param>+ /// <param name="ps">Payment status</param>+ /// <param name="ss">Shipping status</param>+ /// <param name="startTimeUtc">Start date</param>+ /// <param name="endTimeUtc">End date</param>+ /// <returns>Result</returns>+ Task<IList<OrderByCountryReportLine>> GetCountryReport(string storeId = "",+ string vendorId = "", int? os = null,+ PaymentStatus? ps = null, ShippingStatus? ss = null,+ DateTime? startTimeUtc = null, DateTime? endTimeUtc = null);- /// <summary>- /// Get "order by time" report- /// </summary>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="startTimeUtc">Start date</param>- /// <param name="endTimeUtc">End date</param>- /// <returns>Result</returns>- Task<IList<OrderByTimeReportLine>> GetOrderByTimeReport(string storeId = "", DateTime? startTimeUtc = null,- DateTime? endTimeUtc = null);- /// <summary>- /// Get order average report- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="customerId">Customer identifier</param>- /// <param name="vendorId">Vendor identifier</param>- /// <param name="salesEmployeeId">Sales employee identifier</param>- /// <param name="billingCountryId">Billing country identifier</param>- /// <param name="orderId">Order identifier</param>- /// <param name="paymentMethodSystemName">Payment method system name; null to load all records</param>- /// <param name="os">Order status</param>- /// <param name="ps">Payment status</param>- /// <param name="ss">Shipping status</param>- /// <param name="startTimeUtc">Start date</param>- /// <param name="endTimeUtc">End date</param>- /// <param name="billingEmail">Billing email. Leave empty to load all records.</param>- /// <param name="billingLastName">Billing last name. Leave empty to load all records.</param>- /// <param name="ignoreCancelledOrders">A value indicating whether to ignore cancelled orders</param>- /// <param name="tagId">Tag ident</param>- /// <returns>Result</returns>- Task<OrderAverageReportLine> GetOrderAverageReportLine(string storeId = "",- string customerId = "", string vendorId = "", string salesEmployeeId = "",- string billingCountryId = "", string orderId = "", string paymentMethodSystemName = null,- int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,- DateTime? startTimeUtc = null, DateTime? endTimeUtc = null,- string billingEmail = null, string billingLastName = "",- bool ignoreCancelledOrders = false,- string tagId = null);+ /// <summary>+ /// Get "order by time" report+ /// </summary>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="startTimeUtc">Start date</param>+ /// <param name="endTimeUtc">End date</param>+ /// <returns>Result</returns>+ Task<IList<OrderByTimeReportLine>> GetOrderByTimeReport(string storeId = "", DateTime? startTimeUtc = null,+ DateTime? endTimeUtc = null);+ /// <summary>+ /// Get order average report+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="customerId">Customer identifier</param>+ /// <param name="vendorId">Vendor identifier</param>+ /// <param name="salesEmployeeId">Sales employee identifier</param>+ /// <param name="billingCountryId">Billing country identifier</param>+ /// <param name="orderId">Order identifier</param>+ /// <param name="paymentMethodSystemName">Payment method system name; null to load all records</param>+ /// <param name="os">Order status</param>+ /// <param name="ps">Payment status</param>+ /// <param name="ss">Shipping status</param>+ /// <param name="startTimeUtc">Start date</param>+ /// <param name="endTimeUtc">End date</param>+ /// <param name="billingEmail">Billing email. Leave empty to load all records.</param>+ /// <param name="billingLastName">Billing last name. Leave empty to load all records.</param>+ /// <param name="ignoreCancelledOrders">A value indicating whether to ignore cancelled orders</param>+ /// <param name="tagId">Tag ident</param>+ /// <returns>Result</returns>+ Task<OrderAverageReportLine> GetOrderAverageReportLine(string storeId = "",+ string customerId = "", string vendorId = "", string salesEmployeeId = "",+ string billingCountryId = "", string orderId = "", string paymentMethodSystemName = null,+ int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,+ DateTime? startTimeUtc = null, DateTime? endTimeUtc = null,+ string billingEmail = null, string billingLastName = "",+ bool ignoreCancelledOrders = false,+ string tagId = null);- /// <summary>- /// Get order average report- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="os">Order status</param>- /// <returns>Result</returns>- Task<OrderAverageReportLineSummary> OrderAverageReport(string storeId, int os);- /// <summary>- /// Get best sellers report- /// </summary>- /// <param name="storeId">Store identifier; "" to load all records</param>- /// <param name="vendorId">Vendor identifier; "" to load all records</param>- /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>- /// <param name="os">Order status; null to load all records</param>- /// <param name="ps">Order payment status; null to load all records</param>- /// <param name="ss">Shipping status; null to load all records</param>- /// <param name="billingCountryId">Billing country identifier; "" to load all records</param>- /// <param name="orderBy">1 - order by quantity, 2 - order by total amount</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Result</returns>- Task<IPagedList<BestsellersReportLine>> BestSellersReport(- string storeId = "", string vendorId = "",- DateTime? createdFromUtc = null, DateTime? createdToUtc = null,- int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,- string billingCountryId = "",- int orderBy = 1,- int pageIndex = 0, int pageSize = int.MaxValue,- bool showHidden = false);+ /// <summary>+ /// Get order average report+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="os">Order status</param>+ /// <returns>Result</returns>+ Task<OrderAverageReportLineSummary> OrderAverageReport(string storeId, int os);+ /// <summary>+ /// Get best sellers report+ /// </summary>+ /// <param name="storeId">Store identifier; "" to load all records</param>+ /// <param name="vendorId">Vendor identifier; "" to load all records</param>+ /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>+ /// <param name="os">Order status; null to load all records</param>+ /// <param name="ps">Order payment status; null to load all records</param>+ /// <param name="ss">Shipping status; null to load all records</param>+ /// <param name="billingCountryId">Billing country identifier; "" to load all records</param>+ /// <param name="orderBy">1 - order by quantity, 2 - order by total amount</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Result</returns>+ Task<IPagedList<BestsellersReportLine>> BestSellersReport(+ string storeId = "", string vendorId = "",+ DateTime? createdFromUtc = null, DateTime? createdToUtc = null,+ int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,+ string billingCountryId = "",+ int orderBy = 1,+ int pageIndex = 0, int pageSize = int.MaxValue,+ bool showHidden = false);- /// <summary>- /// Gets a report of orders in the last days- /// </summary>- /// <param name="days">Orders in the last days</param>- /// <param name="storeId">Store ident</param>- /// <param name="salesEmployeeId">Sales employee ident</param>- /// <returns>ReportPeriodOrder</returns>- Task<ReportPeriodOrder> GetOrderPeriodReport(int days, string storeId = "", string salesEmployeeId = "");- /// <summary>- /// Gets a list of products (identifiers) purchased by other customers who purchased a specified product- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="productId">Product identifier</param>- /// <param name="recordsToReturn">Records to return</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Products</returns>- Task<string[]> GetAlsoPurchasedProductsIds(string storeId, string productId,- int recordsToReturn = 5, bool showHidden = false);+ /// <summary>+ /// Gets a report of orders in the last days+ /// </summary>+ /// <param name="days">Orders in the last days</param>+ /// <param name="storeId">Store ident</param>+ /// <param name="salesEmployeeId">Sales employee ident</param>+ /// <returns>ReportPeriodOrder</returns>+ Task<ReportPeriodOrder> GetOrderPeriodReport(int days, string storeId = "", string salesEmployeeId = "");- /// <summary>- /// Gets a list of products that were never sold- /// </summary>- /// <param name="storeId">Store identifier</param>- /// <param name="vendorId">Vendor identifier</param>- /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>- /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>- /// <param name="pageIndex">Page index</param>- /// <param name="pageSize">Page size</param>- /// <param name="showHidden">A value indicating whether to show hidden records</param>- /// <returns>Products</returns>- Task<IPagedList<Product>> ProductsNeverSold(string storeId = "", string vendorId = "",- DateTime? createdFromUtc = null, DateTime? createdToUtc = null,- int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);+ /// <summary>+ /// Gets a list of products (identifiers) purchased by other customers who purchased a specified product+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="productId">Product identifier</param>+ /// <param name="recordsToReturn">Records to return</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Products</returns>+ Task<string[]> GetAlsoPurchasedProductsIds(string storeId, string productId,+ int recordsToReturn = 5, bool showHidden = false);- }-}+ /// <summary>+ /// Gets a list of products that were never sold+ /// </summary>+ /// <param name="storeId">Store identifier</param>+ /// <param name="vendorId">Vendor identifier</param>+ /// <param name="createdFromUtc">Order created date from (UTC); null to load all records</param>+ /// <param name="createdToUtc">Order created date to (UTC); null to load all records</param>+ /// <param name="pageIndex">Page index</param>+ /// <param name="pageSize">Page size</param>+ /// <param name="showHidden">A value indicating whether to show hidden records</param>+ /// <returns>Products</returns>+ Task<IPagedList<Product>> ProductsNeverSold(string storeId = "", string vendorId = "",+ DateTime? createdFromUtc = null, DateTime? createdToUtc = null,+ int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/Reports/IProductsReportService.cs b/src/Business/Grand.Business.Core/Interfaces/System/Reports/IProductsReportService.csindex 48d6be919..9c82c6a52 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/Reports/IProductsReportService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/Reports/IProductsReportService.cs@@ -1,19 +1,19 @@using Grand.Business.Core.Utilities.System;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Interfaces.System.Reports+namespace Grand.Business.Core.Interfaces.System.Reports;++/// <summary>+/// Product report service interface+/// </summary>+public interface IProductsReportService{/// <summary>- /// Product report service interface+ /// Get "low stock products" report/// </summary>- public interface IProductsReportService- {- /// <summary>- /// Get "low stock products" report- /// </summary>- /// <param name="vendorId">Vendor identifier</param>- /// <param name="storeId">Store identifier</param>- /// <returns>Result</returns>- Task<(IList<Product> products, IList<ProductsAttributeCombination> combinations)> LowStockProducts(string vendorId = "", string storeId = "");- }-}+ /// <param name="vendorId">Vendor identifier</param>+ /// <param name="storeId">Store identifier</param>+ /// <returns>Result</returns>+ Task<(IList<Product> products, IList<ProductsAttributeCombination> combinations)> LowStockProducts(+ string vendorId = "", string storeId = "");+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTask.cs b/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTask.csindex 6fb4d8ce6..e7799b519 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTask.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTask.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Interfaces.System.ScheduleTasks+namespace Grand.Business.Core.Interfaces.System.ScheduleTasks;++public interface IScheduleTask{- public interface IScheduleTask- {- Task Execute();- }-}+ Task Execute();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTaskService.cs b/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTaskService.csindex 1ee9b1365..eec3f4906 100644--- a/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTaskService.cs+++ b/src/Business/Grand.Business.Core/Interfaces/System/ScheduleTasks/IScheduleTaskService.cs@@ -1,45 +1,44 @@using Grand.Domain.Tasks;-namespace Grand.Business.Core.Interfaces.System.ScheduleTasks+namespace Grand.Business.Core.Interfaces.System.ScheduleTasks;++public interface IScheduleTaskService{- public interface IScheduleTaskService- {- /// <summary>- /// Gets a task- /// </summary>- /// <param name="taskId">Task identifier</param>- /// <returns>Task</returns>- Task<ScheduleTask> GetTaskById(string taskId);+ /// <summary>+ /// Gets a task+ /// </summary>+ /// <param name="taskId">Task identifier</param>+ /// <returns>Task</returns>+ Task<ScheduleTask> GetTaskById(string taskId);- /// <summary>- /// Gets a task by its type- /// </summary>- /// <param name="type">Task type</param>- /// <returns>Task</returns>- Task<ScheduleTask> GetTaskByType(string type);+ /// <summary>+ /// Gets a task by its type+ /// </summary>+ /// <param name="type">Task type</param>+ /// <returns>Task</returns>+ Task<ScheduleTask> GetTaskByType(string type);- /// <summary>- /// Gets all tasks- /// </summary>- /// <returns>Tasks</returns>- Task<IList<ScheduleTask>> GetAllTasks();+ /// <summary>+ /// Gets all tasks+ /// </summary>+ /// <returns>Tasks</returns>+ Task<IList<ScheduleTask>> GetAllTasks();- /// <summary>- /// Insert the task- /// </summary>- /// <param name="task">Task</param>- Task<ScheduleTask> InsertTask(ScheduleTask task);+ /// <summary>+ /// Insert the task+ /// </summary>+ /// <param name="task">Task</param>+ Task<ScheduleTask> InsertTask(ScheduleTask task);- /// <summary>- /// Updates the task- /// </summary>- /// <param name="task">Task</param>- Task UpdateTask(ScheduleTask task);+ /// <summary>+ /// Updates the task+ /// </summary>+ /// <param name="task">Task</param>+ Task UpdateTask(ScheduleTask task);- /// <summary>- /// Delete the task- /// </summary>- /// <param name="task">Task</param>- Task DeleteTask(ScheduleTask task);- }-}+ /// <summary>+ /// Delete the task+ /// </summary>+ /// <param name="task">Task</param>+ Task DeleteTask(ScheduleTask task);+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountAmountProvider.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountAmountProvider.csindex e42a8c31c..f971f8672 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountAmountProvider.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountAmountProvider.cs@@ -6,4 +6,9 @@ using MediatR;namespace Grand.Business.Core.Queries.Catalog;-public record GetDiscountAmountProvider(Discount Discount, Customer Customer, Product Product, Currency Currency, double Amount) : IRequest<double>;+public record GetDiscountAmountProvider(+ Discount Discount,+ Customer Customer,+ Product Product,+ Currency Currency,+ double Amount) : IRequest<double>;\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountUsageHistoryQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountUsageHistoryQuery.csindex 0a468375c..1888cd63e 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountUsageHistoryQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetDiscountUsageHistoryQuery.cs@@ -7,9 +7,9 @@ namespace Grand.Business.Core.Queries.Catalog;public record GetDiscountUsageHistoryQuery : IRequest<IPagedList<DiscountUsageHistory>>{public string DiscountId { get; set; }- public string CustomerId{ get; set; }- public string OrderId{ get; set; }- public bool? Canceled { get; set; } = null;+ public string CustomerId { get; set; }+ public string OrderId { get; set; }+ public bool? Canceled { get; set; } = null;public int PageIndex { get; set; }public int PageSize { get; set; } = int.MaxValue;}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetPersonalizedProductsQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetPersonalizedProductsQuery.csindex 4e098ae80..7a1e42927 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetPersonalizedProductsQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetPersonalizedProductsQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetPersonalizedProductsQuery : IRequest<IList<Product>>{- public class GetPersonalizedProductsQuery : IRequest<IList<Product>>- {- public string CustomerId { get; set; }- public int ProductsNumber { get; set; }- }-}+ public string CustomerId { get; set; }+ public int ProductsNumber { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetPriceByCustomerProductQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetPriceByCustomerProductQuery.csindex 34e3413e0..90c8024bd 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetPriceByCustomerProductQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetPriceByCustomerProductQuery.cs@@ -1,10 +1,9 @@using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetPriceByCustomerProductQuery : IRequest<double?>{- public class GetPriceByCustomerProductQuery : IRequest<double?>- {- public string CustomerId { get; set; }- public string ProductId { get; set; }- }-}+ public string CustomerId { get; set; }+ public string ProductId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetProductArchByIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetProductArchByIdQuery.csindex dc984dab5..f0f1da189 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetProductArchByIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetProductArchByIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetProductArchByIdQuery : IRequest<Product>{- public class GetProductArchByIdQuery : IRequest<Product>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetRecommendedProductsQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetRecommendedProductsQuery.csindex 9a4510417..45a1b8d4c 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetRecommendedProductsQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetRecommendedProductsQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetRecommendedProductsQuery : IRequest<IList<Product>>{- public class GetRecommendedProductsQuery : IRequest<IList<Product>>- {- public string[] CustomerGroupIds { get; set; }- public string StoreId { get; set; }- }-}+ public string[] CustomerGroupIds { get; set; }+ public string StoreId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetSearchProductsQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetSearchProductsQuery.csindex bf0a5d2c1..5c6bd5b27 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetSearchProductsQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetSearchProductsQuery.cs@@ -3,39 +3,39 @@ using Grand.Domain.Catalog;using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetSearchProductsQuery : IRequest<(IPagedList<Product> products, IList<string>+ filterableSpecificationAttributeOptionIds)>{- public class GetSearchProductsQuery : IRequest<(IPagedList<Product> products, IList<string> filterableSpecificationAttributeOptionIds)>- {- public Customer Customer { get; set; }+ public Customer Customer { get; set; }- public bool LoadFilterableSpecificationAttributeOptionIds { get; set; } = false;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- public IList<string> CategoryIds { get; set; }- public string BrandId { get; set; } = "";- public string CollectionId { get; set; } = "";- public string StoreId { get; set; } = "";- public string VendorId { get; set; } = "";- public string WarehouseId { get; set; } = "";- public ProductType? ProductType { get; set; }- public bool VisibleIndividuallyOnly { get; set; }- public bool MarkedAsNewOnly { get; set; }- public bool? ShowOnHomePage { get; set; }- public bool? FeaturedProducts { get; set; }- public double? PriceMin { get; set; }- public double? PriceMax { get; set; }- public double? Rating { get; set; }- public string ProductTag { get; set; } = "";- public string Keywords { get; set; }- public bool SearchDescriptions { get; set; }- public bool SearchSku { get; set; } = true;- public bool SearchProductTags { get; set; }- public string LanguageId { get; set; } = "";- public IList<string> FilteredSpecs { get; set; }- public IList<string> SpecificationOptions { get; set; }- public ProductSortingEnum OrderBy { get; set; } = ProductSortingEnum.Position;- public bool ShowHidden { get; set; }- public bool? OverridePublished { get; set; }- }-}+ public bool LoadFilterableSpecificationAttributeOptionIds { get; set; } = false;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+ public IList<string> CategoryIds { get; set; }+ public string BrandId { get; set; } = "";+ public string CollectionId { get; set; } = "";+ public string StoreId { get; set; } = "";+ public string VendorId { get; set; } = "";+ public string WarehouseId { get; set; } = "";+ public ProductType? ProductType { get; set; }+ public bool VisibleIndividuallyOnly { get; set; }+ public bool MarkedAsNewOnly { get; set; }+ public bool? ShowOnHomePage { get; set; }+ public bool? FeaturedProducts { get; set; }+ public double? PriceMin { get; set; }+ public double? PriceMax { get; set; }+ public double? Rating { get; set; }+ public string ProductTag { get; set; } = "";+ public string Keywords { get; set; }+ public bool SearchDescriptions { get; set; }+ public bool SearchSku { get; set; } = true;+ public bool SearchProductTags { get; set; }+ public string LanguageId { get; set; } = "";+ public IList<string> FilteredSpecs { get; set; }+ public IList<string> SpecificationOptions { get; set; }+ public ProductSortingEnum OrderBy { get; set; } = ProductSortingEnum.Position;+ public bool ShowHidden { get; set; }+ public bool? OverridePublished { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetSuggestedProductsQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetSuggestedProductsQuery.csindex 189ef1d7b..a3530b390 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetSuggestedProductsQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetSuggestedProductsQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetSuggestedProductsQuery : IRequest<IList<Product>>{- public class GetSuggestedProductsQuery : IRequest<IList<Product>>- {- public string[] CustomerTagIds { get; set; }- public int ProductsNumber { get; set; }- }-}+ public string[] CustomerTagIds { get; set; }+ public int ProductsNumber { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Catalog/GetVendorByIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Catalog/GetVendorByIdQuery.csindex 61a789205..c30b4cf7f 100644--- a/src/Business/Grand.Business.Core/Queries/Catalog/GetVendorByIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Catalog/GetVendorByIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Queries.Catalog+namespace Grand.Business.Core.Queries.Catalog;++public class GetVendorByIdQuery : IRequest<Vendor>{- public class GetVendorByIdQuery : IRequest<Vendor>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCancelOrderQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCancelOrderQuery.csindex c0f06e9ee..12fbc5a5e 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCancelOrderQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCancelOrderQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanCancelOrderQuery : IRequest<bool>{- public class CanCancelOrderQuery : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCaptureQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCaptureQuery.csindex 35c38b24c..068d9ebb8 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCaptureQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanCaptureQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanCaptureQuery : IRequest<bool>{- public class CanCaptureQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsAuthorizedQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsAuthorizedQuery.csindex 29b18cb78..e53041b1e 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsAuthorizedQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsAuthorizedQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanMarkPaymentTransactionAsAuthorizedQuery : IRequest<bool>{- public class CanMarkPaymentTransactionAsAuthorizedQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsPaidQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsPaidQuery.csindex ba0f84dcd..1a781e1a0 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsPaidQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanMarkPaymentTransactionAsPaidQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanMarkPaymentTransactionAsPaidQuery : IRequest<bool>{- public class CanMarkPaymentTransactionAsPaidQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyPaidOfflineQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyPaidOfflineQuery.csindex 48ba463c0..9db49f23b 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyPaidOfflineQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyPaidOfflineQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanPartiallyPaidOfflineQuery : IRequest<bool>{- public class CanPartiallyPaidOfflineQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- public double AmountToPaid { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+ public double AmountToPaid { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundOfflineQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundOfflineQuery.csindex 3509e078b..4afbdb0cd 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundOfflineQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundOfflineQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanPartiallyRefundOfflineQuery : IRequest<bool>{- public class CanPartiallyRefundOfflineQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- public double AmountToRefund { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+ public double AmountToRefund { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundQuery.csindex 0579c8d53..e530cb57d 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanPartiallyRefundQuery.cs@@ -1,11 +1,10 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanPartiallyRefundQuery : IRequest<bool>{- public class CanPartiallyRefundQuery : IRequest<bool>- {- public double AmountToRefund { get; set; }- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public double AmountToRefund { get; set; }+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundOfflineQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundOfflineQuery.csindex 61f65c0a8..294f3769a 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundOfflineQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundOfflineQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanRefundOfflineQuery : IRequest<bool>{- public class CanRefundOfflineQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundQuery.csindex 802a0bdd0..ee5ef8fe3 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanRefundQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanRefundQuery : IRequest<bool>{- public class CanRefundQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidOfflineQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidOfflineQuery.csindex 539de1501..4cfcc730c 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidOfflineQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidOfflineQuery.cs@@ -1,11 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders-{- public class CanVoidOfflineQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+namespace Grand.Business.Core.Queries.Checkout.Orders;+public class CanVoidOfflineQuery : IRequest<bool>+{+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidQuery.csindex b368bed57..e09ba31da 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/CanVoidQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class CanVoidQuery : IRequest<bool>{- public class CanVoidQuery : IRequest<bool>- {- public PaymentTransaction PaymentTransaction { get; set; }- }-}+ public PaymentTransaction PaymentTransaction { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetGiftVoucherQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetGiftVoucherQuery.csindex da288b536..a3f53ceb0 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetGiftVoucherQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetGiftVoucherQuery.cs@@ -1,18 +1,17 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetGiftVoucherQuery : IRequest<IQueryable<GiftVoucher>>{- public class GetGiftVoucherQuery : IRequest<IQueryable<GiftVoucher>>- {- public string GiftVoucherId { get; set; } = "";- public string PurchasedWithOrderItemId { get; set; } = "";- public bool? IsGiftVoucherActivated { get; set; }- public string Code { get; set; } = "";- public DateTime? CreatedFromUtc { get; set; } = null;- public DateTime? CreatedToUtc { get; set; } = null;- public string RecipientName { get; set; } = null;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- }-}+ public string GiftVoucherId { get; set; } = "";+ public string PurchasedWithOrderItemId { get; set; } = "";+ public bool? IsGiftVoucherActivated { get; set; }+ public string Code { get; set; } = "";+ public DateTime? CreatedFromUtc { get; set; } = null;+ public DateTime? CreatedToUtc { get; set; } = null;+ public string RecipientName { get; set; } = null;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnCountQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnCountQuery.csindex c641f9cc7..5472ebf6d 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnCountQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnCountQuery.cs@@ -1,9 +1,9 @@using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders++namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetMerchandiseReturnCountQuery : IRequest<int>{- public class GetMerchandiseReturnCountQuery : IRequest<int>- {- public int RequestStatusId { get; set; }- public string StoreId { get; set; }- }-}+ public int RequestStatusId { get; set; }+ public string StoreId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnQuery.csindex 071ba7bc5..c11355194 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetMerchandiseReturnQuery.cs@@ -1,19 +1,18 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetMerchandiseReturnQuery : IRequest<IQueryable<MerchandiseReturn>>{- public class GetMerchandiseReturnQuery : IRequest<IQueryable<MerchandiseReturn>>- {- public string StoreId { get; set; } = "";- public string CustomerId { get; set; } = "";- public string VendorId { get; set; } = "";- public string OwnerId { get; set; } = "";- public string OrderItemId { get; set; } = "";- public MerchandiseReturnStatus? Rs { get; set; } = null;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- public DateTime? CreatedFromUtc { get; set; } = null;- public DateTime? CreatedToUtc { get; set; } = null;- }-}+ public string StoreId { get; set; } = "";+ public string CustomerId { get; set; } = "";+ public string VendorId { get; set; } = "";+ public string OwnerId { get; set; } = "";+ public string OrderItemId { get; set; } = "";+ public MerchandiseReturnStatus? Rs { get; set; } = null;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+ public DateTime? CreatedFromUtc { get; set; } = null;+ public DateTime? CreatedToUtc { get; set; } = null;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetOrderQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetOrderQuery.csindex 3cc6f2899..bcf9bb879 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetOrderQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetOrderQuery.cs@@ -3,32 +3,31 @@ using Grand.Domain.Payments;using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetOrderQuery : IRequest<IQueryable<Order>>{- public class GetOrderQuery : IRequest<IQueryable<Order>>- {- public string OrderId { get; set; } = "";- public string StoreId { get; set; } = "";- public string VendorId { get; set; } = "";- public string CustomerId { get; set; } = "";- public string ProductId { get; set; } = "";- public string AffiliateId { get; set; } = "";- public string WarehouseId { get; set; } = "";- public string BillingCountryId { get; set; } = "";- public string OwnerId { get; set; } = "";- public string SalesEmployeeId { get; set; } = "";- public string PaymentMethodSystemName { get; set; } = null;- public DateTime? CreatedFromUtc { get; set; } = null;- public DateTime? CreatedToUtc { get; set; } = null;- public int? Os { get; set; } = null;- public PaymentStatus? Ps { get; set; } = null;- public ShippingStatus? Ss { get; set; } = null;- public string BillingEmail { get; set; } = null;- public string BillingLastName { get; set; } = "";- public string OrderGuid { get; set; } = null;- public string OrderCode { get; set; } = null;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- public string OrderTagId { get; set; } = "";- }-}+ public string OrderId { get; set; } = "";+ public string StoreId { get; set; } = "";+ public string VendorId { get; set; } = "";+ public string CustomerId { get; set; } = "";+ public string ProductId { get; set; } = "";+ public string AffiliateId { get; set; } = "";+ public string WarehouseId { get; set; } = "";+ public string BillingCountryId { get; set; } = "";+ public string OwnerId { get; set; } = "";+ public string SalesEmployeeId { get; set; } = "";+ public string PaymentMethodSystemName { get; set; } = null;+ public DateTime? CreatedFromUtc { get; set; } = null;+ public DateTime? CreatedToUtc { get; set; } = null;+ public int? Os { get; set; } = null;+ public PaymentStatus? Ps { get; set; } = null;+ public ShippingStatus? Ss { get; set; } = null;+ public string BillingEmail { get; set; } = null;+ public string BillingLastName { get; set; } = "";+ public string OrderGuid { get; set; } = null;+ public string OrderCode { get; set; } = null;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+ public string OrderTagId { get; set; } = "";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPaymentTransactionQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPaymentTransactionQuery.csindex d0050a17c..a5a17639a 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPaymentTransactionQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPaymentTransactionQuery.cs@@ -1,17 +1,16 @@using Grand.Domain.Payments;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetPaymentTransactionQuery : IRequest<IQueryable<PaymentTransaction>>{- public class GetPaymentTransactionQuery : IRequest<IQueryable<PaymentTransaction>>- {- public string StoreId { get; set; } = "";- public string CustomerEmail { get; set; } = "";- public Guid? OrderGuid { get; set; }- public TransactionStatus? Ts { get; set; } = null;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- public DateTime? CreatedFromUtc { get; set; } = null;- public DateTime? CreatedToUtc { get; set; } = null;- }-}+ public string StoreId { get; set; } = "";+ public string CustomerEmail { get; set; } = "";+ public Guid? OrderGuid { get; set; }+ public TransactionStatus? Ts { get; set; } = null;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+ public DateTime? CreatedFromUtc { get; set; } = null;+ public DateTime? CreatedToUtc { get; set; } = null;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPickupPointById.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPickupPointById.csindex 0359b003a..66c9271db 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPickupPointById.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetPickupPointById.cs@@ -1,10 +1,9 @@using Grand.Domain.Shipping;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetPickupPointById : IRequest<PickupPoint>{- public class GetPickupPointById : IRequest<PickupPoint>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetVendorsInOrderQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetVendorsInOrderQuery.csindex e1911b224..d9720f33e 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetVendorsInOrderQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/GetVendorsInOrderQuery.cs@@ -2,10 +2,9 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class GetVendorsInOrderQuery : IRequest<IList<Vendor>>{- public class GetVendorsInOrderQuery : IRequest<IList<Vendor>>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/IsMerchandiseReturnAllowedQuery.cs b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/IsMerchandiseReturnAllowedQuery.csindex 96aabcad2..a01fb661a 100644--- a/src/Business/Grand.Business.Core/Queries/Checkout/Orders/IsMerchandiseReturnAllowedQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Checkout/Orders/IsMerchandiseReturnAllowedQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Orders;using MediatR;-namespace Grand.Business.Core.Queries.Checkout.Orders+namespace Grand.Business.Core.Queries.Checkout.Orders;++public class IsMerchandiseReturnAllowedQuery : IRequest<bool>{- public class IsMerchandiseReturnAllowedQuery : IRequest<bool>- {- public Order Order { get; set; }- }-}+ public Order Order { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Customers/GetCustomerQuery.cs b/src/Business/Grand.Business.Core/Queries/Customers/GetCustomerQuery.csindex f0379580c..d5db68e8f 100644--- a/src/Business/Grand.Business.Core/Queries/Customers/GetCustomerQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Customers/GetCustomerQuery.cs@@ -3,31 +3,30 @@ using Grand.Domain.Orders;using MediatR;using System.Linq.Expressions;-namespace Grand.Business.Core.Queries.Customers+namespace Grand.Business.Core.Queries.Customers;++public class GetCustomerQuery : IRequest<IQueryable<Customer>>{- public class GetCustomerQuery : IRequest<IQueryable<Customer>>- {- public DateTime? CreatedFromUtc { get; set; } = null;+ public DateTime? CreatedFromUtc { get; set; } = null;- public DateTime? CreatedToUtc { get; set; } = null;- public string AffiliateId { get; set; } = "";- public string VendorId { get; set; } = "";- public string StoreId { get; set; } = "";- public string OwnerId { get; set; } = "";- public string SalesEmployeeId { get; set; } = "";- public string[] CustomerGroupIds { get; set; } = null;- public string[] CustomerTagIds { get; set; } = null;- public string Email { get; set; } = null;- public string Username { get; set; } = null;- public string FirstName { get; set; } = null;- public string LastName { get; set; } = null;- public string Company { get; set; } = null;- public string Phone { get; set; } = null;- public string ZipPostalCode { get; set; } = null;- public bool LoadOnlyWithShoppingCart { get; set; } = false;- public ShoppingCartType? Sct { get; set; } = null;- public int PageIndex { get; set; } = 0;- public int PageSize { get; set; } = int.MaxValue;- public Expression<Func<Customer, object>> OrderBySelector { get; set; } = null;- }-}+ public DateTime? CreatedToUtc { get; set; } = null;+ public string AffiliateId { get; set; } = "";+ public string VendorId { get; set; } = "";+ public string StoreId { get; set; } = "";+ public string OwnerId { get; set; } = "";+ public string SalesEmployeeId { get; set; } = "";+ public string[] CustomerGroupIds { get; set; } = null;+ public string[] CustomerTagIds { get; set; } = null;+ public string Email { get; set; } = null;+ public string Username { get; set; } = null;+ public string FirstName { get; set; } = null;+ public string LastName { get; set; } = null;+ public string Company { get; set; } = null;+ public string Phone { get; set; } = null;+ public string ZipPostalCode { get; set; } = null;+ public bool LoadOnlyWithShoppingCart { get; set; } = false;+ public ShoppingCartType? Sct { get; set; } = null;+ public int PageIndex { get; set; } = 0;+ public int PageSize { get; set; } = int.MaxValue;+ public Expression<Func<Customer, object>> OrderBySelector { get; set; } = null;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Customers/GetGroupBySystemNameQuery.cs b/src/Business/Grand.Business.Core/Queries/Customers/GetGroupBySystemNameQuery.csindex c0610996b..0e3e868d5 100644--- a/src/Business/Grand.Business.Core/Queries/Customers/GetGroupBySystemNameQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Customers/GetGroupBySystemNameQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Queries.Customers+namespace Grand.Business.Core.Queries.Customers;++public class GetGroupBySystemNameQuery : IRequest<CustomerGroup>{- public class GetGroupBySystemNameQuery : IRequest<CustomerGroup>- {- public string SystemName { get; set; } = "";- }-}+ public string SystemName { get; set; } = "";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Customers/GetPasswordIsExpiredQuery.cs b/src/Business/Grand.Business.Core/Queries/Customers/GetPasswordIsExpiredQuery.csindex 13a5fbc12..2ca4e80ce 100644--- a/src/Business/Grand.Business.Core/Queries/Customers/GetPasswordIsExpiredQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Customers/GetPasswordIsExpiredQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Queries.Customers+namespace Grand.Business.Core.Queries.Customers;++public class GetPasswordIsExpiredQuery : IRequest<bool>{- public class GetPasswordIsExpiredQuery : IRequest<bool>- {- public Customer Customer { get; set; }- }-}+ public Customer Customer { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Messages/GetBidsByProductIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Messages/GetBidsByProductIdQuery.csindex b5a4a7ca0..6dd93c09f 100644--- a/src/Business/Grand.Business.Core/Queries/Messages/GetBidsByProductIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Messages/GetBidsByProductIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Messages+namespace Grand.Business.Core.Queries.Messages;++public class GetBidsByProductIdQuery : IRequest<IList<Bid>>{- public class GetBidsByProductIdQuery : IRequest<IList<Bid>>- {- public string ProductId { get; set; }- }-}+ public string ProductId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Messages/GetCustomerByIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Messages/GetCustomerByIdQuery.csindex dfc20a98d..03ca4c73a 100644--- a/src/Business/Grand.Business.Core/Queries/Messages/GetCustomerByIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Messages/GetCustomerByIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Customers;using MediatR;-namespace Grand.Business.Core.Queries.Messages+namespace Grand.Business.Core.Queries.Messages;++public class GetCustomerByIdQuery : IRequest<Customer>{- public class GetCustomerByIdQuery : IRequest<Customer>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Messages/GetProductByIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Messages/GetProductByIdQuery.csindex 11e3493bb..eb68f8435 100644--- a/src/Business/Grand.Business.Core/Queries/Messages/GetProductByIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Messages/GetProductByIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Catalog;using MediatR;-namespace Grand.Business.Core.Queries.Messages+namespace Grand.Business.Core.Queries.Messages;++public class GetProductByIdQuery : IRequest<Product>{- public class GetProductByIdQuery : IRequest<Product>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Queries/Messages/GetVendorByIdQuery.cs b/src/Business/Grand.Business.Core/Queries/Messages/GetVendorByIdQuery.csindex bef8e706d..38b7be19f 100644--- a/src/Business/Grand.Business.Core/Queries/Messages/GetVendorByIdQuery.cs+++ b/src/Business/Grand.Business.Core/Queries/Messages/GetVendorByIdQuery.cs@@ -1,10 +1,9 @@using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Queries.Messages+namespace Grand.Business.Core.Queries.Messages;++public class GetVendorByIdQuery : IRequest<Vendor>{- public class GetVendorByIdQuery : IRequest<Vendor>- {- public string Id { get; set; }- }-}+ public string Id { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Authentication/ExternalAuthParam.cs b/src/Business/Grand.Business.Core/Utilities/Authentication/ExternalAuthParam.csindex 51241bc1e..135eb8c63 100644--- a/src/Business/Grand.Business.Core/Utilities/Authentication/ExternalAuthParam.cs+++ b/src/Business/Grand.Business.Core/Utilities/Authentication/ExternalAuthParam.cs@@ -1,41 +1,39 @@using System.Security.Claims;-namespace Grand.Business.Core.Utilities.Authentication+namespace Grand.Business.Core.Utilities.Authentication;++/// <summary>+/// External auth param+/// </summary>+public class ExternalAuthParam{/// <summary>- /// External auth param+ /// Gets or sets the external authentication provider's system name/// </summary>- public class ExternalAuthParam- {- /// <summary>- /// Gets or sets the external authentication provider's system name- /// </summary>- public string ProviderSystemName { get; set; }-- /// <summary>- /// Gets or sets user id- /// </summary>- public string Identifier { get; set; }+ public string ProviderSystemName { get; set; }- /// <summary>- /// Gets or sets user name- /// </summary>- public string Name { get; set; }+ /// <summary>+ /// Gets or sets user id+ /// </summary>+ public string Identifier { get; set; }- /// <summary>- /// Gets or sets access token- /// </summary>- public string AccessToken { get; set; }+ /// <summary>+ /// Gets or sets user name+ /// </summary>+ public string Name { get; set; }- /// <summary>- /// Gets or sets user email- /// </summary>- public string Email { get; set; }+ /// <summary>+ /// Gets or sets access token+ /// </summary>+ public string AccessToken { get; set; }- /// <summary>- /// Gets or sets the additional user info as a list of a custom claims- /// </summary>- public IList<Claim> Claims { get; set; } = new List<Claim>();- }+ /// <summary>+ /// Gets or sets user email+ /// </summary>+ public string Email { get; set; }+ /// <summary>+ /// Gets or sets the additional user info as a list of a custom claims+ /// </summary>+ public IList<Claim> Claims { get; set; } = new List<Claim>();}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Authentication/GrandCookieAuthenticationDefaults.cs b/src/Business/Grand.Business.Core/Utilities/Authentication/GrandCookieAuthenticationDefaults.csindex a7be6aa6b..acb19c709 100644--- a/src/Business/Grand.Business.Core/Utilities/Authentication/GrandCookieAuthenticationDefaults.cs+++ b/src/Business/Grand.Business.Core/Utilities/Authentication/GrandCookieAuthenticationDefaults.cs@@ -1,27 +1,26 @@using Microsoft.AspNetCore.Http;-namespace Grand.Business.Core.Utilities.Authentication+namespace Grand.Business.Core.Utilities.Authentication;++public static class GrandCookieAuthenticationDefaults{- public static class GrandCookieAuthenticationDefaults- {- /// <summary>- /// The default value used for authentication scheme- /// </summary>- public const string AuthenticationScheme = "Authentication";+ /// <summary>+ /// The default value used for authentication scheme+ /// </summary>+ public const string AuthenticationScheme = "Authentication";++ /// <summary>+ /// The default value used for external authentication scheme+ /// </summary>+ public const string ExternalAuthenticationScheme = "ExternalAuthentication";- /// <summary>- /// The default value used for external authentication scheme- /// </summary>- public const string ExternalAuthenticationScheme = "ExternalAuthentication";-- /// <summary>- /// The default value for the login path- /// </summary>- public static readonly PathString LoginPath = new PathString("/login");+ /// <summary>+ /// The default value for the login path+ /// </summary>+ public static readonly PathString LoginPath = new("/login");- /// <summary>- /// The default value for the access denied path- /// </summary>- public static readonly PathString AccessDeniedPath = new PathString("/access-denied");- }-}+ /// <summary>+ /// The default value for the access denied path+ /// </summary>+ public static readonly PathString AccessDeniedPath = new("/access-denied");+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Authentication/TwoFactorCodeSetup.cs b/src/Business/Grand.Business.Core/Utilities/Authentication/TwoFactorCodeSetup.csindex 945ca3e33..e46548c8e 100644--- a/src/Business/Grand.Business.Core/Utilities/Authentication/TwoFactorCodeSetup.cs+++ b/src/Business/Grand.Business.Core/Utilities/Authentication/TwoFactorCodeSetup.cs@@ -1,7 +1,6 @@-namespace Grand.Business.Core.Utilities.Authentication+namespace Grand.Business.Core.Utilities.Authentication;++public class TwoFactorCodeSetup{- public class TwoFactorCodeSetup- {- public IDictionary<string, string> CustomValues { get; set; } = new Dictionary<string, string>();- }-}+ public IDictionary<string, string> CustomValues { get; set; } = new Dictionary<string, string>();+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/ApplyDiscount.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/ApplyDiscount.csindex 01caf1c7a..e13359ce3 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/ApplyDiscount.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/ApplyDiscount.cs@@ -1,24 +1,23 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Applied discount+/// </summary>+public class ApplyDiscount{/// <summary>- /// Applied discount+ /// Gets or sets the discount Id/// </summary>- public class ApplyDiscount- {- /// <summary>- /// Gets or sets the discount Id- /// </summary>- public string DiscountId { get; set; }+ public string DiscountId { get; set; }- /// <summary>- /// Gets or sets the discount- /// </summary>- public string CouponCode { get; set; }+ /// <summary>+ /// Gets or sets the discount+ /// </summary>+ public string CouponCode { get; set; }- /// <summary>- /// Gets or sets is discount is cumulative- /// </summary>- public bool IsCumulative { get; set; }- }-}+ /// <summary>+ /// Gets or sets is discount is cumulative+ /// </summary>+ public bool IsCumulative { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationRequest.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationRequest.csindex 5e836a764..7ed6cbb62 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationRequest.cs@@ -2,31 +2,30 @@using Grand.Domain.Discounts;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Represents a discount requirement validation request+/// </summary>+public class DiscountRuleValidationRequest{/// <summary>- /// Represents a discount requirement validation request+ /// Gets or sets the discount/// </summary>- public class DiscountRuleValidationRequest- {- /// <summary>- /// Gets or sets the discount- /// </summary>- public Discount Discount { get; set; }+ public Discount Discount { get; set; }- /// <summary>- /// Gets or sets the discount rule- /// </summary>- public DiscountRule DiscountRule { get; set; }+ /// <summary>+ /// Gets or sets the discount rule+ /// </summary>+ public DiscountRule DiscountRule { get; set; }- /// <summary>- /// Gets or sets the customer- /// </summary>- public Customer Customer { get; set; }+ /// <summary>+ /// Gets or sets the customer+ /// </summary>+ public Customer Customer { get; set; }- /// <summary>- /// Gets or sets the store- /// </summary>- public Store Store { get; set; }- }-}+ /// <summary>+ /// Gets or sets the store+ /// </summary>+ public Store Store { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationResult.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationResult.csindex cac8a893a..16f825b88 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountRuleValidationResult.cs@@ -1,18 +1,18 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Represents a result of discount requirement validation+/// </summary>+public class DiscountRuleValidationResult{/// <summary>- /// Represents a result of discount requirement validation+ /// Gets or sets a value that indicates if discount is valid or not/// </summary>- public class DiscountRuleValidationResult- {- /// <summary>- /// Gets or sets a value that indicates if discount is valid or not- /// </summary>- public bool IsValid { get; set; }+ public bool IsValid { get; set; }- /// <summary>- /// Gets or sets an error for a customer that should be visible when a coupon code is entered (in case if "IsValid" is set to "false")- /// </summary>- public string UserError { get; set; }- }-}+ /// <summary>+ /// Gets or sets an error for a customer that should be visible when a coupon code is entered (in case if "IsValid" is+ /// set to "false")+ /// </summary>+ public string UserError { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountValidationResult.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountValidationResult.csindex f68b93551..67ce4b2d8 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountValidationResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/DiscountValidationResult.cs@@ -1,24 +1,23 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Represents a result of discount validation+/// </summary>+public class DiscountValidationResult{/// <summary>- /// Represents a result of discount validation+ /// Gets or sets a value that indicates if discount is valid/// </summary>- public class DiscountValidationResult- {- /// <summary>- /// Gets or sets a value that indicates if discount is valid- /// </summary>- public bool IsValid { get; set; }+ public bool IsValid { get; set; }- /// <summary>- /// Gets or sets an error for a customer that should be visible when a coupon code is entered (in case if "IsValid" is set to "false")- /// </summary>- public string UserErrorResource { get; set; }+ /// <summary>+ /// Gets or sets an error for a customer that should be visible when a coupon code is entered (in case if "IsValid" is+ /// set to "false")+ /// </summary>+ public string UserErrorResource { get; set; }- /// <summary>- /// Gets or sets a coupon code value- /// </summary>- public string CouponCode { get; set; }- }--}+ /// <summary>+ /// Gets or sets a coupon code value+ /// </summary>+ public string CouponCode { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCategory.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCategory.csindex 77b4b0716..55ebf83b6 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCategory.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCategory.cs@@ -1,9 +1,8 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++public class ProductsCategory : ProductCategory{- public class ProductsCategory : ProductCategory- {- public string ProductId { get; set; }- }-}+ public string ProductId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCollection.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCollection.csindex d3bd67b25..1279c99af 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCollection.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/ProductsCollection.cs@@ -1,9 +1,8 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++public class ProductsCollection : ProductCollection{- public class ProductsCollection : ProductCollection- {- public string ProductId { get; set; }- }-}+ public string ProductId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/SearchTermReportLine.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/SearchTermReportLine.csindex c7cab02fa..1424bb642 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/SearchTermReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/SearchTermReportLine.cs@@ -1,18 +1,17 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Search term (for statistics)+/// </summary>+public class SearchTermReportLine{/// <summary>- /// Search term (for statistics)+ /// Gets or sets the keyword/// </summary>- public class SearchTermReportLine- {- /// <summary>- /// Gets or sets the keyword- /// </summary>- public string Keyword { get; set; }+ public string Keyword { get; set; }- /// <summary>- /// Gets or sets search count- /// </summary>- public int Count { get; set; }- }-}+ /// <summary>+ /// Gets or sets search count+ /// </summary>+ public int Count { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxProductPrice.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxProductPrice.csindex 3c006bae9..bf2cfa523 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxProductPrice.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxProductPrice.cs@@ -1,16 +1,15 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++public class TaxProductPrice{- public class TaxProductPrice- {- public double UnitPriceWithoutDiscInclTax { get; set; }- public double UnitPriceWithoutDiscExclTax { get; set; }- public double UnitPriceInclTax { get; set; }- public double UnitPriceExclTax { get; set; }- public int Quantity { get; set; }- public double SubTotalInclTax { get; set; }- public double SubTotalExclTax { get; set; }- public double DiscountAmountInclTax { get; set; }- public double DiscountAmountExclTax { get; set; }- public double TaxRate { get; set; }- }-}+ public double UnitPriceWithoutDiscInclTax { get; set; }+ public double UnitPriceWithoutDiscExclTax { get; set; }+ public double UnitPriceInclTax { get; set; }+ public double UnitPriceExclTax { get; set; }+ public int Quantity { get; set; }+ public double SubTotalInclTax { get; set; }+ public double SubTotalExclTax { get; set; }+ public double DiscountAmountInclTax { get; set; }+ public double DiscountAmountExclTax { get; set; }+ public double TaxRate { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxRequest.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxRequest.csindex 368315522..0a065ffb7 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxRequest.cs@@ -2,36 +2,35 @@ using Grand.Domain.Catalog;using Grand.Domain.Common;using Grand.Domain.Customers;-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Represents a request for tax calculation+/// </summary>+public class TaxRequest{/// <summary>- /// Represents a request for tax calculation+ /// Gets or sets a product/// </summary>- public class TaxRequest- {- /// <summary>- /// Gets or sets a product- /// </summary>- public Product Product { get; set; }+ public Product Product { get; set; }- /// <summary>- /// Gets or sets a customer- /// </summary>- public Customer Customer { get; set; }+ /// <summary>+ /// Gets or sets a customer+ /// </summary>+ public Customer Customer { get; set; }- /// <summary>- /// Gets or sets an address- /// </summary>- public Address Address { get; set; }+ /// <summary>+ /// Gets or sets an address+ /// </summary>+ public Address Address { get; set; }- /// <summary>- /// Gets or sets a tax category identifier- /// </summary>- public string TaxCategoryId { get; set; }+ /// <summary>+ /// Gets or sets a tax category identifier+ /// </summary>+ public string TaxCategoryId { get; set; }- /// <summary>- /// Gets or sets a price- /// </summary>- public double Price { get; set; }- }-}+ /// <summary>+ /// Gets or sets a price+ /// </summary>+ public double Price { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxResult.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxResult.csindex f4968e4ec..1a56ced58 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/TaxResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/TaxResult.cs@@ -1,40 +1,39 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++/// <summary>+/// Represents a result of tax calculation+/// </summary>+public class TaxResult{/// <summary>- /// Represents a result of tax calculation+ /// Ctor/// </summary>- public class TaxResult+ public TaxResult(){- /// <summary>- /// Ctor- /// </summary>- public TaxResult()- {- Errors = new List<string>();- }+ Errors = new List<string>();+ }- /// <summary>- /// Gets or sets a tax rate- /// </summary>- public double TaxRate { get; set; }+ /// <summary>+ /// Gets or sets a tax rate+ /// </summary>+ public double TaxRate { get; set; }- /// <summary>- /// Gets or sets an address- /// </summary>- public IList<string> Errors { get; set; }+ /// <summary>+ /// Gets or sets an address+ /// </summary>+ public IList<string> Errors { get; set; }- /// <summary>- /// Gets a value that indicates if request has been completed successfully- /// </summary>- public bool Success => Errors.Count == 0;+ /// <summary>+ /// Gets a value that indicates if request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- Errors.Add(error);- }+ /// <summary>+ /// Add error+ /// </summary>+ /// <param name="error">Error</param>+ public void AddError(string error)+ {+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/VatRequest.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/VatRequest.csindex 071972d56..62d35760f 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/VatRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/VatRequest.cs@@ -1,9 +1,8 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++public class VatRequest{- public class VatRequest- {- public string CountryCode { get; set; }+ public string CountryCode { get; set; }- public string VatNumber { get; set; }- }-}+ public string VatNumber { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Catalog/VatResponse.cs b/src/Business/Grand.Business.Core/Utilities/Catalog/VatResponse.csindex e77ab8f57..446932639 100644--- a/src/Business/Grand.Business.Core/Utilities/Catalog/VatResponse.cs+++ b/src/Business/Grand.Business.Core/Utilities/Catalog/VatResponse.cs@@ -1,12 +1,11 @@-namespace Grand.Business.Core.Utilities.Catalog+namespace Grand.Business.Core.Utilities.Catalog;++public class VatResponse{- public class VatResponse- {- public string CountryCode { get; set; }- public string VatNumber { get; set; }- public bool Valid { get; set; }- public DateTime RequestDate { get; set; }- public string Name { get; set; }- public string Address { get; set; }- }-}+ public string CountryCode { get; set; }+ public string VatNumber { get; set; }+ public bool Valid { get; set; }+ public DateTime RequestDate { get; set; }+ public string Name { get; set; }+ public string Address { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/AppliedGiftVoucher.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/AppliedGiftVoucher.csindex e151eea55..0682a3352 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/AppliedGiftVoucher.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/AppliedGiftVoucher.cs@@ -1,20 +1,19 @@using Grand.Domain.Orders;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Applied gift voucher+/// </summary>+public class AppliedGiftVoucher{/// <summary>- /// Applied gift voucher+ /// Gets or sets the used value/// </summary>- public class AppliedGiftVoucher- {- /// <summary>- /// Gets or sets the used value- /// </summary>- public double AmountCanBeUsed { get; set; }+ public double AmountCanBeUsed { get; set; }- /// <summary>- /// Gets the gift voucher- /// </summary>- public GiftVoucher GiftVoucher { get; set; }- }-}+ /// <summary>+ /// Gets the gift voucher+ /// </summary>+ public GiftVoucher GiftVoucher { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/CapturePaymentResult.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/CapturePaymentResult.csindex 35bcea698..2dd97b933 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/CapturePaymentResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/CapturePaymentResult.cs@@ -1,58 +1,51 @@using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Capture payment result+/// </summary>+public class CapturePaymentResult{/// <summary>- /// Capture payment result+ /// Ctor+ /// </summary>+ public CapturePaymentResult()+ {+ Errors = new List<string>();+ }++ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;++ /// <summary>+ /// Errors+ /// </summary>+ public IList<string> Errors { get; set; }++ /// <summary>+ /// Gets or sets the capture transaction identifier+ /// </summary>+ public string CaptureTransactionId { get; set; }++ /// <summary>+ /// Gets or sets the capture transaction result+ /// </summary>+ public string CaptureTransactionResult { get; set; }++ /// <summary>+ /// Gets or sets a payment transaction status after processing+ /// </summary>+ public TransactionStatus NewPaymentStatus { get; set; } = TransactionStatus.Pending;++ /// <summary>+ /// Add error/// </summary>- public class CapturePaymentResult+ /// <param name="error">Error</param>+ public void AddError(string error){- private TransactionStatus _newTransactionStatus = TransactionStatus.Pending;-- /// <summary>- /// Ctor- /// </summary>- public CapturePaymentResult()- {- Errors = new List<string>();- }-- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => Errors.Count == 0;-- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- Errors.Add(error);- }-- /// <summary>- /// Errors- /// </summary>- public IList<string> Errors { get; set; }-- /// <summary>- /// Gets or sets the capture transaction identifier- /// </summary>- public string CaptureTransactionId { get; set; }-- /// <summary>- /// Gets or sets the capture transaction result- /// </summary>- public string CaptureTransactionResult { get; set; }-- /// <summary>- /// Gets or sets a payment transaction status after processing- /// </summary>- public TransactionStatus NewPaymentStatus- {- get => _newTransactionStatus;- set => _newTransactionStatus = value;- }+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionRequest.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionRequest.csindex 0cb0c0b64..94310a644 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionRequest.cs@@ -3,92 +3,96 @@ using Grand.Domain.Customers;using Grand.Domain.Directory;using Grand.Domain.Orders;-namespace Grand.Business.Core.Utilities.Checkout-{- /// <summary>- /// Represents a request for getting shipping rate options- /// </summary>- public class GetShippingOptionRequest- {- #region Ctor+namespace Grand.Business.Core.Utilities.Checkout;- #endregion-- #region Properties+/// <summary>+/// Represents a request for getting shipping rate options+/// </summary>+public class GetShippingOptionRequest+{+ #region Nested classes+ public class PackageItem+ {/// <summary>- /// Gets or sets a customer+ /// Constructor/// </summary>- public virtual Customer Customer { get; set; }+ /// <param name="sci">Shopping cart item</param>+ /// <param name="qty">Override "Quantity" property of shopping cart item</param>+ public PackageItem(ShoppingCartItem sci, int? qty = null)+ {+ ShoppingCartItem = sci;+ OverriddenQuantity = qty;+ }/// <summary>- /// Gets or sets a shopping cart items+ /// Shopping cart item/// </summary>- public IList<PackageItem> Items { get; set; } = new List<PackageItem>();+ public ShoppingCartItem ShoppingCartItem { get; set; }/// <summary>- /// Gets or sets a shipping address (where we ship to)- /// </summary>- public Address ShippingAddress { get; set; }-- /// <summary>- /// Shipped from country- /// </summary>- public Country CountryFrom { get; set; }- /// <summary>- /// Shipped from state/province- /// </summary>- public StateProvince StateProvinceFrom { get; set; }- /// <summary>- /// Shipped from zip/postal code- /// </summary>- public string ZipPostalCodeFrom { get; set; }- /// <summary>- /// Shipped from city+ /// If specified, override "Quantity" property of "ShoppingCartItem/// </summary>- public string CityFrom { get; set; }- /// <summary>- /// Shipped from address- /// </summary>- public string AddressFrom { get; set; }+ public int? OverriddenQuantity { get; set; }- /// <summary>- /// Limit to store (identifier)- /// </summary>- public string StoreId { get; set; }+ public int GetQuantity()+ {+ return OverriddenQuantity ?? ShoppingCartItem.Quantity;+ }+ }- #endregion+ #endregion- #region Nested classes+ #region Ctor- public class PackageItem- {- /// <summary>- /// Constructor- /// </summary>- /// <param name="sci">Shopping cart item</param>- /// <param name="qty">Override "Quantity" property of shopping cart item</param>- public PackageItem(ShoppingCartItem sci, int? qty = null)- {- this.ShoppingCartItem = sci;- this.OverriddenQuantity = qty;- }-- /// <summary>- /// Shopping cart item- /// </summary>- public ShoppingCartItem ShoppingCartItem { get; set; }- /// <summary>- /// If specified, override "Quantity" property of "ShoppingCartItem- /// </summary>- public int? OverriddenQuantity { get; set; }-- public int GetQuantity()- {- return OverriddenQuantity ?? ShoppingCartItem.Quantity;- }- }+ #endregion- #endregion- }-}+ #region Properties++ /// <summary>+ /// Gets or sets a customer+ /// </summary>+ public virtual Customer Customer { get; set; }++ /// <summary>+ /// Gets or sets a shopping cart items+ /// </summary>+ public IList<PackageItem> Items { get; set; } = new List<PackageItem>();++ /// <summary>+ /// Gets or sets a shipping address (where we ship to)+ /// </summary>+ public Address ShippingAddress { get; set; }++ /// <summary>+ /// Shipped from country+ /// </summary>+ public Country CountryFrom { get; set; }++ /// <summary>+ /// Shipped from state/province+ /// </summary>+ public StateProvince StateProvinceFrom { get; set; }++ /// <summary>+ /// Shipped from zip/postal code+ /// </summary>+ public string ZipPostalCodeFrom { get; set; }++ /// <summary>+ /// Shipped from city+ /// </summary>+ public string CityFrom { get; set; }++ /// <summary>+ /// Shipped from address+ /// </summary>+ public string AddressFrom { get; set; }++ /// <summary>+ /// Limit to store (identifier)+ /// </summary>+ public string StoreId { get; set; }++ #endregion+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionResponse.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionResponse.csindex 231974abe..bede3d8ba 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionResponse.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/GetShippingOptionResponse.cs@@ -1,43 +1,42 @@using Grand.Domain.Shipping;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Represents a response of getting shipping rate options+/// </summary>+public class GetShippingOptionResponse{/// <summary>- /// Represents a response of getting shipping rate options+ /// Ctor/// </summary>- public class GetShippingOptionResponse+ public GetShippingOptionResponse(){- /// <summary>- /// Ctor- /// </summary>- public GetShippingOptionResponse()- {- Errors = new List<string>();- ShippingOptions = new List<ShippingOption>();- }+ Errors = new List<string>();+ ShippingOptions = new List<ShippingOption>();+ }- /// <summary>- /// Gets or sets a list of shipping options- /// </summary>- public IList<ShippingOption> ShippingOptions { get; set; }+ /// <summary>+ /// Gets or sets a list of shipping options+ /// </summary>+ public IList<ShippingOption> ShippingOptions { get; set; }- /// <summary>- /// Gets or sets an address- /// </summary>- public IList<string> Errors { get; set; }+ /// <summary>+ /// Gets or sets an address+ /// </summary>+ public IList<string> Errors { get; set; }- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => Errors.Count == 0;+ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- Errors.Add(error);- }+ /// <summary>+ /// Add error+ /// </summary>+ /// <param name="error">Error</param>+ public void AddError(string error)+ {+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderContainer.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderContainer.csindex 0028d8430..660ae28fd 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderContainer.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderContainer.cs@@ -8,48 +8,46 @@ using Grand.Domain.Orders;using Grand.Domain.Shipping;using Grand.Domain.Tax;-namespace Grand.Business.Core.Utilities.Checkout-{- public class PlaceOrderContainer- {- public Customer Customer { get; set; }- public Language Language { get; set; }- public Currency Currency { get; set; }- public string AffiliateId { get; set; }- public TaxDisplayType TaxDisplayType { get; set; }- public double CurrencyRate { get; set; }- public string PrimaryCurrencyCode { get; set; }- public string PaymentMethodSystemName { get; set; }- public Address BillingAddress { get; set; }- public Address ShippingAddress { get; set; }- public ShippingStatus ShippingStatus { get; set; }- public string ShippingMethodName { get; set; }- public string ShippingRateProviderSystemName { get; set; }- public bool PickUpInStore { get; set; }- public PickupPoint PickupPoint { get; set; }- public string CheckoutAttributeDescription { get; set; }- public IList<CustomAttribute> CheckoutAttributes { get; set; } = new List<CustomAttribute>();- public IList<ShoppingCartItem> Cart { get; set; } = new List<ShoppingCartItem>();- public IList<OrderTax> Taxes { get; set; } = new List<OrderTax>();- public List<ApplyDiscount> AppliedDiscounts { get; set; } = new();- public List<AppliedGiftVoucher> AppliedGiftVouchers { get; set; } = new();- public bool IsRecurring { get; set; }- public int RecurringCycleLength { get; set; }- public RecurringCyclePeriod RecurringCyclePeriodId { get; set; }- public int RecurringTotalCycles { get; set; }- public double OrderSubTotalInclTax { get; set; }- public double OrderSubTotalExclTax { get; set; }- public double OrderSubTotalDiscountInclTax { get; set; }- public double OrderSubTotalDiscountExclTax { get; set; }- public double OrderShippingTotalInclTax { get; set; }- public double OrderShippingTotalExclTax { get; set; }- public double PaymentAdditionalFeeInclTax { get; set; }- public double PaymentAdditionalFeeExclTax { get; set; }- public double OrderTaxTotal { get; set; }- public double OrderDiscountAmount { get; set; }- public int RedeemedLoyaltyPoints { get; set; }- public double RedeemedLoyaltyPointsAmount { get; set; }- public double OrderTotal { get; set; }- }+namespace Grand.Business.Core.Utilities.Checkout;-}+public class PlaceOrderContainer+{+ public Customer Customer { get; set; }+ public Language Language { get; set; }+ public Currency Currency { get; set; }+ public string AffiliateId { get; set; }+ public TaxDisplayType TaxDisplayType { get; set; }+ public double CurrencyRate { get; set; }+ public string PrimaryCurrencyCode { get; set; }+ public string PaymentMethodSystemName { get; set; }+ public Address BillingAddress { get; set; }+ public Address ShippingAddress { get; set; }+ public ShippingStatus ShippingStatus { get; set; }+ public string ShippingMethodName { get; set; }+ public string ShippingRateProviderSystemName { get; set; }+ public bool PickUpInStore { get; set; }+ public PickupPoint PickupPoint { get; set; }+ public string CheckoutAttributeDescription { get; set; }+ public IList<CustomAttribute> CheckoutAttributes { get; set; } = new List<CustomAttribute>();+ public IList<ShoppingCartItem> Cart { get; set; } = new List<ShoppingCartItem>();+ public IList<OrderTax> Taxes { get; set; } = new List<OrderTax>();+ public List<ApplyDiscount> AppliedDiscounts { get; set; } = new();+ public List<AppliedGiftVoucher> AppliedGiftVouchers { get; set; } = new();+ public bool IsRecurring { get; set; }+ public int RecurringCycleLength { get; set; }+ public RecurringCyclePeriod RecurringCyclePeriodId { get; set; }+ public int RecurringTotalCycles { get; set; }+ public double OrderSubTotalInclTax { get; set; }+ public double OrderSubTotalExclTax { get; set; }+ public double OrderSubTotalDiscountInclTax { get; set; }+ public double OrderSubTotalDiscountExclTax { get; set; }+ public double OrderShippingTotalInclTax { get; set; }+ public double OrderShippingTotalExclTax { get; set; }+ public double PaymentAdditionalFeeInclTax { get; set; }+ public double PaymentAdditionalFeeExclTax { get; set; }+ public double OrderTaxTotal { get; set; }+ public double OrderDiscountAmount { get; set; }+ public int RedeemedLoyaltyPoints { get; set; }+ public double RedeemedLoyaltyPointsAmount { get; set; }+ public double OrderTotal { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderResult.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderResult.csindex b850e8894..cd98ea0db 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/PlaceOrderResult.cs@@ -1,48 +1,47 @@using Grand.Domain.Orders;using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Place order result+/// </summary>+public class PlaceOrderResult{/// <summary>- /// Place order result+ /// Ctor/// </summary>- public class PlaceOrderResult+ public PlaceOrderResult(){- /// <summary>- /// Ctor- /// </summary>- public PlaceOrderResult()- {- Errors = new List<string>();- }+ Errors = new List<string>();+ }- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => Errors.Count == 0;+ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;++ /// <summary>+ /// Errors+ /// </summary>+ public IList<string> Errors { get; set; }- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- Errors.Add(error);- }+ /// <summary>+ /// Gets or sets the placed order+ /// </summary>+ public Order PlacedOrder { get; set; }- /// <summary>- /// Errors- /// </summary>- public IList<string> Errors { get; set; }-- /// <summary>- /// Gets or sets the placed order- /// </summary>- public Order PlacedOrder { get; set; }+ /// <summary>+ /// Gets or sets the payment transaction+ /// </summary>+ public PaymentTransaction PaymentTransaction { get; set; }- /// <summary>- /// Gets or sets the payment transaction- /// </summary>- public PaymentTransaction PaymentTransaction { get; set; }+ /// <summary>+ /// Add error+ /// </summary>+ /// <param name="error">Error</param>+ public void AddError(string error)+ {+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/ProcessPaymentResult.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/ProcessPaymentResult.csindex fb7bc226e..9875f37e6 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/ProcessPaymentResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/ProcessPaymentResult.cs@@ -1,54 +1,47 @@using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Process payment result+/// </summary>+public class ProcessPaymentResult{/// <summary>- /// Process payment result+ /// Ctor+ /// </summary>+ public ProcessPaymentResult()+ {+ Errors = new List<string>();+ }++ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;++ /// <summary>+ /// Errors+ /// </summary>+ public IList<string> Errors { get; set; }+++ /// <summary>+ /// Gets or sets a payment transaction status after processing+ /// </summary>+ public TransactionStatus NewPaymentTransactionStatus { get; set; } = TransactionStatus.Pending;++ /// <summary>+ /// Gets or sets value paid amount+ /// </summary>+ public double PaidAmount { get; set; }++ /// <summary>+ /// Add error/// </summary>- public class ProcessPaymentResult+ /// <param name="error">Error</param>+ public void AddError(string error){- private TransactionStatus _newPaymentTransactionStatus = TransactionStatus.Pending;-- /// <summary>- /// Ctor- /// </summary>- public ProcessPaymentResult()- {- this.Errors = new List<string>();- }-- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => this.Errors.Count == 0;-- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- this.Errors.Add(error);- }-- /// <summary>- /// Errors- /// </summary>- public IList<string> Errors { get; set; }--- /// <summary>- /// Gets or sets a payment transaction status after processing- /// </summary>- public TransactionStatus NewPaymentTransactionStatus- {- get => _newPaymentTransactionStatus;- set => _newPaymentTransactionStatus = value;- }-- /// <summary>- /// Gets or sets value paid amount- /// </summary>- public double PaidAmount { get; set; }+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentRequest.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentRequest.csindex 00821d017..1289c6a12 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentRequest.cs@@ -1,25 +1,24 @@using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Represents a RefundPaymentResult+/// </summary>+public class RefundPaymentRequest{/// <summary>- /// Represents a RefundPaymentResult+ /// Gets or sets an payment transaction/// </summary>- public class RefundPaymentRequest- {- /// <summary>- /// Gets or sets an payment transaction- /// </summary>- public PaymentTransaction PaymentTransaction { get; set; }+ public PaymentTransaction PaymentTransaction { get; set; }- /// <summary>- /// Gets or sets an amount- /// </summary>- public double AmountToRefund { get; set; }+ /// <summary>+ /// Gets or sets an amount+ /// </summary>+ public double AmountToRefund { get; set; }- /// <summary>- /// Gets or sets a value indicating whether it's a partial refund; otherwise, full refund- /// </summary>- public bool IsPartialRefund { get; set; }- }-}+ /// <summary>+ /// Gets or sets a value indicating whether it's a partial refund; otherwise, full refund+ /// </summary>+ public bool IsPartialRefund { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentResult.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentResult.csindex 35cd5e525..c7cfe8f3a 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/RefundPaymentResult.cs@@ -1,48 +1,41 @@using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Refund payment result+/// </summary>+public class RefundPaymentResult{/// <summary>- /// Refund payment result+ /// Ctor/// </summary>- public class RefundPaymentResult+ public RefundPaymentResult(){- private TransactionStatus _newTransactionStatus = TransactionStatus.Pending;-- /// <summary>- /// Ctor- /// </summary>- public RefundPaymentResult()- {- this.Errors = new List<string>();- }+ Errors = new List<string>();+ }- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => this.Errors.Count == 0;+ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- this.Errors.Add(error);- }+ /// <summary>+ /// Errors+ /// </summary>+ public IList<string> Errors { get; set; }- /// <summary>- /// Errors- /// </summary>- public IList<string> Errors { get; set; }+ /// <summary>+ /// Gets or sets a transaction status after processing+ /// </summary>+ public TransactionStatus NewTransactionStatus { get; set; } = TransactionStatus.Pending;- /// <summary>- /// Gets or sets a transaction status after processing- /// </summary>- public TransactionStatus NewTransactionStatus- {- get => _newTransactionStatus;- set => _newTransactionStatus = value;- }+ /// <summary>+ /// Add error+ /// </summary>+ /// <param name="error">Error</param>+ public void AddError(string error)+ {+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/ShoppingCartValidatorOptions.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/ShoppingCartValidatorOptions.csindex 23b55984d..3aa6dda1c 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/ShoppingCartValidatorOptions.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/ShoppingCartValidatorOptions.cs@@ -1,12 +1,11 @@-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++public class ShoppingCartValidatorOptions{- public class ShoppingCartValidatorOptions- {- public bool GetStandardWarnings = true;- public bool GetAttributesWarnings = true;- public bool GetInventoryWarnings = true;- public bool GetGiftVoucherWarnings = true;- public bool GetRequiredProductWarnings = true;- public bool GetReservationWarnings = true;- }-}+ public bool GetAttributesWarnings = true;+ public bool GetGiftVoucherWarnings = true;+ public bool GetInventoryWarnings = true;+ public bool GetRequiredProductWarnings = true;+ public bool GetReservationWarnings = true;+ public bool GetStandardWarnings = true;+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Checkout/VoidPaymentResult.cs b/src/Business/Grand.Business.Core/Utilities/Checkout/VoidPaymentResult.csindex a204aaef0..7340186c6 100644--- a/src/Business/Grand.Business.Core/Utilities/Checkout/VoidPaymentResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Checkout/VoidPaymentResult.cs@@ -1,48 +1,41 @@using Grand.Domain.Payments;-namespace Grand.Business.Core.Utilities.Checkout+namespace Grand.Business.Core.Utilities.Checkout;++/// <summary>+/// Represents a VoidPaymentResult+/// </summary>+public class VoidPaymentResult{/// <summary>- /// Represents a VoidPaymentResult+ /// Ctor/// </summary>- public class VoidPaymentResult+ public VoidPaymentResult(){- private TransactionStatus _newTransactionStatus = TransactionStatus.Pending;-- /// <summary>- /// Ctor- /// </summary>- public VoidPaymentResult()- {- Errors = new List<string>();- }+ Errors = new List<string>();+ }- /// <summary>- /// Gets a value indicating whether request has been completed successfully- /// </summary>- public bool Success => Errors.Count == 0;+ /// <summary>+ /// Gets a value indicating whether request has been completed successfully+ /// </summary>+ public bool Success => Errors.Count == 0;- /// <summary>- /// Add error- /// </summary>- /// <param name="error">Error</param>- public void AddError(string error)- {- Errors.Add(error);- }+ /// <summary>+ /// Errors+ /// </summary>+ public IList<string> Errors { get; set; }- /// <summary>- /// Errors- /// </summary>- public IList<string> Errors { get; set; }+ /// <summary>+ /// Gets or sets a payment transaction status after processing+ /// </summary>+ public TransactionStatus NewTransactionStatus { get; set; } = TransactionStatus.Pending;- /// <summary>- /// Gets or sets a payment transaction status after processing- /// </summary>- public TransactionStatus NewTransactionStatus- {- get => _newTransactionStatus;- set => _newTransactionStatus = value;- }+ /// <summary>+ /// Add error+ /// </summary>+ /// <param name="error">Error</param>+ public void AddError(string error)+ {+ Errors.Add(error);}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionActionName.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionActionName.csindex f5e633e28..12eeeab14 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionActionName.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionActionName.cs@@ -1,30 +1,29 @@-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static class PermissionActionName{- public static class PermissionActionName- {- public const string List = "List";- public const string Preview = "Preview";- public const string Create = "Create";- public const string Edit = "Edit";- public const string Delete = "Delete";- public const string Export = "Export";- public const string Import = "Import";- public const string Payments = "Payments";- public const string Cancel = "Cancel";+ public const string List = "List";+ public const string Preview = "Preview";+ public const string Create = "Create";+ public const string Edit = "Edit";+ public const string Delete = "Delete";+ public const string Export = "Export";+ public const string Import = "Import";+ public const string Payments = "Payments";+ public const string Cancel = "Cancel";- public const string Weights_List = "WeightsList";- public const string Weights_Add = "WeightsAdd";- public const string Weights_Edit = "WeightsEdit";- public const string Weights_Delete = "WeightsDelete";+ public const string Weights_List = "WeightsList";+ public const string Weights_Add = "WeightsAdd";+ public const string Weights_Edit = "WeightsEdit";+ public const string Weights_Delete = "WeightsDelete";- public const string Dimensions_List = "DimensionsList";- public const string Dimensions_Add = "DimensionsAdd";- public const string Dimensions_Edit = "DimensionsEdit";- public const string Dimensions_Delete = "DimensionsDelete";+ public const string Dimensions_List = "DimensionsList";+ public const string Dimensions_Add = "DimensionsAdd";+ public const string Dimensions_Edit = "DimensionsEdit";+ public const string Dimensions_Delete = "DimensionsDelete";- public const string Units_List = "UnitsList";- public const string Units_Add = "UnitsAdd";- public const string Units_Edit = "UnitsEdit";- public const string Units_Delete = "UnitsDelete";- }-}+ public const string Units_List = "UnitsList";+ public const string Units_Add = "UnitsAdd";+ public const string Units_Edit = "UnitsEdit";+ public const string Units_Delete = "UnitsDelete";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionSystemName.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionSystemName.csindex bf14d95cc..066186d96 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionSystemName.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/PermissionSystemName.cs@@ -1,79 +1,79 @@-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static class PermissionSystemName{- public static class PermissionSystemName- {- public const string AccessAdminPanel = "AccessAdminPanel";- public const string AccessVendorPanel = "AccessVendorPanel";- public const string AllowCustomerImpersonation = "AllowCustomerImpersonation";- public const string Products = "ManageProducts";- public const string Categories = "ManageCategories";- public const string Brands = "ManageBrands";- public const string ProductReviews = "ManageProductReviews";- public const string Collections = "ManageCollections";- public const string ProductTags = "ManageProductTags";- public const string ProductAttributes = "ManageProductAttributes";- public const string SpecificationAttributes = "ManageSpecificationAttributes";- public const string CheckoutAttributes = "ManageCheckoutAttributes";- public const string ContactAttributes = "ManageContactAttributes";- public const string Customers = "ManageCustomers";- public const string CustomerAttributes = "ManageCustomerAttributes";- public const string AddressAttributes = "ManageAddressAttributes";- public const string CustomerTags = "ManageCustomerTags";- public const string Documents = "ManageDocuments";- public const string Reports = "ManageReports";- public const string CustomerGroups = "ManageCustomerGroups";- public const string SalesEmployees = "ManageSalesEmployees";- public const string Vendors = "ManageVendors";- public const string VendorReviews = "ManageVendorReviews";- public const string CurrentCarts = "ManageCurrentCarts";- public const string Orders = "ManageOrders";- public const string OrderTags = "ManageOrderTags";- public const string OrderStatus = "ManageOrderStatus";- public const string Shipments = "ManageShipments";- public const string GiftVouchers = "ManageGiftVouchers";- public const string MerchandiseReturns = "ManageMerchandiseReturns";- public const string PaymentTransactions = "PaymentTransactions";- public const string Affiliates = "ManageAffiliates";- public const string PushNotifications = "ManagePushNotifications";- public const string Campaigns = "ManageCampaigns";- public const string Discounts = "ManageDiscounts";- public const string NewsletterSubscribers = "ManageNewsletterSubscribers";- public const string NewsletterCategories = "ManageNewsletterCategories";- public const string News = "ManageNews";- public const string Blog = "ManageBlog";- public const string Widgets = "ManageWidgets";- public const string Pages = "ManagePages";- public const string Knowledgebase = "ManageKnowledgebase";- public const string Courses = "ManageCourses";- public const string MessageTemplates = "ManageMessageTemplates";- public const string Countries = "ManageCountries";- public const string Languages = "ManageLanguages";- public const string Settings = "ManageSettings";- public const string PaymentMethods = "ManagePaymentMethods";- public const string ExternalAuthenticationMethods = "ManageExternalAuthenticationMethods";- public const string TaxSettings = "ManageTaxSettings";- public const string ShippingSettings = "ManageShippingSettings";- public const string Currencies = "ManageCurrencies";- public const string Measures = "ManageMeasures";- public const string Acl = "ManageACL";- public const string EmailAccounts = "ManageEmailAccounts";- public const string Stores = "ManageStores";- public const string Plugins = "ManagePlugins";- public const string MessageQueue = "ManageMessageQueue";- public const string MessageContactForm = "ManageMessageContactForm";- public const string Maintenance = "ManageMaintenance";- public const string System = "ManageSystem";- public const string Files = "ManageFiles";- public const string Pictures = "ManagePictures";- public const string HtmlEditor = "HtmlEditor.ManagePictures";- public const string ScheduleTasks = "ManageScheduleTasks";- public const string AllowUseApi = "AllowUseApi";- //public store permissions- public const string DisplayPrices = "DisplayPrices";- public const string EnableShoppingCart = "EnableShoppingCart";- public const string EnableWishlist = "EnableWishlist";- public const string PublicStoreAllowNavigation = "PublicStoreAllowNavigation";- public const string AccessClosedStore = "AccessClosedStore";+ public const string AccessAdminPanel = "AccessAdminPanel";+ public const string AccessVendorPanel = "AccessVendorPanel";+ public const string AllowCustomerImpersonation = "AllowCustomerImpersonation";+ public const string Products = "ManageProducts";+ public const string Categories = "ManageCategories";+ public const string Brands = "ManageBrands";+ public const string ProductReviews = "ManageProductReviews";+ public const string Collections = "ManageCollections";+ public const string ProductTags = "ManageProductTags";+ public const string ProductAttributes = "ManageProductAttributes";+ public const string SpecificationAttributes = "ManageSpecificationAttributes";+ public const string CheckoutAttributes = "ManageCheckoutAttributes";+ public const string ContactAttributes = "ManageContactAttributes";+ public const string Customers = "ManageCustomers";+ public const string CustomerAttributes = "ManageCustomerAttributes";+ public const string AddressAttributes = "ManageAddressAttributes";+ public const string CustomerTags = "ManageCustomerTags";+ public const string Documents = "ManageDocuments";+ public const string Reports = "ManageReports";+ public const string CustomerGroups = "ManageCustomerGroups";+ public const string SalesEmployees = "ManageSalesEmployees";+ public const string Vendors = "ManageVendors";+ public const string VendorReviews = "ManageVendorReviews";+ public const string CurrentCarts = "ManageCurrentCarts";+ public const string Orders = "ManageOrders";+ public const string OrderTags = "ManageOrderTags";+ public const string OrderStatus = "ManageOrderStatus";+ public const string Shipments = "ManageShipments";+ public const string GiftVouchers = "ManageGiftVouchers";+ public const string MerchandiseReturns = "ManageMerchandiseReturns";+ public const string PaymentTransactions = "PaymentTransactions";+ public const string Affiliates = "ManageAffiliates";+ public const string PushNotifications = "ManagePushNotifications";+ public const string Campaigns = "ManageCampaigns";+ public const string Discounts = "ManageDiscounts";+ public const string NewsletterSubscribers = "ManageNewsletterSubscribers";+ public const string NewsletterCategories = "ManageNewsletterCategories";+ public const string News = "ManageNews";+ public const string Blog = "ManageBlog";+ public const string Widgets = "ManageWidgets";+ public const string Pages = "ManagePages";+ public const string Knowledgebase = "ManageKnowledgebase";+ public const string Courses = "ManageCourses";+ public const string MessageTemplates = "ManageMessageTemplates";+ public const string Countries = "ManageCountries";+ public const string Languages = "ManageLanguages";+ public const string Settings = "ManageSettings";+ public const string PaymentMethods = "ManagePaymentMethods";+ public const string ExternalAuthenticationMethods = "ManageExternalAuthenticationMethods";+ public const string TaxSettings = "ManageTaxSettings";+ public const string ShippingSettings = "ManageShippingSettings";+ public const string Currencies = "ManageCurrencies";+ public const string Measures = "ManageMeasures";+ public const string Acl = "ManageACL";+ public const string EmailAccounts = "ManageEmailAccounts";+ public const string Stores = "ManageStores";+ public const string Plugins = "ManagePlugins";+ public const string MessageQueue = "ManageMessageQueue";+ public const string MessageContactForm = "ManageMessageContactForm";+ public const string Maintenance = "ManageMaintenance";+ public const string System = "ManageSystem";+ public const string Files = "ManageFiles";+ public const string Pictures = "ManagePictures";+ public const string HtmlEditor = "HtmlEditor.ManagePictures";+ public const string ScheduleTasks = "ManageScheduleTasks";++ public const string AllowUseApi = "AllowUseApi";- }-}+ //public store permissions+ public const string DisplayPrices = "DisplayPrices";+ public const string EnableShoppingCart = "EnableShoppingCart";+ public const string EnableWishlist = "EnableWishlist";+ public const string PublicStoreAllowNavigation = "PublicStoreAllowNavigation";+ public const string AccessClosedStore = "AccessClosedStore";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermission.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermission.csindex c29c7d4f6..71933292e 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermission.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermission.cs@@ -1,19 +1,17 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++/// <summary>+/// Standard permissions+/// </summary>+public static partial class StandardPermission{- /// <summary>- /// Standard permissions- /// </summary>- public static partial class StandardPermission- {- //admin area permissions- public static readonly Permission ManageAccessAdminPanel = new Permission- {- Name = "Access admin",- SystemName = PermissionSystemName.AccessAdminPanel,- Area = "Admin area",- Category = "Access Admin"- };- }+ //admin area permissions+ public static readonly Permission ManageAccessAdminPanel = new() {+ Name = "Access admin",+ SystemName = PermissionSystemName.AccessAdminPanel,+ Area = "Admin area",+ Category = "Access Admin"+ };}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCatalog.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCatalog.csindex 6c97da08d..08b46fd11 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCatalog.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCatalog.cs@@ -1,83 +1,111 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryCatalog => "Catalog";+ public static readonly Permission ManageProducts = new() {+ Name = "Manage Products",+ SystemName = PermissionSystemName.Products,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageCategories = new() {+ Name = "Manage Categories",+ SystemName = PermissionSystemName.Categories,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageBrands = new() {+ Name = "Manage Brands",+ SystemName = PermissionSystemName.Brands,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageCollections = new() {+ Name = "Manage Collections",+ SystemName = PermissionSystemName.Collections,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageProductReviews = new() {+ Name = "Manage Product Reviews",+ SystemName = PermissionSystemName.ProductReviews,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview,+ PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageProductTags = new() {+ Name = "Manage Product Tags",+ SystemName = PermissionSystemName.ProductTags,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview,+ PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageProductAttributes = new() {+ Name = "Manage Product Attributes",+ SystemName = PermissionSystemName.ProductAttributes,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageSpecificationAttributes = new() {+ Name = "Manage Specification Attributes",+ SystemName = PermissionSystemName.SpecificationAttributes,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- public static readonly Permission ManageProducts = new Permission- {- Name = "Manage Products",- SystemName = PermissionSystemName.Products,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };- public static readonly Permission ManageCategories = new Permission- {- Name = "Manage Categories",- SystemName = PermissionSystemName.Categories,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };- public static readonly Permission ManageBrands = new Permission- {- Name = "Manage Brands",- SystemName = PermissionSystemName.Brands,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };- public static readonly Permission ManageCollections = new Permission- {- Name = "Manage Collections",- SystemName = PermissionSystemName.Collections,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };- public static readonly Permission ManageProductReviews = new Permission- {- Name = "Manage Product Reviews",- SystemName = PermissionSystemName.ProductReviews,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageProductTags = new Permission- {- Name = "Manage Product Tags",- SystemName = PermissionSystemName.ProductTags,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageProductAttributes = new Permission- {- Name = "Manage Product Attributes",- SystemName = PermissionSystemName.ProductAttributes,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageSpecificationAttributes = new Permission- {- Name = "Manage Specification Attributes",- SystemName = PermissionSystemName.SpecificationAttributes,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageContactAttribute = new Permission- {- Name = "Manage Contact Attribute",- SystemName = PermissionSystemName.ContactAttributes,- Area = "Admin area",- Category = CategoryCatalog,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };+ public static readonly Permission ManageContactAttribute = new() {+ Name = "Manage Contact Attribute",+ SystemName = PermissionSystemName.ContactAttributes,+ Area = "Admin area",+ Category = CategoryCatalog,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- }-}+ private static string CategoryCatalog => "Catalog";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionConfiguration.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionConfiguration.csindex 1fc1845ed..68b631c33 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionConfiguration.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionConfiguration.cs@@ -1,112 +1,128 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryConfiguration => "Configuration";+ public static readonly Permission ManageCountries = new() {+ Name = "Manage Countries",+ SystemName = PermissionSystemName.Countries,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageLanguages = new() {+ Name = "Manage Languages",+ SystemName = PermissionSystemName.Languages,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export,+ PermissionActionName.Import+ }+ };++ public static readonly Permission ManageSettings = new() {+ Name = "Manage Settings",+ SystemName = PermissionSystemName.Settings,+ Area = "Admin area",+ Category = CategoryConfiguration+ };++ public static readonly Permission ManagePaymentMethods = new() {+ Name = "Manage Payment Methods",+ SystemName = PermissionSystemName.PaymentMethods,+ Area = "Admin area",+ Category = CategoryConfiguration+ };++ public static readonly Permission ManageExternalAuthenticationMethods = new() {+ Name = "Manage External Authentication Methods",+ SystemName = PermissionSystemName.ExternalAuthenticationMethods,+ Area = "Admin area",+ Category = CategoryConfiguration+ };++ public static readonly Permission ManageTaxSettings = new() {+ Name = "Manage Tax Settings",+ SystemName = PermissionSystemName.TaxSettings,+ Area = "Admin area",+ Category = CategoryConfiguration+ };++ public static readonly Permission ManageShippingSettings = new() {+ Name = "Manage Shipping Settings",+ SystemName = PermissionSystemName.ShippingSettings,+ Category = CategoryConfiguration+ };++ public static readonly Permission ManageCurrencies = new() {+ Name = "Manage Currencies",+ SystemName = PermissionSystemName.Currencies,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageMeasures = new() {+ Name = "Manage Measures",+ SystemName = PermissionSystemName.Measures,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.Weights_List, PermissionActionName.Weights_Add, PermissionActionName.Weights_Edit,+ PermissionActionName.Weights_Delete,+ PermissionActionName.Units_List, PermissionActionName.Units_Add, PermissionActionName.Units_Edit,+ PermissionActionName.Units_Delete,+ PermissionActionName.Dimensions_List, PermissionActionName.Dimensions_Add,+ PermissionActionName.Dimensions_Edit, PermissionActionName.Dimensions_Delete+ }+ };++ public static readonly Permission ManageAcl = new() {+ Name = "Manage ACL",+ SystemName = PermissionSystemName.Acl,+ Area = "Admin area",+ Category = CategoryConfiguration+ };++ public static readonly Permission ManageEmailAccounts = new() {+ Name = "Manage Email Accounts",+ SystemName = PermissionSystemName.EmailAccounts,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Create,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageStores = new() {+ Name = "Manage Stores",+ SystemName = PermissionSystemName.Stores,+ Area = "Admin area",+ Category = CategoryConfiguration,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Create,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- public static readonly Permission ManageCountries = new()- {- Name = "Manage Countries",- SystemName = PermissionSystemName.Countries,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };+ public static readonly Permission ManagePlugins = new() {+ Name = "Manage Plugins",+ SystemName = PermissionSystemName.Plugins,+ Area = "Admin area",+ Category = CategoryConfiguration+ };- public static readonly Permission ManageLanguages = new()- {- Name = "Manage Languages",- SystemName = PermissionSystemName.Languages,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export, PermissionActionName.Import }- };- public static readonly Permission ManageSettings = new()- {- Name = "Manage Settings",- SystemName = PermissionSystemName.Settings,- Area = "Admin area",- Category = CategoryConfiguration- };- public static readonly Permission ManagePaymentMethods = new()- {- Name = "Manage Payment Methods",- SystemName = PermissionSystemName.PaymentMethods,- Area = "Admin area",- Category = CategoryConfiguration- };- public static readonly Permission ManageExternalAuthenticationMethods = new()- {- Name = "Manage External Authentication Methods",- SystemName = PermissionSystemName.ExternalAuthenticationMethods,- Area = "Admin area",- Category = CategoryConfiguration- };- public static readonly Permission ManageTaxSettings = new()- {- Name = "Manage Tax Settings",- SystemName = PermissionSystemName.TaxSettings,- Area = "Admin area",- Category = CategoryConfiguration- };- public static readonly Permission ManageShippingSettings = new()- {- Name = "Manage Shipping Settings",- SystemName = PermissionSystemName.ShippingSettings,- Category = CategoryConfiguration- };- public static readonly Permission ManageCurrencies = new()- {- Name = "Manage Currencies",- SystemName = PermissionSystemName.Currencies,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageMeasures = new()- {- Name = "Manage Measures",- SystemName = PermissionSystemName.Measures,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> {- PermissionActionName.Weights_List, PermissionActionName.Weights_Add, PermissionActionName.Weights_Edit, PermissionActionName.Weights_Delete,- PermissionActionName.Units_List, PermissionActionName.Units_Add, PermissionActionName.Units_Edit, PermissionActionName.Units_Delete,- PermissionActionName.Dimensions_List, PermissionActionName.Dimensions_Add, PermissionActionName.Dimensions_Edit, PermissionActionName.Dimensions_Delete- }- };- public static readonly Permission ManageAcl = new()- {- Name = "Manage ACL",- SystemName = PermissionSystemName.Acl,- Area = "Admin area",- Category = CategoryConfiguration- };- public static readonly Permission ManageEmailAccounts = new()- {- Name = "Manage Email Accounts",- SystemName = PermissionSystemName.EmailAccounts,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Create, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageStores = new()- {- Name = "Manage Stores",- SystemName = PermissionSystemName.Stores,- Area = "Admin area",- Category = CategoryConfiguration,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Create, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManagePlugins = new()- {- Name = "Manage Plugins",- SystemName = PermissionSystemName.Plugins,- Area = "Admin area",- Category = CategoryConfiguration- };-- }-}+ private static string CategoryConfiguration => "Configuration";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionContent.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionContent.csindex e850ea7e5..191d677aa 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionContent.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionContent.cs@@ -1,67 +1,82 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryContent => "Content";+ public static readonly Permission ManageNews = new() {+ Name = "Manage News",+ SystemName = PermissionSystemName.News,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageBlog = new() {+ Name = "Manage Blog",+ SystemName = PermissionSystemName.Blog,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageWidgets = new() {+ Name = "Manage Widgets",+ SystemName = PermissionSystemName.Widgets,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit }+ };++ public static readonly Permission ManagePages = new() {+ Name = "Manage Pages",+ SystemName = PermissionSystemName.Pages,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageKnowledgebase = new() {+ Name = "Manage Knowledgebase",+ SystemName = PermissionSystemName.Knowledgebase,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCourses = new() {+ Name = "Manage Courses",+ SystemName = PermissionSystemName.Courses,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- public static readonly Permission ManageNews = new()- {- Name = "Manage News",- SystemName = PermissionSystemName.News,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageBlog = new()- {- Name = "Manage Blog",- SystemName = PermissionSystemName.Blog,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageWidgets = new()- {- Name = "Manage Widgets",- SystemName = PermissionSystemName.Widgets,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit }- };- public static readonly Permission ManagePages = new()- {- Name = "Manage Pages",- SystemName = PermissionSystemName.Pages,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageKnowledgebase = new()- {- Name = "Manage Knowledgebase",- SystemName = PermissionSystemName.Knowledgebase,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageCourses = new()- {- Name = "Manage Courses",- SystemName = PermissionSystemName.Courses,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageMessageTemplates = new()- {- Name = "Manage Message Templates",- SystemName = PermissionSystemName.MessageTemplates,- Area = "Admin area",- Category = CategoryContent,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };+ public static readonly Permission ManageMessageTemplates = new() {+ Name = "Manage Message Templates",+ SystemName = PermissionSystemName.MessageTemplates,+ Area = "Admin area",+ Category = CategoryContent,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- }-}+ private static string CategoryContent => "Content";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCustomer.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCustomer.csindex a1686151e..7aae7552a 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCustomer.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionCustomer.cs@@ -1,82 +1,103 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryCustomer => "Customers";+ public static readonly Permission AllowCustomerImpersonation = new() {+ Name = "Allow Customer Impersonation",+ SystemName = PermissionSystemName.AllowCustomerImpersonation,+ Area = "Admin area",+ Category = CategoryCustomer+ };++ public static readonly Permission ManageCustomers = new() {+ Name = "Manage Customers",+ SystemName = PermissionSystemName.Customers,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export+ }+ };++ public static readonly Permission ManageAddressAttribute = new() {+ Name = "Manage Address Attributes",+ SystemName = PermissionSystemName.AddressAttributes,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCustomerAttribute = new() {+ Name = "Manage Customer Attributes",+ SystemName = PermissionSystemName.CustomerAttributes,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCustomerGroups = new() {+ Name = "Manage Customer Groups",+ SystemName = PermissionSystemName.CustomerGroups,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCustomerTags = new() {+ Name = "Manage Customer Tags",+ SystemName = PermissionSystemName.CustomerTags,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageSalesEmployees = new() {+ Name = "Manage Sales Employees",+ SystemName = PermissionSystemName.SalesEmployees,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageVendors = new() {+ Name = "Manage Vendors",+ SystemName = PermissionSystemName.Vendors,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageVendorReviews = new() {+ Name = "Manage Vendor Reviews",+ SystemName = PermissionSystemName.VendorReviews,+ Area = "Admin area",+ Category = CategoryCustomer,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- public static readonly Permission AllowCustomerImpersonation = new()- {- Name = "Allow Customer Impersonation",- SystemName = PermissionSystemName.AllowCustomerImpersonation,- Area = "Admin area",- Category = CategoryCustomer- };- public static readonly Permission ManageCustomers = new()- {- Name = "Manage Customers",- SystemName = PermissionSystemName.Customers,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export }- };- public static readonly Permission ManageAddressAttribute = new()- {- Name = "Manage Address Attributes",- SystemName = PermissionSystemName.AddressAttributes,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageCustomerAttribute = new()- {- Name = "Manage Customer Attributes",- SystemName = PermissionSystemName.CustomerAttributes,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageCustomerGroups = new()- {- Name = "Manage Customer Groups",- SystemName = PermissionSystemName.CustomerGroups,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageCustomerTags = new()- {- Name = "Manage Customer Tags",- SystemName = PermissionSystemName.CustomerTags,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageSalesEmployees = new()- {- Name = "Manage Sales Employees",- SystemName = PermissionSystemName.SalesEmployees,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Delete }- };- public static readonly Permission ManageVendors = new()- {- Name = "Manage Vendors",- SystemName = PermissionSystemName.Vendors,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageVendorReviews = new()- {- Name = "Manage Vendor Reviews",- SystemName = PermissionSystemName.VendorReviews,- Area = "Admin area",- Category = CategoryCustomer,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };-- }-}+ private static string CategoryCustomer => "Customers";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionMarketing.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionMarketing.csindex b93d0905c..3b470a119 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionMarketing.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionMarketing.cs@@ -1,67 +1,85 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryMarketing => "Marketing";+ public static readonly Permission ManageAffiliates = new() {+ Name = "Manage Affiliates",+ SystemName = PermissionSystemName.Affiliates,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManagePushEvents = new() {+ Name = "Manage Push Events",+ SystemName = PermissionSystemName.PushNotifications,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCampaigns = new() {+ Name = "Manage Campaigns",+ SystemName = PermissionSystemName.Campaigns,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export+ }+ };++ public static readonly Permission ManageDiscounts = new() {+ Name = "Manage Discounts",+ SystemName = PermissionSystemName.Discounts,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Preview,+ PermissionActionName.Edit, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageNewsletterSubscribers = new() {+ Name = "Manage Newsletter Subscribers",+ SystemName = PermissionSystemName.NewsletterSubscribers,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Export,+ PermissionActionName.Import, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageNewsletterCategories = new() {+ Name = "Manage Newsletter Categories",+ SystemName = PermissionSystemName.NewsletterCategories,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Preview,+ PermissionActionName.Edit, PermissionActionName.Delete+ }+ };- public static readonly Permission ManageAffiliates = new()- {- Name = "Manage Affiliates",- SystemName = PermissionSystemName.Affiliates,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManagePushEvents = new()- {- Name = "Manage Push Events",- SystemName = PermissionSystemName.PushNotifications,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Delete }- };- public static readonly Permission ManageCampaigns = new()- {- Name = "Manage Campaigns",- SystemName = PermissionSystemName.Campaigns,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export }- };- public static readonly Permission ManageDiscounts = new()- {- Name = "Manage Discounts",- SystemName = PermissionSystemName.Discounts,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Preview, PermissionActionName.Edit, PermissionActionName.Delete }- };- public static readonly Permission ManageNewsletterSubscribers = new()- {- Name = "Manage Newsletter Subscribers",- SystemName = PermissionSystemName.NewsletterSubscribers,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Export, PermissionActionName.Import, PermissionActionName.Delete }- };- public static readonly Permission ManageNewsletterCategories = new()- {- Name = "Manage Newsletter Categories",- SystemName = PermissionSystemName.NewsletterCategories,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Preview, PermissionActionName.Edit, PermissionActionName.Delete }- };- public static readonly Permission ManageDocuments = new()- {- Name = "Manage Documents",- SystemName = PermissionSystemName.Documents,- Area = "Admin area",- Category = CategoryMarketing,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };+ public static readonly Permission ManageDocuments = new() {+ Name = "Manage Documents",+ SystemName = PermissionSystemName.Documents,+ Area = "Admin area",+ Category = CategoryMarketing,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- }-}+ private static string CategoryMarketing => "Marketing";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionOrder.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionOrder.csindex 40e7da70e..20c553741 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionOrder.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionOrder.cs@@ -1,81 +1,100 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryOrder => "Orders";+ public static readonly Permission ManageOrders = new() {+ Name = "Manage Orders",+ SystemName = PermissionSystemName.Orders,+ Area = "Admin area",+ Category = "Orders",+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Payments,+ PermissionActionName.Cancel, PermissionActionName.Preview, PermissionActionName.Delete,+ PermissionActionName.Export+ }+ };++ public static readonly Permission ManageOrderTags = new() {+ Name = "Manage Order Tags",+ SystemName = PermissionSystemName.OrderTags,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview,+ PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageOrderStatus = new() {+ Name = "Manage Order status",+ SystemName = PermissionSystemName.OrderStatus,+ Area = "Admin area",+ Category = CategoryOrder+ };++ public static readonly Permission ManageShipments = new() {+ Name = "Manage Shipments",+ SystemName = PermissionSystemName.Shipments,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export+ }+ };++ public static readonly Permission ManageGiftVouchers = new() {+ Name = "Manage Gift vouchers",+ SystemName = PermissionSystemName.GiftVouchers,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageMerchandiseReturns = new() {+ Name = "Manage Merchandise Returns",+ SystemName = PermissionSystemName.MerchandiseReturns,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManagePaymentTransactions = new() {+ Name = "Manage Payment Transaction",+ SystemName = PermissionSystemName.PaymentTransactions,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageCurrentCarts = new() {+ Name = "Manage Current Carts",+ SystemName = PermissionSystemName.CurrentCarts,+ Area = "Admin area",+ Category = CategoryOrder+ };- public static readonly Permission ManageOrders = new()- {- Name = "Manage Orders",- SystemName = PermissionSystemName.Orders,- Area = "Admin area",- Category = "Orders",- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Payments, PermissionActionName.Cancel, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export }- };- public static readonly Permission ManageOrderTags = new()- {- Name = "Manage Order Tags",- SystemName = PermissionSystemName.OrderTags,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageOrderStatus = new()- {- Name = "Manage Order status",- SystemName = PermissionSystemName.OrderStatus,- Area = "Admin area",- Category = CategoryOrder- };- public static readonly Permission ManageShipments = new()- {- Name = "Manage Shipments",- SystemName = PermissionSystemName.Shipments,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete, PermissionActionName.Export }- };- public static readonly Permission ManageGiftVouchers = new()- {- Name = "Manage Gift vouchers",- SystemName = PermissionSystemName.GiftVouchers,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageMerchandiseReturns = new()- {- Name = "Manage Merchandise Returns",- SystemName = PermissionSystemName.MerchandiseReturns,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManagePaymentTransactions = new()- {- Name = "Manage Payment Transaction",- SystemName = PermissionSystemName.PaymentTransactions,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageCurrentCarts = new()- {- Name = "Manage Current Carts",- SystemName = PermissionSystemName.CurrentCarts,- Area = "Admin area",- Category = CategoryOrder- };- public static readonly Permission ManageCheckoutAttribute = new()- {- Name = "Manage Checkout Attributes",- SystemName = PermissionSystemName.CheckoutAttributes,- Area = "Admin area",- Category = CategoryOrder,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };+ public static readonly Permission ManageCheckoutAttribute = new() {+ Name = "Manage Checkout Attributes",+ SystemName = PermissionSystemName.CheckoutAttributes,+ Area = "Admin area",+ Category = CategoryOrder,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };- }-}+ private static string CategoryOrder => "Orders";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionPublicStore.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionPublicStore.csindex 8c1770541..66fe68f2a 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionPublicStore.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionPublicStore.cs@@ -1,52 +1,50 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategoryPublicStore => "PublicStore";-- public static readonly Permission DisplayPrices = new()- {- Name = "Display Prices",- SystemName = PermissionSystemName.DisplayPrices,- Area = "Public store",- Category = CategoryPublicStore- };- public static readonly Permission EnableShoppingCart = new()- {- Name = "Enable shopping cart",- SystemName = PermissionSystemName.EnableShoppingCart,- Area = "Public store",- Category = CategoryPublicStore- };- public static readonly Permission EnableWishlist = new()- {- Name = "Enable wishlist",- SystemName = PermissionSystemName.EnableWishlist,- Area = "Public store",- Category = CategoryPublicStore- };- public static readonly Permission PublicStoreAllowNavigation = new()- {- Name = "Allow navigation",- SystemName = PermissionSystemName.PublicStoreAllowNavigation,- Area = "Public store",- Category = CategoryPublicStore- };- public static readonly Permission AccessClosedStore = new()- {- Name = "Access a closed store",- SystemName = PermissionSystemName.AccessClosedStore,- Area = "Public store",- Category = CategoryPublicStore- };-- public static readonly Permission AllowUseApi = new() {- Name = "Allow to use api for web",- SystemName = PermissionSystemName.AllowUseApi,- Area = "Public store",- Category = CategoryPublicStore- };- }-}+ public static readonly Permission DisplayPrices = new() {+ Name = "Display Prices",+ SystemName = PermissionSystemName.DisplayPrices,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ public static readonly Permission EnableShoppingCart = new() {+ Name = "Enable shopping cart",+ SystemName = PermissionSystemName.EnableShoppingCart,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ public static readonly Permission EnableWishlist = new() {+ Name = "Enable wishlist",+ SystemName = PermissionSystemName.EnableWishlist,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ public static readonly Permission PublicStoreAllowNavigation = new() {+ Name = "Allow navigation",+ SystemName = PermissionSystemName.PublicStoreAllowNavigation,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ public static readonly Permission AccessClosedStore = new() {+ Name = "Access a closed store",+ SystemName = PermissionSystemName.AccessClosedStore,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ public static readonly Permission AllowUseApi = new() {+ Name = "Allow to use api for web",+ SystemName = PermissionSystemName.AllowUseApi,+ Area = "Public store",+ Category = CategoryPublicStore+ };++ private static string CategoryPublicStore => "PublicStore";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionReport.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionReport.csindex f3575dfaf..823fd42e4 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionReport.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionReport.cs@@ -1,18 +1,15 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security-{- public static partial class StandardPermission- {- private static string CategoryReport => "Reports";+namespace Grand.Business.Core.Utilities.Common.Security;- public static readonly Permission ManageReports = new()- {- Name = "Manage Reports",- SystemName = PermissionSystemName.Reports,- Area = "Admin area",- Category = CategoryReport- };+public static partial class StandardPermission+{+ public static readonly Permission ManageReports = new() {+ Name = "Manage Reports",+ SystemName = PermissionSystemName.Reports,+ Area = "Admin area",+ Category = CategoryReport+ };- }-}+ private static string CategoryReport => "Reports";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionSystem.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionSystem.csindex 7cbb08eee..458e9de05 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionSystem.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionSystem.cs@@ -1,69 +1,72 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++public static partial class StandardPermission{- public static partial class StandardPermission- {- private static string CategorySystem => "System";-- public static readonly Permission ManageMessageQueue = new()- {- Name = "Manage Message Queue",- SystemName = PermissionSystemName.MessageQueue,- Area = "Admin area",- Category = CategorySystem,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageMessageContactForm = new()- {- Name = "Manage Message Contact form",- SystemName = PermissionSystemName.MessageContactForm,- Area = "Admin area",- Category = CategorySystem,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Preview, PermissionActionName.Delete }- };- public static readonly Permission ManageMaintenance = new()- {- Name = "Manage Maintenance",- SystemName = PermissionSystemName.Maintenance,- Area = "Admin area",- Category = CategorySystem- };- public static readonly Permission ManageSystem = new() {- Name = "Manage System",- SystemName = PermissionSystemName.System,- Area = "Admin area",- Category = CategorySystem- };- public static readonly Permission ManageFiles = new()- {- Name = "Manage Files",- SystemName = PermissionSystemName.Files,- Area = "Admin area",- Category = CategorySystem- };- public static readonly Permission ManagePictures = new()- {- Name = "Manage Pictures",- SystemName = PermissionSystemName.Pictures,- Area = "Admin area",- Category = CategorySystem- };- public static readonly Permission HtmlEditorManagePictures = new()- {- Name = "HTML Editor. Manage pictures",- SystemName = PermissionSystemName.HtmlEditor,- Area = "Admin area",- Category = "Configuration"- };- public static readonly Permission ManageScheduleTasks = new()- {- Name = "Manage Schedule Tasks",- SystemName = PermissionSystemName.ScheduleTasks,- Area = "Admin area",- Category = CategorySystem,- Actions = new List<string> { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview }- };-- }-}+ public static readonly Permission ManageMessageQueue = new() {+ Name = "Manage Message Queue",+ SystemName = PermissionSystemName.MessageQueue,+ Area = "Admin area",+ Category = CategorySystem,+ Actions = new List<string> {+ PermissionActionName.List, PermissionActionName.Create, PermissionActionName.Edit,+ PermissionActionName.Preview, PermissionActionName.Delete+ }+ };++ public static readonly Permission ManageMessageContactForm = new() {+ Name = "Manage Message Contact form",+ SystemName = PermissionSystemName.MessageContactForm,+ Area = "Admin area",+ Category = CategorySystem,+ Actions = new List<string>+ { PermissionActionName.List, PermissionActionName.Preview, PermissionActionName.Delete }+ };++ public static readonly Permission ManageMaintenance = new() {+ Name = "Manage Maintenance",+ SystemName = PermissionSystemName.Maintenance,+ Area = "Admin area",+ Category = CategorySystem+ };++ public static readonly Permission ManageSystem = new() {+ Name = "Manage System",+ SystemName = PermissionSystemName.System,+ Area = "Admin area",+ Category = CategorySystem+ };++ public static readonly Permission ManageFiles = new() {+ Name = "Manage Files",+ SystemName = PermissionSystemName.Files,+ Area = "Admin area",+ Category = CategorySystem+ };++ public static readonly Permission ManagePictures = new() {+ Name = "Manage Pictures",+ SystemName = PermissionSystemName.Pictures,+ Area = "Admin area",+ Category = CategorySystem+ };++ public static readonly Permission HtmlEditorManagePictures = new() {+ Name = "HTML Editor. Manage pictures",+ SystemName = PermissionSystemName.HtmlEditor,+ Area = "Admin area",+ Category = "Configuration"+ };++ public static readonly Permission ManageScheduleTasks = new() {+ Name = "Manage Schedule Tasks",+ SystemName = PermissionSystemName.ScheduleTasks,+ Area = "Admin area",+ Category = CategorySystem,+ Actions = new List<string>+ { PermissionActionName.List, PermissionActionName.Edit, PermissionActionName.Preview }+ };++ private static string CategorySystem => "System";+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionVendor.cs b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionVendor.csindex 4ebab4650..c9543d93c 100644--- a/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionVendor.cs+++ b/src/Business/Grand.Business.Core/Utilities/Common/Security/StandardPermissionVendor.cs@@ -1,19 +1,17 @@using Grand.Domain.Permissions;-namespace Grand.Business.Core.Utilities.Common.Security+namespace Grand.Business.Core.Utilities.Common.Security;++/// <summary>+/// Standard permissions+/// </summary>+public static partial class StandardPermission{- /// <summary>- /// Standard permissions- /// </summary>- public static partial class StandardPermission- {- //admin area permissions- public static readonly Permission ManageAccessVendorPanel = new Permission- {- Name = "Access vendor panel",- SystemName = PermissionSystemName.AccessVendorPanel,- Area = "Vendor area",- Category = "Access Vendor"- };- }+ //admin area permissions+ public static readonly Permission ManageAccessVendorPanel = new() {+ Name = "Access vendor panel",+ SystemName = PermissionSystemName.AccessVendorPanel,+ Area = "Vendor area",+ Category = "Access Vendor"+ };}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Customers/ChangePasswordRequest.cs b/src/Business/Grand.Business.Core/Utilities/Customers/ChangePasswordRequest.csindex 6326818e5..efd77a617 100644--- a/src/Business/Grand.Business.Core/Utilities/Customers/ChangePasswordRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Customers/ChangePasswordRequest.cs@@ -1,44 +1,45 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Utilities.Customers+namespace Grand.Business.Core.Utilities.Customers;++/// <summary>+/// Change password request+/// </summary>+public class ChangePasswordRequest{/// <summary>- /// Change password request+ /// Ctor/// </summary>- public class ChangePasswordRequest+ /// <param name="email">Email</param>+ /// <param name="newPasswordFormat">Password format</param>+ /// <param name="newPassword">New password</param>+ /// <param name="oldPassword">Old password</param>+ public ChangePasswordRequest(string email,+ PasswordFormat newPasswordFormat, string newPassword, string oldPassword = ""){- /// <summary>- /// </summary>- public string Email { get; set; }- /// <summary>- /// Password format- /// </summary>- public PasswordFormat PasswordFormat { get; set; }- /// <summary>- /// New password- /// </summary>- public string NewPassword { get; set; }-- /// <summary>- /// Old password- /// </summary>- public string OldPassword { get; set; }-- /// <summary>- /// Ctor- /// </summary>- /// <param name="email">Email</param>- /// <param name="newPasswordFormat">Password format</param>- /// <param name="newPassword">New password</param>- /// <param name="oldPassword">Old password</param>- public ChangePasswordRequest(string email,- PasswordFormat newPasswordFormat, string newPassword, string oldPassword = "")- {- Email = email;- PasswordFormat = newPasswordFormat;- NewPassword = newPassword;- OldPassword = oldPassword;- }+ Email = email;+ PasswordFormat = newPasswordFormat;+ NewPassword = newPassword;+ OldPassword = oldPassword;}-}++ /// <summary>+ /// </summary>+ public string Email { get; set; }++ /// <summary>+ /// Password format+ /// </summary>+ public PasswordFormat PasswordFormat { get; set; }++ /// <summary>+ /// New password+ /// </summary>+ public string NewPassword { get; set; }++ /// <summary>+ /// Old password+ /// </summary>+ public string OldPassword { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Customers/RegistrationRequest.cs b/src/Business/Grand.Business.Core/Utilities/Customers/RegistrationRequest.csindex 07029e023..8db6d4c32 100644--- a/src/Business/Grand.Business.Core/Utilities/Customers/RegistrationRequest.cs+++ b/src/Business/Grand.Business.Core/Utilities/Customers/RegistrationRequest.cs@@ -1,65 +1,69 @@using Grand.Domain.Customers;-namespace Grand.Business.Core.Utilities.Customers+namespace Grand.Business.Core.Utilities.Customers;++/// <summary>+/// Customer registration request+/// </summary>+public class RegistrationRequest{/// <summary>- /// Customer registration request+ /// Ctor/// </summary>- public class RegistrationRequest+ /// <param name="customer">Customer</param>+ /// <param name="email">Email</param>+ /// <param name="username">Username</param>+ /// <param name="password">Password</param>+ /// <param name="passwordFormat">Password format</param>+ /// <param name="storeId">Store identifier</param>+ /// <param name="isApproved">Is approved</param>+ public RegistrationRequest(Customer customer, string email, string username,+ string password,+ PasswordFormat passwordFormat,+ string storeId,+ bool isApproved = true){+ Customer = customer;+ Email = email;+ Username = username;+ Password = password;+ PasswordFormat = passwordFormat;+ StoreId = storeId;+ IsApproved = isApproved;+ }- /// <summary>- /// Ctor- /// </summary>- /// <param name="customer">Customer</param>- /// <param name="email">Email</param>- /// <param name="username">Username</param>- /// <param name="password">Password</param>- /// <param name="passwordFormat">Password format</param>- /// <param name="storeId">Store identifier</param>- /// <param name="isApproved">Is approved</param>- public RegistrationRequest(Customer customer, string email, string username,- string password,- PasswordFormat passwordFormat,- string storeId,- bool isApproved = true)- {- this.Customer = customer;- this.Email = email;- this.Username = username;- this.Password = password;- this.PasswordFormat = passwordFormat;- this.StoreId = storeId;- this.IsApproved = isApproved;- }+ /// <summary>+ /// Customer+ /// </summary>+ public Customer Customer { get; set; }- /// <summary>- /// Customer- /// </summary>- public Customer Customer { get; set; }- /// <summary>- /// </summary>- public string Email { get; set; }- /// <summary>- /// Username- /// </summary>- public string Username { get; set; }- /// <summary>- /// Password- /// </summary>- public string Password { get; set; }- /// <summary>- /// Password format- /// </summary>- public PasswordFormat PasswordFormat { get; set; }- /// <summary>- /// Store identifier- /// </summary>- public string StoreId { get; set; }- /// <summary>- /// Is approved- /// </summary>- public bool IsApproved { get; set; }- }-}+ /// <summary>+ /// </summary>+ public string Email { get; set; }++ /// <summary>+ /// Username+ /// </summary>+ public string Username { get; set; }++ /// <summary>+ /// Password+ /// </summary>+ public string Password { get; set; }++ /// <summary>+ /// Password format+ /// </summary>+ public PasswordFormat PasswordFormat { get; set; }++ /// <summary>+ /// Store identifier+ /// </summary>+ public string StoreId { get; set; }++ /// <summary>+ /// Is approved+ /// </summary>+ public bool IsApproved { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyByName.cs b/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyByName.csindex d91ace582..5b5716242 100644--- a/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyByName.cs+++ b/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyByName.cs@@ -1,43 +1,41 @@-namespace Grand.Business.Core.Utilities.ExportImport+namespace Grand.Business.Core.Utilities.ExportImport;++/// <summary>+/// A helper class to access the property by name+/// </summary>+/// <typeparam name="T">Object type</typeparam>+public class PropertyByName<T>{/// <summary>- /// A helper class to access the property by name+ /// Ctor/// </summary>- /// <typeparam name="T">Object type</typeparam>- public class PropertyByName<T>+ /// <param name="propertyName">Property name</param>+ /// <param name="func">Feature property access</param>+ public PropertyByName(string propertyName, Func<T, object> func = null){- /// <summary>- /// Ctor- /// </summary>- /// <param name="propertyName">Property name</param>- /// <param name="func">Feature property access</param>- public PropertyByName(string propertyName, Func<T, object> func = null)- {- PropertyName = propertyName;- GetProperty = func;-- PropertyOrderPosition = 0;- }+ PropertyName = propertyName;+ GetProperty = func;- /// <summary>- /// Property order position- /// </summary>- public int PropertyOrderPosition { get; set; }+ PropertyOrderPosition = 0;+ }- /// <summary>- /// Feature property access- /// </summary>- public Func<T, object> GetProperty { get; private set; }+ /// <summary>+ /// Property order position+ /// </summary>+ public int PropertyOrderPosition { get; set; }- /// <summary>- /// Property name- /// </summary>- public string PropertyName { get; private set; }+ /// <summary>+ /// Feature property access+ /// </summary>+ public Func<T, object> GetProperty { get; private set; }- /// <summary>- /// Property value- /// </summary>- public object PropertyValue { get; set; }+ /// <summary>+ /// Property name+ /// </summary>+ public string PropertyName { get; private set; }- }+ /// <summary>+ /// Property value+ /// </summary>+ public object PropertyValue { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyManager.cs b/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyManager.csindex 7abe2c23c..407b5831c 100644--- a/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyManager.cs+++ b/src/Business/Grand.Business.Core/Utilities/ExportImport/PropertyManager.cs@@ -1,32 +1,30 @@-namespace Grand.Business.Core.Utilities.ExportImport+namespace Grand.Business.Core.Utilities.ExportImport;++/// <summary>+/// Class for working with PropertyByName object list+/// </summary>+/// <typeparam name="T">Object type</typeparam>+public class PropertyManager<T>{/// <summary>- /// Class for working with PropertyByName object list+ /// All properties+ /// </summary>+ private readonly Dictionary<string, PropertyByName<T>> _properties;++ /// <summary>+ /// Ctor/// </summary>- /// <typeparam name="T">Object type</typeparam>- public class PropertyManager<T>+ /// <param name="properties">All access properties</param>+ public PropertyManager(PropertyByName<T>[] properties){- /// <summary>- /// All properties- /// </summary>- private readonly Dictionary<string, PropertyByName<T>> _properties;+ _properties = new Dictionary<string, PropertyByName<T>>();- /// <summary>- /// Ctor- /// </summary>- /// <param name="properties">All access properties</param>- public PropertyManager(PropertyByName<T>[] properties)+ var poz = 0;+ foreach (var propertyByName in properties){- _properties = new Dictionary<string, PropertyByName<T>>();-- var poz = 0;- foreach (var propertyByName in properties)- {- propertyByName.PropertyOrderPosition = poz;- poz++;- _properties.Add(propertyByName.PropertyName, propertyByName);- }+ propertyByName.PropertyOrderPosition = poz;+ poz++;+ _properties.Add(propertyByName.PropertyName, propertyByName);}-}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAskQuestion.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAskQuestion.csindex a8009244c..434a43a2c 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAskQuestion.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAskQuestion.cs@@ -1,32 +1,26 @@using DotLiquid;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidAskQuestion : Drop{- public class LiquidAskQuestion : Drop+ public LiquidAskQuestion(string message, string email, string fullName, string phone){- private readonly string message;- private readonly string email;- private readonly string fullName;- private readonly string phone;-- public LiquidAskQuestion(string message, string email, string fullName, string phone)- {- this.message = message;- this.email = email;- this.fullName = fullName;- this.phone = phone;+ Message = message;+ Email = email;+ FullName = fullName;+ Phone = phone;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Email => email;+ public string Email { get; }- public string Message => message;+ public string Message { get; }- public string FullName => fullName;+ public string FullName { get; }- public string Phone => phone;+ public string Phone { get; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAttributeCombination.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAttributeCombination.csindex b0514b793..3b670ff99 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAttributeCombination.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAttributeCombination.cs@@ -1,24 +1,23 @@using DotLiquid;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidAttributeCombination : Drop{- public class LiquidAttributeCombination : Drop- {- private readonly ProductAttributeCombination _combination;+ private readonly ProductAttributeCombination _combination;- public LiquidAttributeCombination(ProductAttributeCombination combination)- {- _combination = combination;- AdditionalTokens = new Dictionary<string, string>();- }+ public LiquidAttributeCombination(ProductAttributeCombination combination)+ {+ _combination = combination;+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Formatted { get; set; }+ public string Formatted { get; set; }- public string SKU { get; set; }+ public string SKU { get; set; }- public string StockQuantity => _combination.StockQuantity.ToString();+ public string StockQuantity => _combination.StockQuantity.ToString();- public IDictionary<string, string> AdditionalTokens { get; set; }- }-}+ public IDictionary<string, string> AdditionalTokens { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAuctions.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAuctions.csindex 0bed24097..979eb6c70 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAuctions.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidAuctions.cs@@ -1,29 +1,28 @@using DotLiquid;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidAuctions : Drop{- public class LiquidAuctions : Drop- {- private readonly Product _product;- private readonly Bid _bid;+ private readonly Bid _bid;+ private readonly Product _product;- public LiquidAuctions(Product product, Bid bid = null)- {- _product = product;- _bid = bid;+ public LiquidAuctions(Product product, Bid bid = null)+ {+ _product = product;+ _bid = bid;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string ProductName => _product.Name;+ public string ProductName => _product.Name;- public string Price { get; set; }+ public string Price { get; set; }- public string EndTime { get; set; }+ public string EndTime { get; set; }- public string ProductSeName => _product.SeName;+ public string ProductSeName => _product.SeName;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidBlogComment.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidBlogComment.csindex dd633ef35..0cdea9ca0 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidBlogComment.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidBlogComment.cs@@ -3,37 +3,37 @@ using Grand.Domain.Blogs;using Grand.Domain.Localization;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidBlogComment : Drop{- public class LiquidBlogComment : Drop- {- private readonly BlogComment _blogComment;- private readonly BlogPost _blogPost;- private readonly Store _store;- private readonly DomainHost _host;- private readonly Language _language;+ private readonly BlogComment _blogComment;+ private readonly BlogPost _blogPost;+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly Store _store;- private string url;+ private readonly string url;- public LiquidBlogComment(BlogComment blogComment, BlogPost blogPost, Store store, DomainHost host, Language language)- {- _blogComment = blogComment;- _blogPost = blogPost;- _store = store;- _host = host;- _language = language;+ public LiquidBlogComment(BlogComment blogComment, BlogPost blogPost, Store store, DomainHost host,+ Language language)+ {+ _blogComment = blogComment;+ _blogPost = blogPost;+ _store = store;+ _host = host;+ _language = language;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string BlogPostTitle => _blogPost.Title;+ public string BlogPostTitle => _blogPost.Title;- public string BlogPostURL => $"{url}/{_blogPost.SeName}";+ public string BlogPostURL => $"{url}/{_blogPost.SeName}";- public string BlogPostCommentText => _blogComment?.CommentText;+ public string BlogPostCommentText => _blogComment?.CommentText;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidContactUs.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidContactUs.csindex dba53e65a..d23eaf0ea 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidContactUs.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidContactUs.cs@@ -1,32 +1,26 @@using DotLiquid;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidContactUs : Drop{- public class LiquidContactUs : Drop+ public LiquidContactUs(string senderEmail, string senderName, string body, string attributeDescription){- private readonly string senderEmail;- private readonly string senderName;- private readonly string body;- private readonly string attributeDescription;-- public LiquidContactUs(string senderEmail, string senderName, string body, string attributeDescription)- {- this.senderEmail = senderEmail;- this.senderName = senderName;- this.body = body;- this.attributeDescription = attributeDescription;+ SenderEmail = senderEmail;+ SenderName = senderName;+ Body = body;+ AttributeDescription = attributeDescription;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string SenderEmail => senderEmail;+ public string SenderEmail { get; }- public string SenderName => senderName;+ public string SenderName { get; }- public string Body => body;+ public string Body { get; }- public string AttributeDescription => attributeDescription;+ public string AttributeDescription { get; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidCustomer.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidCustomer.csindex e7522c8a1..b9e028985 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidCustomer.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidCustomer.cs@@ -6,71 +6,74 @@ using Grand.Domain.Tax;using Grand.SharedKernel.Extensions;using System.Net;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidCustomer : Drop{- public class LiquidCustomer : Drop+ private readonly Customer _customer;+ private readonly CustomerNote _customerNote;+ private readonly DomainHost _host;+ private readonly Store _store;+ private readonly string url;++ public LiquidCustomer(Customer customer, Store store, DomainHost host, CustomerNote customerNote = null){- private readonly Customer _customer;- private readonly CustomerNote _customerNote;- private readonly Store _store;- private readonly DomainHost _host;- private readonly string url;- public LiquidCustomer(Customer customer, Store store, DomainHost host, CustomerNote customerNote = null)- {- _customer = customer;- _customerNote = customerNote;- _store = store;- _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ _customer = customer;+ _customerNote = customerNote;+ _store = store;+ _host = host;+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Email => _customer.Email;+ public string Email => _customer.Email;- public string Username => _customer.Username;+ public string Username => _customer.Username;- public string FullName => _customer.GetFullName();+ public string FullName => _customer.GetFullName();- public string FirstName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.FirstName);+ public string FirstName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.FirstName);- public string LastName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.LastName);+ public string LastName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.LastName);- public string Gender => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Gender);+ public string Gender => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Gender);- public string DateOfBirth => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.DateOfBirth);+ public string DateOfBirth => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.DateOfBirth);- public string Company => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Company);+ public string Company => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Company);- public string StreetAddress => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.StreetAddress);+ public string StreetAddress => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.StreetAddress);- public string StreetAddress2 => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.StreetAddress2);+ public string StreetAddress2 => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.StreetAddress2);- public string ZipPostalCode => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.ZipPostalCode);+ public string ZipPostalCode => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.ZipPostalCode);- public string City => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.City);+ public string City => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.City);- public string Phone => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Phone);+ public string Phone => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Phone);- public string Fax => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Fax);+ public string Fax => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.Fax);- public string VatNumber => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.VatNumber);+ public string VatNumber => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.VatNumber);- public string VatNumberStatus => ((VatNumberStatus)_customer.GetUserFieldFromEntity<int>(SystemCustomerFieldNames.VatNumberStatusId)).ToString();+ public string VatNumberStatus =>+ ((VatNumberStatus)_customer.GetUserFieldFromEntity<int>(SystemCustomerFieldNames.VatNumberStatusId)).ToString();- public string PasswordRecoveryURL => $"{url}/passwordrecovery/confirm?token={_customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.PasswordRecoveryToken)}&email={WebUtility.UrlEncode(_customer.Email)}";+ public string PasswordRecoveryURL =>+ $"{url}/passwordrecovery/confirm?token={_customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.PasswordRecoveryToken)}&email={WebUtility.UrlEncode(_customer.Email)}";- public string AccountActivationURL => $"{url}/account/activation?token={_customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.AccountActivationToken)}&email={WebUtility.UrlEncode(_customer.Email)}";+ public string AccountActivationURL =>+ $"{url}/account/activation?token={_customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.AccountActivationToken)}&email={WebUtility.UrlEncode(_customer.Email)}";- public string WishlistURLForCustomer => $"{url}/wishlist/{_customer.CustomerGuid}";+ public string WishlistURLForCustomer => $"{url}/wishlist/{_customer.CustomerGuid}";- public string NewNoteText => FormatText.ConvertText(_customerNote.Note);+ public string NewNoteText => FormatText.ConvertText(_customerNote.Note);- public string NewTitleText => _customerNote.Title;+ public string NewTitleText => _customerNote.Title;- public string CustomerNoteAttachmentUrl => $"{url}/download/customernotefile/{_customerNote.Id}";+ public string CustomerNoteAttachmentUrl => $"{url}/download/customernotefile/{_customerNote.Id}";- public string Token => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.TwoFactorValidCode);+ public string Token => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.TwoFactorValidCode);- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmail.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmail.csindex 4a339c66d..40d3cb10d 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmail.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmail.cs@@ -1,16 +1,13 @@using DotLiquid;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidEmail : Drop{- public class LiquidEmail : Drop+ public LiquidEmail(string emailId){- private readonly string _emailId;-- public LiquidEmail(string emailId)- {- _emailId = emailId;- }-- public string Id => _emailId;+ Id = emailId;}-}++ public string Id { get; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmailAFriend.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmailAFriend.csindex a543babcf..bf7bad278 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmailAFriend.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidEmailAFriend.cs@@ -1,28 +1,23 @@using DotLiquid;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidEmailAFriend : Drop{- public class LiquidEmailAFriend : Drop+ public LiquidEmailAFriend(string personalMessage, string customerEmail, string friendsEmail){- private readonly string _personalMessage;- private readonly string _customerEmail;- private readonly string _friendsEmail;-- public LiquidEmailAFriend(string personalMessage, string customerEmail, string friendsEmail)- {- _personalMessage = personalMessage;- _customerEmail = customerEmail;- _friendsEmail = friendsEmail;+ PersonalMessage = personalMessage;+ Email = customerEmail;+ FriendsEmail = friendsEmail;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string PersonalMessage => _personalMessage;+ public string PersonalMessage { get; }- public string Email => _customerEmail;+ public string Email { get; }- public string FriendsEmail => _friendsEmail;+ public string FriendsEmail { get; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }-}+ public IDictionary<string, string> AdditionalTokens { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidExtensions.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidExtensions.csindex d1f62de65..92894168e 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidExtensions.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidExtensions.cs@@ -1,32 +1,30 @@using DotLiquid;+using DotLiquid.NamingConventions;using Grand.Domain.Messages;using System.Reflection;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public static class LiquidExtensions{- public static class LiquidExtensions+ public static List<string> GetTokens(params Type[] drops){- public static List<string> GetTokens(params Type[] drops)- {- List<string> toReturn = new List<string>();- foreach (var drop in drops)- {- toReturn.AddRange(drop.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)- .Select(x => "{{" + drop.Name[6..] + "." + x.Name + "}}"));- }-- return toReturn;- }+ var toReturn = new List<string>();+ foreach (var drop in drops)+ toReturn.AddRange(drop+ .GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)+ .Select(x => "{{" + drop.Name[6..] + "." + x.Name + "}}"));- public static string Render(LiquidObject liquidObject, string source)- {- var hash = Hash.FromAnonymousObject(liquidObject);- Template.NamingConvention = new DotLiquid.NamingConventions.CSharpNamingConvention();- Template template = Template.Parse(source);- var replaced = template.Render(hash);+ return toReturn;+ }- return replaced;- }+ public static string Render(LiquidObject liquidObject, string source)+ {+ var hash = Hash.FromAnonymousObject(liquidObject);+ Template.NamingConvention = new CSharpNamingConvention();+ var template = Template.Parse(source);+ var replaced = template.Render(hash);+ return replaced;}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidGiftVoucher.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidGiftVoucher.csindex 711c81872..4b05becc1 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidGiftVoucher.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidGiftVoucher.cs@@ -2,40 +2,39 @@using Grand.Domain.Orders;using Grand.SharedKernel.Extensions;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidGiftVoucher : Drop{- public class LiquidGiftVoucher : Drop- {- private readonly GiftVoucher _giftVoucher;+ private readonly GiftVoucher _giftVoucher;- public LiquidGiftVoucher(GiftVoucher giftVoucher)- {- _giftVoucher = giftVoucher;+ public LiquidGiftVoucher(GiftVoucher giftVoucher)+ {+ _giftVoucher = giftVoucher;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string SenderName => _giftVoucher.SenderName;+ public string SenderName => _giftVoucher.SenderName;- public string SenderEmail => _giftVoucher.SenderEmail;+ public string SenderEmail => _giftVoucher.SenderEmail;- public string RecipientName => _giftVoucher.RecipientName;+ public string RecipientName => _giftVoucher.RecipientName;- public string RecipientEmail => _giftVoucher.RecipientEmail;+ public string RecipientEmail => _giftVoucher.RecipientEmail;- public string Amount { get; set; }+ public string Amount { get; set; }- public string CouponCode => _giftVoucher.Code;+ public string CouponCode => _giftVoucher.Code;- public string Message- {- get- {- var giftVoucherMesage = !String.IsNullOrWhiteSpace(_giftVoucher.Message) ? FormatText.ConvertText(_giftVoucher.Message) : "";- return giftVoucherMesage;- }+ public string Message {+ get {+ var giftVoucherMesage = !string.IsNullOrWhiteSpace(_giftVoucher.Message)+ ? FormatText.ConvertText(_giftVoucher.Message)+ : "";+ return giftVoucherMesage;}-- public IDictionary<string, string> AdditionalTokens { get; set; }}++ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidKnowledgebase.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidKnowledgebase.csindex 3e7d0160b..095a66e93 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidKnowledgebase.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidKnowledgebase.cs@@ -3,37 +3,37 @@ using Grand.Domain.Knowledgebase;using Grand.Domain.Localization;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidKnowledgebase : Drop{- public class LiquidKnowledgebase : Drop- {- private readonly KnowledgebaseArticle _article;- private readonly KnowledgebaseArticleComment _articleComment;- private readonly Store _store;- private readonly DomainHost _host;- private readonly Language _language;+ private readonly KnowledgebaseArticle _article;+ private readonly KnowledgebaseArticleComment _articleComment;+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly Store _store;- private string url;+ private readonly string url;- public LiquidKnowledgebase(KnowledgebaseArticle article, KnowledgebaseArticleComment articleComment, Store store, DomainHost host, Language language)- {- _article = article;- _articleComment = articleComment;- _store = store;- _host = host;- _language = language;+ public LiquidKnowledgebase(KnowledgebaseArticle article, KnowledgebaseArticleComment articleComment, Store store,+ DomainHost host, Language language)+ {+ _article = article;+ _articleComment = articleComment;+ _store = store;+ _host = host;+ _language = language;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string ArticleTitle => _article.Name;+ public string ArticleTitle => _article.Name;- public string ArticleCommentText => _articleComment.CommentText;+ public string ArticleCommentText => _articleComment.CommentText;- public string ArticleCommentUrl => $"{url}/{_article.SeName}";+ public string ArticleCommentUrl => $"{url}/{_article.SeName}";- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturn.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturn.csindex b2a8dd79c..7be28aa7c 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturn.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturn.cs@@ -3,90 +3,90 @@ using Grand.Domain.Orders;using Grand.Domain.Stores;using Grand.SharedKernel.Extensions;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidMerchandiseReturn : Drop{- public class LiquidMerchandiseReturn : Drop- {- private readonly MerchandiseReturn _merchandiseReturn;- private readonly Order _order;- private readonly Store _store;- private readonly DomainHost _host;+ private readonly DomainHost _host;+ private readonly MerchandiseReturn _merchandiseReturn;++ private readonly MerchandiseReturnNote _merchandiseReturnNote;+ private readonly Order _order;+ private readonly Store _store;- private MerchandiseReturnNote _merchandiseReturnNote;- private ICollection<LiquidMerchandiseReturnItem> _items;+ private readonly string url;- private string url;+ public LiquidMerchandiseReturn(MerchandiseReturn merchandiseReturn, Store store, DomainHost host,+ Order order, MerchandiseReturnNote merchandiseReturnNote = null)+ {+ _merchandiseReturn = merchandiseReturn;+ _order = order;+ _store = store;+ _host = host;+ _merchandiseReturnNote = merchandiseReturnNote;- public LiquidMerchandiseReturn(MerchandiseReturn merchandiseReturn, Store store, DomainHost host,- Order order, MerchandiseReturnNote merchandiseReturnNote = null)- {- _merchandiseReturn = merchandiseReturn;- _order = order;- _store = store;- _host = host;- _merchandiseReturnNote = merchandiseReturnNote;+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ Items = new List<LiquidMerchandiseReturnItem>();+ AdditionalTokens = new Dictionary<string, string>();+ }- _items = new List<LiquidMerchandiseReturnItem>();- AdditionalTokens = new Dictionary<string, string>();- }+ public string Id => _merchandiseReturn.Id;- public string Id => _merchandiseReturn.Id;+ public int ReturnNumber => _merchandiseReturn.ReturnNumber;- public int ReturnNumber => _merchandiseReturn.ReturnNumber;+ public string ExternalId => _merchandiseReturn.ExternalId;- public string ExternalId => _merchandiseReturn.ExternalId;+ public string OrderId => _order.Id;- public string OrderId => _order.Id;+ public string OrderNumber => _order.OrderNumber.ToString();- public string OrderNumber => _order.OrderNumber.ToString();+ public string OrderCode => _order.Code;- public string OrderCode => _order.Code;+ public string CustomerComment => FormatText.ConvertText(_merchandiseReturn.CustomerComments);- public string CustomerComment => FormatText.ConvertText(_merchandiseReturn.CustomerComments);+ public string StaffNotes => FormatText.ConvertText(_merchandiseReturn.StaffNotes);- public string StaffNotes => FormatText.ConvertText(_merchandiseReturn.StaffNotes);+ public string Status { get; set; }- public string Status { get; set; }+ public ICollection<LiquidMerchandiseReturnItem> Items { get; }- public ICollection<LiquidMerchandiseReturnItem> Items => _items;+ public DateTime CreatedOnUtc => _merchandiseReturn.CreatedOnUtc;- public DateTime CreatedOnUtc => _merchandiseReturn.CreatedOnUtc;+ public string PickupDate => _merchandiseReturn.PickupDate.ToShortDateString();- public string PickupDate => _merchandiseReturn.PickupDate.ToShortDateString();+ public DateTime PickupDateUtc => _merchandiseReturn.PickupDate;- public DateTime PickupDateUtc => _merchandiseReturn.PickupDate;+ public string PickupAddressFirstName => _merchandiseReturn.PickupAddress.FirstName;- public string PickupAddressFirstName => _merchandiseReturn.PickupAddress.FirstName;+ public string PickupAddressLastName => _merchandiseReturn.PickupAddress.LastName;- public string PickupAddressLastName => _merchandiseReturn.PickupAddress.LastName;+ public string PickupAddressPhoneNumber => _merchandiseReturn.PickupAddress.PhoneNumber;- public string PickupAddressPhoneNumber => _merchandiseReturn.PickupAddress.PhoneNumber;+ public string PickupAddressEmail => _merchandiseReturn.PickupAddress.Email;- public string PickupAddressEmail => _merchandiseReturn.PickupAddress.Email;+ public string PickupAddressFaxNumber => _merchandiseReturn.PickupAddress.FaxNumber;- public string PickupAddressFaxNumber => _merchandiseReturn.PickupAddress.FaxNumber;+ public string PickupAddressCompany => _merchandiseReturn.PickupAddress.Company;- public string PickupAddressCompany => _merchandiseReturn.PickupAddress.Company;+ public string PickupAddressVatNumber => _merchandiseReturn.PickupAddress.VatNumber;- public string PickupAddressVatNumber => _merchandiseReturn.PickupAddress.VatNumber;+ public string PickupAddressAddress1 => _merchandiseReturn.PickupAddress.Address1;- public string PickupAddressAddress1 => _merchandiseReturn.PickupAddress.Address1;+ public string PickupAddressAddress2 => _merchandiseReturn.PickupAddress.Address2;- public string PickupAddressAddress2 => _merchandiseReturn.PickupAddress.Address2;+ public string PickupAddressCity => _merchandiseReturn.PickupAddress.City;- public string PickupAddressCity => _merchandiseReturn.PickupAddress.City;+ public string PickupAddressStateProvince { get; set; }- public string PickupAddressStateProvince { get; set; }+ public string PickupAddressZipPostalCode => _merchandiseReturn.PickupAddress.ZipPostalCode;- public string PickupAddressZipPostalCode => _merchandiseReturn.PickupAddress.ZipPostalCode;+ public string PickupAddressCountry { get; set; }- public string PickupAddressCountry { get; set; }+ public string NewNoteText => FormatText.ConvertText(_merchandiseReturnNote?.Note);- public string NewNoteText => FormatText.ConvertText(_merchandiseReturnNote?.Note);+ public string MerchandiseReturnNoteAttachmentUrl =>+ $"{url}/download/merchandisereturnnotefile/{_merchandiseReturnNote?.Id}";- public string MerchandiseReturnNoteAttachmentUrl => $"{url}/download/merchandisereturnnotefile/{_merchandiseReturnNote?.Id}";- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.csindex f7328a753..d80e0dc59 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs@@ -3,97 +3,98 @@ using Grand.Domain.Catalog;using Grand.Domain.Orders;using System.Net;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidMerchandiseReturnItem : Drop{- public class LiquidMerchandiseReturnItem : Drop+ private readonly MerchandiseReturnItem _item;+ private readonly string _languageId;+ private readonly OrderItem _orderItem;+ private readonly Product _product;++ public LiquidMerchandiseReturnItem(MerchandiseReturnItem item, OrderItem orderItem, Product product,+ string languageid){- private readonly MerchandiseReturnItem _item;- private readonly Product _product;- private readonly OrderItem _orderItem;- private readonly string _languageId;-- public LiquidMerchandiseReturnItem(MerchandiseReturnItem item, OrderItem orderItem, Product product, string languageid)- {- _item = item;- _orderItem = orderItem;- _languageId = languageid;- _product = product;- AdditionalTokens = new Dictionary<string, string>();- }+ _item = item;+ _orderItem = orderItem;+ _languageId = languageid;+ _product = product;+ AdditionalTokens = new Dictionary<string, string>();+ }- public string ProductName {- get {- var name = "";+ public string ProductName {+ get {+ var name = "";- if (_product != null)- name = WebUtility.HtmlEncode(_product.Name);+ if (_product != null)+ name = WebUtility.HtmlEncode(_product.Name);- return name;- }+ return name;}+ }- public string ProductSeName {- get {- var name = "";+ public string ProductSeName {+ get {+ var name = "";- if (_product != null)- name = _product.SeName;- return name;- }+ if (_product != null)+ name = _product.SeName;+ return name;}- public string ProductShortDescription {- get {- var desc = "";+ }++ public string ProductShortDescription {+ get {+ var desc = "";- if (_product != null)- desc = WebUtility.HtmlEncode(_product.ShortDescription);+ if (_product != null)+ desc = WebUtility.HtmlEncode(_product.ShortDescription);- return desc;- }+ return desc;}+ }- public string ProductFullDescription {- get {- var desc = "";+ public string ProductFullDescription {+ get {+ var desc = "";- if (_product != null)- desc = WebUtility.HtmlDecode(_product.FullDescription);+ if (_product != null)+ desc = WebUtility.HtmlDecode(_product.FullDescription);- return desc;- }+ return desc;}+ }- public string ProductId => _product.Id;+ public string ProductId => _product.Id;- public int Quantity => _item.Quantity;+ public int Quantity => _item.Quantity;- public string ReasonForReturn => _item.ReasonForReturn;+ public string ReasonForReturn => _item.ReasonForReturn;- public string RequestedAction => _item.RequestedAction;+ public string RequestedAction => _item.RequestedAction;- public double UnitPriceWithoutDiscInclTax => _orderItem.UnitPriceWithoutDiscInclTax;+ public double UnitPriceWithoutDiscInclTax => _orderItem.UnitPriceWithoutDiscInclTax;- public double UnitPriceWithoutDiscExclTax => _orderItem.UnitPriceWithoutDiscExclTax;+ public double UnitPriceWithoutDiscExclTax => _orderItem.UnitPriceWithoutDiscExclTax;- public double UnitPriceInclTax => _orderItem.UnitPriceInclTax;+ public double UnitPriceInclTax => _orderItem.UnitPriceInclTax;- public double UnitPriceExclTax => _orderItem.UnitPriceExclTax;+ public double UnitPriceExclTax => _orderItem.UnitPriceExclTax;- public double PriceInclTax => _orderItem.PriceInclTax;+ public double PriceInclTax => _orderItem.PriceInclTax;- public double PriceExclTax => _orderItem.PriceExclTax;+ public double PriceExclTax => _orderItem.PriceExclTax;- public double DiscountAmountInclTax => _orderItem.DiscountAmountInclTax;+ public double DiscountAmountInclTax => _orderItem.DiscountAmountInclTax;- public double DiscountAmountExclTax => _orderItem.DiscountAmountExclTax;+ public double DiscountAmountExclTax => _orderItem.DiscountAmountExclTax;- public double OriginalProductCost => _orderItem.OriginalProductCost;+ public double OriginalProductCost => _orderItem.OriginalProductCost;- public string AttributeDescription => _orderItem.AttributeDescription;+ public string AttributeDescription => _orderItem.AttributeDescription;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsComment.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsComment.csindex f0461facf..eea16d705 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsComment.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsComment.cs@@ -3,39 +3,39 @@ using Grand.Domain.Localization;using Grand.Domain.News;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidNewsComment : Drop{- public class LiquidNewsComment : Drop- {- private readonly NewsComment _newsComment;- private readonly NewsItem _newsItem;- private readonly Store _store;- private readonly DomainHost _host;- private readonly Language _language;+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly NewsComment _newsComment;+ private readonly NewsItem _newsItem;+ private readonly Store _store;- private string url;+ private readonly string url;- public LiquidNewsComment(NewsItem newsItem, NewsComment newsComment, Store store, DomainHost host, Language language)- {- _newsComment = newsComment;- _newsItem = newsItem;- _store = store;- _language = language;- _host = host;+ public LiquidNewsComment(NewsItem newsItem, NewsComment newsComment, Store store, DomainHost host,+ Language language)+ {+ _newsComment = newsComment;+ _newsItem = newsItem;+ _store = store;+ _language = language;+ _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string NewsTitle => _newsItem.Title;+ public string NewsTitle => _newsItem.Title;- public string CommentText => _newsComment.CommentText;+ public string CommentText => _newsComment.CommentText;- public string CommentTitle => _newsComment.CommentTitle;+ public string CommentTitle => _newsComment.CommentTitle;- public string NewsURL => $"{url}/{_newsItem.SeName}";+ public string NewsURL => $"{url}/{_newsItem.SeName}";- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsLetterSubscription.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsLetterSubscription.csindex 5868e3c35..509cd034f 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsLetterSubscription.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidNewsLetterSubscription.cs@@ -2,49 +2,44 @@using Grand.Domain.Messages;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidNewsLetterSubscription : Drop{- public class LiquidNewsLetterSubscription : Drop- {- private readonly NewsLetterSubscription _subscription;- private readonly Store _store;- private readonly DomainHost _host;+ private readonly DomainHost _host;+ private readonly Store _store;+ private readonly NewsLetterSubscription _subscription;- private string url;+ private readonly string url;- public LiquidNewsLetterSubscription(NewsLetterSubscription subscription, Store store, DomainHost host)- {- _subscription = subscription;- _store = store;- _host = host;+ public LiquidNewsLetterSubscription(NewsLetterSubscription subscription, Store store, DomainHost host)+ {+ _subscription = subscription;+ _store = store;+ _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Email => _subscription.Email;+ public string Email => _subscription.Email;- public string ActivationUrl- {- get- {- var urlFormat = "{0}/newsletter/subscriptionactivation/{1}/{2}";- var activationUrl = String.Format(urlFormat, url, _subscription.NewsLetterSubscriptionGuid, "true");- return activationUrl;- }+ public string ActivationUrl {+ get {+ var urlFormat = "{0}/newsletter/subscriptionactivation/{1}/{2}";+ var activationUrl = string.Format(urlFormat, url, _subscription.NewsLetterSubscriptionGuid, "true");+ return activationUrl;}+ }- public string DeactivationUrl- {- get- {- var urlFormat = "{0}/newsletter/subscriptionactivation/{1}/{2}";- var deActivationUrl = String.Format(urlFormat, url, _subscription.NewsLetterSubscriptionGuid, "false");- return deActivationUrl;- }+ public string DeactivationUrl {+ get {+ var urlFormat = "{0}/newsletter/subscriptionactivation/{1}/{2}";+ var deActivationUrl = string.Format(urlFormat, url, _subscription.NewsLetterSubscriptionGuid, "false");+ return deActivationUrl;}-- public IDictionary<string, string> AdditionalTokens { get; set; }}++ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidObjectBuilder.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidObjectBuilder.csindex 0c65bafdc..3c4b3ac2a 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidObjectBuilder.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidObjectBuilder.cs@@ -13,260 +13,274 @@ using Grand.Domain.Stores;using Grand.Domain.Vendors;using MediatR;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidObjectBuilder{- public class LiquidObjectBuilder- {- private readonly IMediator _mediator;- private List<Func<LiquidObject, Task>> _chain;- private LiquidObject _object;+ private readonly List<Func<LiquidObject, Task>> _chain;+ private readonly IMediator _mediator;+ private readonly LiquidObject _object;- public LiquidObjectBuilder(IMediator mediator)- {- _object = new LiquidObject();- _chain = new List<Func<LiquidObject, Task>>();- _mediator = mediator;- }+ public LiquidObjectBuilder(IMediator mediator)+ {+ _object = new LiquidObject();+ _chain = new List<Func<LiquidObject, Task>>();+ _mediator = mediator;+ }- public LiquidObjectBuilder(IMediator mediator, LiquidObject liquidObject)- {- _object = liquidObject;- _chain = new List<Func<LiquidObject, Task>>();- _mediator = mediator;- }+ public LiquidObjectBuilder(IMediator mediator, LiquidObject liquidObject)+ {+ _object = liquidObject;+ _chain = new List<Func<LiquidObject, Task>>();+ _mediator = mediator;+ }- public LiquidObjectBuilder AddStoreTokens(Store store, Language language, EmailAccount emailAccount)+ public LiquidObjectBuilder AddStoreTokens(Store store, Language language, EmailAccount emailAccount)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidStore = await _mediator.Send(new GetStoreTokensCommand { Store = store, Language = language, EmailAccount = emailAccount });- liquidObject.Store = liquidStore;- await _mediator.EntityTokensAdded(store, liquidStore, liquidObject);- });- return this;- }+ var liquidStore = await _mediator.Send(new GetStoreTokensCommand+ { Store = store, Language = language, EmailAccount = emailAccount });+ liquidObject.Store = liquidStore;+ await _mediator.EntityTokensAdded(store, liquidStore, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddOrderTokens(Order order, Customer customer, Store store, DomainHost host, OrderNote orderNote = null, Vendor vendor = null, double refundedAmount = 0)+ public LiquidObjectBuilder AddOrderTokens(Order order, Customer customer, Store store, DomainHost host,+ OrderNote orderNote = null, Vendor vendor = null, double refundedAmount = 0)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidOrder = await _mediator.Send(new GetOrderTokensCommand {- Order = order,- Customer = customer,- Vendor = vendor,- Store = store,- Host = host,- OrderNote = orderNote,- RefundedAmount = refundedAmount- });- liquidObject.Order = liquidOrder;- await _mediator.EntityTokensAdded(order, liquidOrder, liquidObject);+ var liquidOrder = await _mediator.Send(new GetOrderTokensCommand {+ Order = order,+ Customer = customer,+ Vendor = vendor,+ Store = store,+ Host = host,+ OrderNote = orderNote,+ RefundedAmount = refundedAmount});- return this;- }+ liquidObject.Order = liquidOrder;+ await _mediator.EntityTokensAdded(order, liquidOrder, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddShipmentTokens(Shipment shipment, Order order, Store store, DomainHost host, Language language)+ public LiquidObjectBuilder AddShipmentTokens(Shipment shipment, Order order, Store store, DomainHost host,+ Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {-- var liquidShipment = await _mediator.Send(new GetShipmentTokensCommand { Shipment = shipment, Order = order, Store = store, Host = host, Language = language });- liquidObject.Shipment = liquidShipment;- await _mediator.EntityTokensAdded(shipment, liquidShipment, liquidObject);- });- return this;- }+ var liquidShipment = await _mediator.Send(new GetShipmentTokensCommand+ { Shipment = shipment, Order = order, Store = store, Host = host, Language = language });+ liquidObject.Shipment = liquidShipment;+ await _mediator.EntityTokensAdded(shipment, liquidShipment, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddMerchandiseReturnTokens(MerchandiseReturn merchandiseReturn, Store store, DomainHost host, Order order, Language language, MerchandiseReturnNote merchandiseReturnNote = null)+ public LiquidObjectBuilder AddMerchandiseReturnTokens(MerchandiseReturn merchandiseReturn, Store store,+ DomainHost host, Order order, Language language, MerchandiseReturnNote merchandiseReturnNote = null)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidMerchandiseReturn = await _mediator.Send(new GetMerchandiseReturnTokensCommand { Order = order, Language = language, MerchandiseReturn = merchandiseReturn, MerchandiseReturnNote = merchandiseReturnNote, Store = store, Host = host });- liquidObject.MerchandiseReturn = liquidMerchandiseReturn;- await _mediator.EntityTokensAdded(merchandiseReturn, liquidMerchandiseReturn, liquidObject);+ var liquidMerchandiseReturn = await _mediator.Send(new GetMerchandiseReturnTokensCommand {+ Order = order, Language = language, MerchandiseReturn = merchandiseReturn,+ MerchandiseReturnNote = merchandiseReturnNote, Store = store, Host = host});- return this;- }+ liquidObject.MerchandiseReturn = liquidMerchandiseReturn;+ await _mediator.EntityTokensAdded(merchandiseReturn, liquidMerchandiseReturn, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddGiftVoucherTokens(GiftVoucher giftVoucher, Language language)+ public LiquidObjectBuilder AddGiftVoucherTokens(GiftVoucher giftVoucher, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidGiftCart = await _mediator.Send(new GetGiftVoucherTokensCommand { GiftVoucher = giftVoucher, Language = language });- liquidObject.GiftVoucher = liquidGiftCart;- await _mediator.EntityTokensAdded(giftVoucher, liquidGiftCart, liquidObject);- });- return this;- }+ var liquidGiftCart = await _mediator.Send(new GetGiftVoucherTokensCommand+ { GiftVoucher = giftVoucher, Language = language });+ liquidObject.GiftVoucher = liquidGiftCart;+ await _mediator.EntityTokensAdded(giftVoucher, liquidGiftCart, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddCustomerTokens(Customer customer, Store store, DomainHost host, Language language, CustomerNote customerNote = null)+ public LiquidObjectBuilder AddCustomerTokens(Customer customer, Store store, DomainHost host, Language language,+ CustomerNote customerNote = null)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidCustomer = new LiquidCustomer(customer, store, host, customerNote);- liquidObject.Customer = liquidCustomer;+ var liquidCustomer = new LiquidCustomer(customer, store, host, customerNote);+ liquidObject.Customer = liquidCustomer;- await _mediator.EntityTokensAdded(customer, liquidCustomer, liquidObject);- if (customerNote != null)- await _mediator.EntityTokensAdded(customerNote, liquidCustomer, liquidObject);- });- return this;- }+ await _mediator.EntityTokensAdded(customer, liquidCustomer, liquidObject);+ if (customerNote != null)+ await _mediator.EntityTokensAdded(customerNote, liquidCustomer, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddShoppingCartTokens(Customer customer, Store store, Language language)+ public LiquidObjectBuilder AddShoppingCartTokens(Customer customer, Store store, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidShoppingCart = await _mediator.Send(new GetShoppingCartTokensCommand {- Customer = customer,- Language = language,- Store = store- });- liquidObject.ShoppingCart = liquidShoppingCart;-- await _mediator.EntityTokensAdded(customer, liquidShoppingCart, liquidObject);+ var liquidShoppingCart = await _mediator.Send(new GetShoppingCartTokensCommand {+ Customer = customer,+ Language = language,+ Store = store});- return this;- }+ liquidObject.ShoppingCart = liquidShoppingCart;- public LiquidObjectBuilder AddVendorTokens(Vendor vendor, Language language)- {- _chain.Add(async liquidObject =>- {- var liquidVendor = await _mediator.Send(new GetVendorTokensCommand { Vendor = vendor, Language = language });- liquidObject.Vendor = liquidVendor;- await _mediator.EntityTokensAdded(vendor, liquidVendor, liquidObject);- });- return this;- }+ await _mediator.EntityTokensAdded(customer, liquidShoppingCart, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddNewsLetterSubscriptionTokens(NewsLetterSubscription subscription, Store store, DomainHost host)+ public LiquidObjectBuilder AddVendorTokens(Vendor vendor, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidNewsletterSubscription = new LiquidNewsLetterSubscription(subscription, store, host);- liquidObject.NewsLetterSubscription = liquidNewsletterSubscription;- await _mediator.EntityTokensAdded(subscription, liquidNewsletterSubscription, liquidObject);- });- return this;- }+ var liquidVendor = await _mediator.Send(new GetVendorTokensCommand+ { Vendor = vendor, Language = language });+ liquidObject.Vendor = liquidVendor;+ await _mediator.EntityTokensAdded(vendor, liquidVendor, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddProductReviewTokens(Product product, ProductReview productReview)+ public LiquidObjectBuilder AddNewsLetterSubscriptionTokens(NewsLetterSubscription subscription, Store store,+ DomainHost host)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidProductReview = new LiquidProductReview(product, productReview);- liquidObject.ProductReview = liquidProductReview;- await _mediator.EntityTokensAdded(productReview, liquidProductReview, liquidObject);- });- return this;- }+ var liquidNewsletterSubscription = new LiquidNewsLetterSubscription(subscription, store, host);+ liquidObject.NewsLetterSubscription = liquidNewsletterSubscription;+ await _mediator.EntityTokensAdded(subscription, liquidNewsletterSubscription, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddVendorReviewTokens(Vendor vendor, VendorReview vendorReview)+ public LiquidObjectBuilder AddProductReviewTokens(Product product, ProductReview productReview)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidVendorReview = new LiquidVendorReview(vendor, vendorReview);- liquidObject.VendorReview = liquidVendorReview;- await _mediator.EntityTokensAdded(vendorReview, liquidVendorReview, liquidObject);- });- return this;- }+ var liquidProductReview = new LiquidProductReview(product, productReview);+ liquidObject.ProductReview = liquidProductReview;+ await _mediator.EntityTokensAdded(productReview, liquidProductReview, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddBlogCommentTokens(BlogPost blogPost, BlogComment blogComment, Store store, DomainHost host, Language language)+ public LiquidObjectBuilder AddVendorReviewTokens(Vendor vendor, VendorReview vendorReview)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidBlogComment = new LiquidBlogComment(blogComment, blogPost, store, host, language);- liquidObject.BlogComment = liquidBlogComment;- await _mediator.EntityTokensAdded(blogComment, liquidBlogComment, liquidObject);- });- return this;- }+ var liquidVendorReview = new LiquidVendorReview(vendor, vendorReview);+ liquidObject.VendorReview = liquidVendorReview;+ await _mediator.EntityTokensAdded(vendorReview, liquidVendorReview, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddArticleCommentTokens(KnowledgebaseArticle article, KnowledgebaseArticleComment articleComment, Store store, DomainHost host, Language language)+ public LiquidObjectBuilder AddBlogCommentTokens(BlogPost blogPost, BlogComment blogComment, Store store,+ DomainHost host, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidKnowledgebase = new LiquidKnowledgebase(article, articleComment, store, host, language);- liquidObject.Knowledgebase = liquidKnowledgebase;- await _mediator.EntityTokensAdded(articleComment, liquidKnowledgebase, liquidObject);- });- return this;- }+ var liquidBlogComment = new LiquidBlogComment(blogComment, blogPost, store, host, language);+ liquidObject.BlogComment = liquidBlogComment;+ await _mediator.EntityTokensAdded(blogComment, liquidBlogComment, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddNewsCommentTokens(NewsItem newsItem, NewsComment newsComment, Store store, DomainHost host, Language language)+ public LiquidObjectBuilder AddArticleCommentTokens(KnowledgebaseArticle article,+ KnowledgebaseArticleComment articleComment, Store store, DomainHost host, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidNewsComment = new LiquidNewsComment(newsItem, newsComment, store, host, language);- liquidObject.NewsComment = liquidNewsComment;- await _mediator.EntityTokensAdded(newsComment, liquidNewsComment, liquidObject);- });- return this;- }+ var liquidKnowledgebase = new LiquidKnowledgebase(article, articleComment, store, host, language);+ liquidObject.Knowledgebase = liquidKnowledgebase;+ await _mediator.EntityTokensAdded(articleComment, liquidKnowledgebase, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddProductTokens(Product product, Language language, Store store, DomainHost host)+ public LiquidObjectBuilder AddNewsCommentTokens(NewsItem newsItem, NewsComment newsComment, Store store,+ DomainHost host, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidProduct = new LiquidProduct(product, language, store, host);- liquidObject.Product = liquidProduct;- await _mediator.EntityTokensAdded(product, liquidProduct, liquidObject);- });- return this;- }+ var liquidNewsComment = new LiquidNewsComment(newsItem, newsComment, store, host, language);+ liquidObject.NewsComment = liquidNewsComment;+ await _mediator.EntityTokensAdded(newsComment, liquidNewsComment, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddAttributeCombinationTokens(Product product, ProductAttributeCombination combination)+ public LiquidObjectBuilder AddProductTokens(Product product, Language language, Store store, DomainHost host)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {-- var liquidAttributeCombination = await _mediator.Send(new GetAttributeCombinationTokensCommand { Product = product, Combination = combination });- liquidObject.AttributeCombination = liquidAttributeCombination;- await _mediator.EntityTokensAdded(combination, liquidAttributeCombination, liquidObject);- });- return this;- }+ var liquidProduct = new LiquidProduct(product, language, store, host);+ liquidObject.Product = liquidProduct;+ await _mediator.EntityTokensAdded(product, liquidProduct, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddOutOfStockTokens(Product product, OutOfStockSubscription subscription, Store store, DomainHost host, Language language)+ public LiquidObjectBuilder AddAttributeCombinationTokens(Product product, ProductAttributeCombination combination)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidOutOfStockSubscription = new LiquidOutOfStockSubscription(product, subscription, store, host, language);- liquidObject.OutOfStockSubscription = liquidOutOfStockSubscription;- await _mediator.EntityTokensAdded(subscription, liquidOutOfStockSubscription, liquidObject);- });- return this;- }+ var liquidAttributeCombination = await _mediator.Send(new GetAttributeCombinationTokensCommand+ { Product = product, Combination = combination });+ liquidObject.AttributeCombination = liquidAttributeCombination;+ await _mediator.EntityTokensAdded(combination, liquidAttributeCombination, liquidObject);+ });+ return this;+ }- public LiquidObjectBuilder AddAuctionTokens(Product product, Bid bid)+ public LiquidObjectBuilder AddOutOfStockTokens(Product product, OutOfStockSubscription subscription, Store store,+ DomainHost host, Language language)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidAuctions = await _mediator.Send(new GetAuctionTokensCommand { Product = product, Bid = bid });- liquidObject.Auctions = liquidAuctions;- await _mediator.EntityTokensAdded(bid, liquidAuctions, liquidObject);- });- return this;- }- public LiquidObjectBuilder AddEmailAFriendTokens(string personalMessage, string customerEmail, string friendsEmail)+ var liquidOutOfStockSubscription =+ new LiquidOutOfStockSubscription(product, subscription, store, host, language);+ liquidObject.OutOfStockSubscription = liquidOutOfStockSubscription;+ await _mediator.EntityTokensAdded(subscription, liquidOutOfStockSubscription, liquidObject);+ });+ return this;+ }++ public LiquidObjectBuilder AddAuctionTokens(Product product, Bid bid)+ {+ _chain.Add(async liquidObject =>{- _chain.Add(async liquidObject =>- {- var liquidEmail = new LiquidEmailAFriend(personalMessage, customerEmail, friendsEmail);- liquidObject.EmailAFriend = liquidEmail;- await Task.CompletedTask;- });- return this;- }- public async Task<LiquidObject> BuildAsync()+ var liquidAuctions = await _mediator.Send(new GetAuctionTokensCommand { Product = product, Bid = bid });+ liquidObject.Auctions = liquidAuctions;+ await _mediator.EntityTokensAdded(bid, liquidAuctions, liquidObject);+ });+ return this;+ }++ public LiquidObjectBuilder AddEmailAFriendTokens(string personalMessage, string customerEmail, string friendsEmail)+ {+ _chain.Add(async liquidObject =>{- foreach (var f in _chain)- {- await f(_object);- }- return _object;- }+ var liquidEmail = new LiquidEmailAFriend(personalMessage, customerEmail, friendsEmail);+ liquidObject.EmailAFriend = liquidEmail;+ await Task.CompletedTask;+ });+ return this;+ }++ public async Task<LiquidObject> BuildAsync()+ {+ foreach (var f in _chain) await f(_object);+ return _object;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrder.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrder.csindex 9fb87ae7f..4e4f0d103 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrder.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrder.cs@@ -8,182 +8,179 @@ using Grand.Domain.Stores;using Grand.Domain.Vendors;using Grand.SharedKernel.Extensions;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidOrder : Drop{- public class LiquidOrder : Drop+ private readonly Currency _currency;+ private readonly Customer _customer;+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly Order _order;+ private readonly OrderNote _orderNote;+ private readonly Store _store;+ private readonly Vendor _vendor;++ private readonly string url;++ public LiquidOrder(Order order, Customer customer, Language language, Currency currency, Store store,+ DomainHost host, OrderNote orderNote = null, Vendor vendor = null){- private readonly Order _order;- private readonly Language _language;- private readonly Customer _customer;- private readonly Currency _currency;- private readonly Store _store;- private readonly Vendor _vendor;- private readonly DomainHost _host;- private readonly OrderNote _orderNote;-- private ICollection<LiquidOrderItem> _orderItems;-- private string url;-- public LiquidOrder(Order order, Customer customer, Language language, Currency currency, Store store, DomainHost host, OrderNote orderNote = null, Vendor vendor = null)- {+ _order = order;+ _customer = customer;+ _language = language;+ _orderNote = orderNote;+ _currency = currency;+ _store = store;+ _vendor = vendor;+ _host = host;- _order = order;- _customer = customer;- _language = language;- _orderNote = orderNote;- _currency = currency;- _store = store;- _vendor = vendor;- _host = host;+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ OrderItems = new List<LiquidOrderItem>();+ AdditionalTokens = new Dictionary<string, string>();+ }- _orderItems = new List<LiquidOrderItem>();- AdditionalTokens = new Dictionary<string, string>();- }-- public string OrderNumber => _order.OrderNumber.ToString();+ public string OrderNumber => _order.OrderNumber.ToString();- public string OrderCode => _order.Code;+ public string OrderCode => _order.Code;- public string CustomerFullName => $"{_order.BillingAddress.FirstName} {_order.BillingAddress.LastName}";+ public string CustomerFullName => $"{_order.BillingAddress.FirstName} {_order.BillingAddress.LastName}";- public string CustomerEmail => _order.BillingAddress.Email;+ public string CustomerEmail => _order.BillingAddress.Email;- public string BillingAddressName => _order.BillingAddress.Name;+ public string BillingAddressName => _order.BillingAddress.Name;- public string BillingFirstName => _order.BillingAddress.FirstName;+ public string BillingFirstName => _order.BillingAddress.FirstName;- public string BillingLastName => _order.BillingAddress.LastName;+ public string BillingLastName => _order.BillingAddress.LastName;- public string BillingPhoneNumber => _order.BillingAddress.PhoneNumber;+ public string BillingPhoneNumber => _order.BillingAddress.PhoneNumber;- public string BillingEmail => _order.BillingAddress.Email;+ public string BillingEmail => _order.BillingAddress.Email;- public string BillingFaxNumber => _order.BillingAddress.FaxNumber;+ public string BillingFaxNumber => _order.BillingAddress.FaxNumber;- public string BillingCompany => _order.BillingAddress.Company;+ public string BillingCompany => _order.BillingAddress.Company;- public string BillingVatNumber => _order.BillingAddress.VatNumber;+ public string BillingVatNumber => _order.BillingAddress.VatNumber;- public string BillingAddress1 => _order.BillingAddress.Address1;+ public string BillingAddress1 => _order.BillingAddress.Address1;- public string BillingAddress2 => _order.BillingAddress.Address2;+ public string BillingAddress2 => _order.BillingAddress.Address2;- public string BillingCity => _order.BillingAddress.City;+ public string BillingCity => _order.BillingAddress.City;- public string BillingStateProvince { get; set; }+ public string BillingStateProvince { get; set; }- public string BillingZipPostalCode => _order.BillingAddress.ZipPostalCode;+ public string BillingZipPostalCode => _order.BillingAddress.ZipPostalCode;- public string BillingCountry { get; set; }+ public string BillingCountry { get; set; }- public string BillingCustomAttributes { get; set; }+ public string BillingCustomAttributes { get; set; }- public string ShippingMethod => _order.ShippingMethod;+ public string ShippingMethod => _order.ShippingMethod;- public string ShippingAdditionDescription => _order.ShippingOptionAttributeDescription;+ public string ShippingAdditionDescription => _order.ShippingOptionAttributeDescription;- public string ShippingAddressName => _order.ShippingAddress != null ? _order.ShippingAddress.Name : "";+ public string ShippingAddressName => _order.ShippingAddress != null ? _order.ShippingAddress.Name : "";- public string ShippingFirstName => _order.ShippingAddress != null ? _order.ShippingAddress.FirstName : "";+ public string ShippingFirstName => _order.ShippingAddress != null ? _order.ShippingAddress.FirstName : "";- public string ShippingLastName => _order.ShippingAddress != null ? _order.ShippingAddress.LastName : "";+ public string ShippingLastName => _order.ShippingAddress != null ? _order.ShippingAddress.LastName : "";- public string ShippingPhoneNumber => _order.ShippingAddress != null ? _order.ShippingAddress.PhoneNumber : "";+ public string ShippingPhoneNumber => _order.ShippingAddress != null ? _order.ShippingAddress.PhoneNumber : "";- public string ShippingEmail => _order.ShippingAddress != null ? _order.ShippingAddress.Email : "";+ public string ShippingEmail => _order.ShippingAddress != null ? _order.ShippingAddress.Email : "";- public string ShippingFaxNumber => _order.ShippingAddress != null ? _order.ShippingAddress.FaxNumber : "";+ public string ShippingFaxNumber => _order.ShippingAddress != null ? _order.ShippingAddress.FaxNumber : "";- public string ShippingCompany => _order.ShippingAddress != null ? _order.ShippingAddress.Company : "";+ public string ShippingCompany => _order.ShippingAddress != null ? _order.ShippingAddress.Company : "";- public string ShippingAddress1 => _order.ShippingAddress != null ? _order.ShippingAddress.Address1 : "";+ public string ShippingAddress1 => _order.ShippingAddress != null ? _order.ShippingAddress.Address1 : "";- public string ShippingAddress2 => _order.ShippingAddress != null ? _order.ShippingAddress.Address2 : "";+ public string ShippingAddress2 => _order.ShippingAddress != null ? _order.ShippingAddress.Address2 : "";- public string ShippingCity => _order.ShippingAddress != null ? _order.ShippingAddress.City : "";+ public string ShippingCity => _order.ShippingAddress != null ? _order.ShippingAddress.City : "";- public string ShippingStateProvince { get; set; }+ public string ShippingStateProvince { get; set; }- public string ShippingZipPostalCode => _order.ShippingAddress != null ? _order.ShippingAddress.ZipPostalCode : "";+ public string ShippingZipPostalCode => _order.ShippingAddress != null ? _order.ShippingAddress.ZipPostalCode : "";- public string ShippingCountry { get; set; }+ public string ShippingCountry { get; set; }- public string ShippingCustomAttributes { get; set; }+ public string ShippingCustomAttributes { get; set; }- public string PaymentMethod { get; set; }+ public string PaymentMethod { get; set; }- public string VatNumber => _order.VatNumber;+ public string VatNumber => _order.VatNumber;- public string CreatedOn => _order.CreatedOnUtc.ToLocalTime().ToString("D");+ public string CreatedOn => _order.CreatedOnUtc.ToLocalTime().ToString("D");- public DateTime CreatedOnUtc => _order.CreatedOnUtc;+ public DateTime CreatedOnUtc => _order.CreatedOnUtc;- public string OrderURLForCustomer => $"{url}/orderdetails/{_order.Id}";+ public string OrderURLForCustomer => $"{url}/orderdetails/{_order.Id}";- public double PaidAmount => _order.PaidAmount;+ public double PaidAmount => _order.PaidAmount;- public double RefundedAmount => _order.RefundedAmount;+ public double RefundedAmount => _order.RefundedAmount;- public string NewNoteText => FormatText.ConvertText(_orderNote.Note);+ public string NewNoteText => FormatText.ConvertText(_orderNote.Note);- public string OrderNoteAttachmentUrl => $"{url}/download/ordernotefile/{_orderNote.Id}";+ public string OrderNoteAttachmentUrl => $"{url}/download/ordernotefile/{_orderNote.Id}";- public string VendorName => _vendor?.Name;+ public string VendorName => _vendor?.Name;- public string VendorEmail => _vendor?.Email;+ public string VendorEmail => _vendor?.Email;- public ICollection<LiquidOrderItem> OrderItems => _orderItems;+ public ICollection<LiquidOrderItem> OrderItems { get; }- public bool DisplaySubTotalDiscount { get; set; }+ public bool DisplaySubTotalDiscount { get; set; }- public string SubTotalDiscount { get; set; }+ public string SubTotalDiscount { get; set; }- public string SubTotal { get; set; }+ public string SubTotal { get; set; }- public string Shipping { get; set; }+ public string Shipping { get; set; }- public string Tax { get; set; }+ public string Tax { get; set; }- public string Total { get; set; }+ public string Total { get; set; }- public bool DisplayShipping => _order.ShippingStatusId != ShippingStatus.ShippingNotRequired;+ public bool DisplayShipping => _order.ShippingStatusId != ShippingStatus.ShippingNotRequired;- public bool DisplayPaymentMethodFee => _order.PaymentMethodAdditionalFeeExclTax > 0;+ public bool DisplayPaymentMethodFee => _order.PaymentMethodAdditionalFeeExclTax > 0;- public string PaymentMethodAdditionalFee { get; set; }+ public string PaymentMethodAdditionalFee { get; set; }- public bool DisplayTax { get; set; }+ public bool DisplayTax { get; set; }- public bool DisplayTaxRates { get; set; }+ public bool DisplayTaxRates { get; set; }- public Dictionary<string, string> TaxRates { get; set; }+ public Dictionary<string, string> TaxRates { get; set; }- public bool DisplayDiscount { get; set; }+ public bool DisplayDiscount { get; set; }- public string Discount { get; set; }+ public string Discount { get; set; }- public string CheckoutAttributeDescription => _order.CheckoutAttributeDescription;+ public string CheckoutAttributeDescription => _order.CheckoutAttributeDescription;- public Dictionary<string, string> GiftVouchers { get; set; }+ public Dictionary<string, string> GiftVouchers { get; set; }- public bool RedeemedLoyaltyPointsEntryExists => _order.RedeemedLoyaltyPoints > 0;+ public bool RedeemedLoyaltyPointsEntryExists => _order.RedeemedLoyaltyPoints > 0;- public string RPAmount { get; set; }- public string RPPoints { get; set; }+ public string RPAmount { get; set; }+ public string RPPoints { get; set; }- public bool IsRecurring => _order.IsRecurring;+ public bool IsRecurring => _order.IsRecurring;- public int RecurringCycleLength => _order.RecurringCycleLength;+ public int RecurringCycleLength => _order.RecurringCycleLength;- public int RecurringCyclePeriodId => (int)_order.RecurringCyclePeriodId;+ public int RecurringCyclePeriodId => (int)_order.RecurringCyclePeriodId;- public int RecurringTotalCycles => _order.RecurringTotalCycles;+ public int RecurringTotalCycles => _order.RecurringTotalCycles;- public IDictionary<string, string> AdditionalTokens { get; set; }- }-}+ public IDictionary<string, string> AdditionalTokens { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrderItem.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrderItem.csindex e2e7ee515..8cc9d365e 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrderItem.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOrderItem.cs@@ -7,169 +7,170 @@ using Grand.Domain.Stores;using Grand.Domain.Vendors;using System.Net;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidOrderItem : Drop{- public class LiquidOrderItem : Drop+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly OrderItem _orderItem;+ private readonly Product _product;+ private readonly Store _store;+ private readonly Vendor _vendor;++ private readonly string url;++ public LiquidOrderItem(OrderItem orderItem, Product product, Language language, Store store, DomainHost host,+ Vendor vendor){- private readonly OrderItem _orderItem;- private readonly Product _product;- private readonly Language _language;- private readonly Store _store;- private readonly DomainHost _host;- private readonly Vendor _vendor;-- private string url;-- public LiquidOrderItem(OrderItem orderItem, Product product, Language language, Store store, DomainHost host, Vendor vendor)- {- _orderItem = orderItem;- _store = store;- _language = language;- _product = product;- _vendor = vendor;- _host = host;-- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));-- AdditionalTokens = new Dictionary<string, string>();- }+ _orderItem = orderItem;+ _store = store;+ _language = language;+ _product = product;+ _vendor = vendor;+ _host = host;- public string UnitPrice { get; set; }- public bool UnitPriceWithTax { get; set; }+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- public string TotalPrice { get; set; }- public bool TotalPriceWithTax { get; set; }+ AdditionalTokens = new Dictionary<string, string>();+ }++ public string UnitPrice { get; set; }+ public bool UnitPriceWithTax { get; set; }- public string ProductSku { get; set; }+ public string TotalPrice { get; set; }+ public bool TotalPriceWithTax { get; set; }- public bool IsDownloadAllowed { get; set; }+ public string ProductSku { get; set; }- public bool IsLicenseDownloadAllowed { get; set; }+ public bool IsDownloadAllowed { get; set; }- public string DownloadUrl {- get {- var downloadUrl = $"{url}/download/getdownload/{_orderItem.OrderItemGuid}";- return downloadUrl;- }+ public bool IsLicenseDownloadAllowed { get; set; }++ public string DownloadUrl {+ get {+ var downloadUrl = $"{url}/download/getdownload/{_orderItem.OrderItemGuid}";+ return downloadUrl;}+ }- public string LicenseUrl {- get {- var licenseUrl = $"{url}/download/getlicense/{_orderItem.OrderItemGuid}";- return licenseUrl;- }+ public string LicenseUrl {+ get {+ var licenseUrl = $"{url}/download/getlicense/{_orderItem.OrderItemGuid}";+ return licenseUrl;}+ }- public Guid OrderItemGuid => _orderItem.OrderItemGuid;+ public Guid OrderItemGuid => _orderItem.OrderItemGuid;- public string ProductName {- get {- var name = "";+ public string ProductName {+ get {+ var name = "";- if (_product != null)- name = WebUtility.HtmlEncode(_product.GetTranslation(x => x.Name, _language.Id));+ if (_product != null)+ name = WebUtility.HtmlEncode(_product.GetTranslation(x => x.Name, _language.Id));- return name;- }+ return name;}+ }- public string ProductSeName {- get {- var name = "";+ public string ProductSeName {+ get {+ var name = "";- if (_product != null)- name = _product.GetTranslation(x => x.SeName, _language.Id);- return name;- }+ if (_product != null)+ name = _product.GetTranslation(x => x.SeName, _language.Id);+ return name;}- public string ProductShortDescription {- get {- var desc = "";+ }++ public string ProductShortDescription {+ get {+ var desc = "";- if (_product != null)- desc = WebUtility.HtmlEncode(_product.GetTranslation(x => x.ShortDescription, _language.Id));+ if (_product != null)+ desc = WebUtility.HtmlEncode(_product.GetTranslation(x => x.ShortDescription, _language.Id));- return desc;- }+ return desc;}+ }- public string ProductFullDescription {- get {- var desc = "";+ public string ProductFullDescription {+ get {+ var desc = "";- if (_product != null)- desc = WebUtility.HtmlDecode(_product.GetTranslation(x => x.FullDescription, _language.Id));+ if (_product != null)+ desc = WebUtility.HtmlDecode(_product.GetTranslation(x => x.FullDescription, _language.Id));- return desc;- }+ return desc;}+ }- public string ProductId => _orderItem.ProductId;+ public string ProductId => _orderItem.ProductId;- public string VendorId => _orderItem.VendorId;+ public string VendorId => _orderItem.VendorId;- public string VendorName => _vendor?.Name;+ public string VendorName => _vendor?.Name;- public string WarehouseId => _orderItem.WarehouseId;+ public string WarehouseId => _orderItem.WarehouseId;- public int Quantity => _orderItem.Quantity;+ public int Quantity => _orderItem.Quantity;- public int OpenQty => _orderItem.OpenQty;+ public int OpenQty => _orderItem.OpenQty;- public int CancelQty => _orderItem.CancelQty;+ public int CancelQty => _orderItem.CancelQty;- public int ShipQty => _orderItem.ShipQty;+ public int ShipQty => _orderItem.ShipQty;- public bool IsShipEnabled => _orderItem.IsShipEnabled;+ public bool IsShipEnabled => _orderItem.IsShipEnabled;- public double UnitPriceWithoutDiscInclTax => _orderItem.UnitPriceWithoutDiscInclTax;+ public double UnitPriceWithoutDiscInclTax => _orderItem.UnitPriceWithoutDiscInclTax;- public double UnitPriceWithoutDiscExclTax => _orderItem.UnitPriceWithoutDiscExclTax;+ public double UnitPriceWithoutDiscExclTax => _orderItem.UnitPriceWithoutDiscExclTax;- public double UnitPriceInclTax => _orderItem.UnitPriceInclTax;+ public double UnitPriceInclTax => _orderItem.UnitPriceInclTax;- public double UnitPriceExclTax => _orderItem.UnitPriceExclTax;+ public double UnitPriceExclTax => _orderItem.UnitPriceExclTax;- public double PriceInclTax => _orderItem.PriceInclTax;+ public double PriceInclTax => _orderItem.PriceInclTax;- public double PriceExclTax => _orderItem.PriceExclTax;+ public double PriceExclTax => _orderItem.PriceExclTax;- public double DiscountAmountInclTax => _orderItem.DiscountAmountInclTax;+ public double DiscountAmountInclTax => _orderItem.DiscountAmountInclTax;- public double DiscountAmountExclTax => _orderItem.DiscountAmountExclTax;+ public double DiscountAmountExclTax => _orderItem.DiscountAmountExclTax;- public double OriginalProductCost => _orderItem.OriginalProductCost;+ public double OriginalProductCost => _orderItem.OriginalProductCost;- public string AttributeDescription => _orderItem.AttributeDescription;+ public string AttributeDescription => _orderItem.AttributeDescription;- public int DownloadCount => _orderItem.DownloadCount;+ public int DownloadCount => _orderItem.DownloadCount;- public bool IsDownloadActivated => _orderItem.IsDownloadActivated;+ public bool IsDownloadActivated => _orderItem.IsDownloadActivated;- public string LicenseDownloadId => _orderItem.LicenseDownloadId;+ public string LicenseDownloadId => _orderItem.LicenseDownloadId;- public double? ItemWeight => _orderItem.ItemWeight;+ public double? ItemWeight => _orderItem.ItemWeight;- public double ProductWeight => _product.Weight;+ public double ProductWeight => _product.Weight;- public double ProductLength => _product.Length;+ public double ProductLength => _product.Length;- public double ProductWidth => _product.Width;+ public double ProductWidth => _product.Width;- public double ProductHeight => _product.Height;+ public double ProductHeight => _product.Height;- public double ProductCatalogPrice => _product.CatalogPrice;+ public double ProductCatalogPrice => _product.CatalogPrice;- public double ProductOldPrice => _product.OldPrice;+ public double ProductOldPrice => _product.OldPrice;- public string ProductFlag => _product.Flag;+ public string ProductFlag => _product.Flag;- public DateTime? RentalStartDateUtc => _orderItem.RentalStartDateUtc;+ public DateTime? RentalStartDateUtc => _orderItem.RentalStartDateUtc;- public DateTime? RentalEndDateUtc => _orderItem.RentalEndDateUtc;+ public DateTime? RentalEndDateUtc => _orderItem.RentalEndDateUtc;- public DateTime CreatedOnUtc => _orderItem.CreatedOnUtc;+ public DateTime CreatedOnUtc => _orderItem.CreatedOnUtc;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOutOfStockSubscription.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOutOfStockSubscription.csindex 8fcc1e64b..deb4f82e6 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOutOfStockSubscription.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidOutOfStockSubscription.cs@@ -3,36 +3,36 @@ using Grand.Domain.Catalog;using Grand.Domain.Localization;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidOutOfStockSubscription : Drop{- public class LiquidOutOfStockSubscription : Drop+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly OutOfStockSubscription _outOfStockSubscription;+ private readonly Product _product;+ private readonly Store _store;+ private readonly string url;++ public LiquidOutOfStockSubscription(Product product, OutOfStockSubscription outOfStockSubscription, Store store,+ DomainHost host, Language language){- private readonly OutOfStockSubscription _outOfStockSubscription;- private readonly Product _product;- private readonly Store _store;- private readonly DomainHost _host;- private readonly Language _language;- private readonly string url;-- public LiquidOutOfStockSubscription(Product product, OutOfStockSubscription outOfStockSubscription, Store store, DomainHost host, Language language)- {- _outOfStockSubscription = outOfStockSubscription;- _product = product;- _store = store;- _language = language;- _host = host;+ _outOfStockSubscription = outOfStockSubscription;+ _product = product;+ _store = store;+ _language = language;+ _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string ProductName => _product.Name;+ public string ProductName => _product.Name;- public string AttributeInfo => _outOfStockSubscription.AttributeInfo;+ public string AttributeInfo => _outOfStockSubscription.AttributeInfo;- public string ProductUrl => $"{url}/{_product.SeName}";+ public string ProductUrl => $"{url}/{_product.SeName}";- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProduct.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProduct.csindex 7978be4fd..bfc6fc8c8 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProduct.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProduct.cs@@ -4,64 +4,63 @@ using Grand.Domain.Catalog;using Grand.Domain.Localization;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidProduct : Drop{- public class LiquidProduct : Drop- {- private readonly Product _product;- private readonly Language _language;- private readonly Store _store;- private readonly DomainHost _host;- private readonly string url;+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly Product _product;+ private readonly Store _store;+ private readonly string url;- public LiquidProduct(Product product, Language language, Store store, DomainHost host)- {- _product = product;- _language = language;- _store = store;- _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));+ public LiquidProduct(Product product, Language language, Store store, DomainHost host)+ {+ _product = product;+ _language = language;+ _store = store;+ _host = host;+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Id => _product.Id;+ public string Id => _product.Id;- public string Name => _product.GetTranslation(x => x.Name, _language.Id);+ public string Name => _product.GetTranslation(x => x.Name, _language.Id);- public string ShortDescription => _product.GetTranslation(x => x.ShortDescription, _language.Id);+ public string ShortDescription => _product.GetTranslation(x => x.ShortDescription, _language.Id);- public string SKU => _product.Sku;+ public string SKU => _product.Sku;- public string ExternalId => _product.ExternalId;+ public string ExternalId => _product.ExternalId;- public string Mpn => _product.Mpn;+ public string Mpn => _product.Mpn;- public string Gtin => _product.Gtin;+ public string Gtin => _product.Gtin;- public double AdditionalShippingCharge => _product.AdditionalShippingCharge;+ public double AdditionalShippingCharge => _product.AdditionalShippingCharge;- public int StockQuantity => _product.StockQuantity;+ public int StockQuantity => _product.StockQuantity;- public double Price => _product.Price;+ public double Price => _product.Price;- public double CatalogPrice => _product.CatalogPrice;+ public double CatalogPrice => _product.CatalogPrice;- public double OldPrice => _product.OldPrice;+ public double OldPrice => _product.OldPrice;- public string Flag => _product.Flag;+ public string Flag => _product.Flag;- public string ProductURLForCustomer => $"{url}/{_product.GetSeName(_language.Id)}";+ public string ProductURLForCustomer => $"{url}/{_product.GetSeName(_language.Id)}";- public double Weight => _product.Weight;+ public double Weight => _product.Weight;- public double Length => _product.Length;+ public double Length => _product.Length;- public double Width => _product.Width;+ public double Width => _product.Width;- public double Height => _product.Height;+ public double Height => _product.Height;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProductReview.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProductReview.csindex f999bde74..c311e678a 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProductReview.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidProductReview.cs@@ -1,24 +1,23 @@using DotLiquid;using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidProductReview : Drop{- public class LiquidProductReview : Drop- {- private readonly ProductReview _productReview;- private readonly Product _product;+ private readonly Product _product;+ private readonly ProductReview _productReview;- public LiquidProductReview(Product product, ProductReview productReview)- {- _productReview = productReview;- _product = product;- AdditionalTokens = new Dictionary<string, string>();- }+ public LiquidProductReview(Product product, ProductReview productReview)+ {+ _productReview = productReview;+ _product = product;+ AdditionalTokens = new Dictionary<string, string>();+ }- public string ProductName => _product.Name;+ public string ProductName => _product.Name;- public string ProductReviewReplyText => _productReview.ReplyText;+ public string ProductReviewReplyText => _productReview.ReplyText;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipment.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipment.csindex 11a0beb23..ffb36fe65 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipment.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipment.cs@@ -4,49 +4,46 @@ using Grand.Domain.Orders;using Grand.Domain.Shipping;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops-{- public class LiquidShipment : Drop- {- private readonly Shipment _shipment;- private readonly Order _order;- private readonly Store _store;- private readonly Language _language;- private readonly DomainHost _host;- private readonly string url;-- private ICollection<LiquidShipmentItem> _shipmentItems;+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;+public class LiquidShipment : Drop+{+ private readonly DomainHost _host;+ private readonly Language _language;+ private readonly Order _order;+ private readonly Shipment _shipment;+ private readonly Store _store;+ private readonly string url;- public LiquidShipment(Shipment shipment, Order order, Store store, DomainHost host, Language language)- {- _shipment = shipment;- _language = language;- _store = store;- _order = order;- _host = host;- url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));- _shipmentItems = new List<LiquidShipmentItem>();- AdditionalTokens = new Dictionary<string, string>();- }+ public LiquidShipment(Shipment shipment, Order order, Store store, DomainHost host, Language language)+ {+ _shipment = shipment;+ _language = language;+ _store = store;+ _order = order;+ _host = host;+ url = _host?.Url.Trim('/') ?? (_store.SslEnabled ? _store.SecureUrl.Trim('/') : _store.Url.Trim('/'));++ ShipmentItems = new List<LiquidShipmentItem>();+ AdditionalTokens = new Dictionary<string, string>();+ }- public ICollection<LiquidShipmentItem> ShipmentItems => _shipmentItems;+ public ICollection<LiquidShipmentItem> ShipmentItems { get; }- public string ShipmentNumber => _shipment.ShipmentNumber.ToString();+ public string ShipmentNumber => _shipment.ShipmentNumber.ToString();- public string TrackingNumber => _shipment.TrackingNumber;+ public string TrackingNumber => _shipment.TrackingNumber;- public DateTime? ShippedDateUtc => _shipment.ShippedDateUtc;+ public DateTime? ShippedDateUtc => _shipment.ShippedDateUtc;- public DateTime? DeliveryDateUtc => _shipment.DeliveryDateUtc;+ public DateTime? DeliveryDateUtc => _shipment.DeliveryDateUtc;- public DateTime CreatedOnUtc => _shipment.CreatedOnUtc;+ public DateTime CreatedOnUtc => _shipment.CreatedOnUtc;- public string AdminComment => _shipment.AdminComment;+ public string AdminComment => _shipment.AdminComment;- public string URLForCustomer => $"{url}/orderdetails/shipment/{_shipment.Id}";+ public string URLForCustomer => $"{url}/orderdetails/shipment/{_shipment.Id}";- public IDictionary<string, string> AdditionalTokens { get; set; }- }-}+ public IDictionary<string, string> AdditionalTokens { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipmentItem.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipmentItem.csindex 286a9efde..82ca409d6 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipmentItem.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShipmentItem.cs@@ -5,64 +5,64 @@ using Grand.Domain.Orders;using Grand.Domain.Shipping;using System.Net;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidShipmentItem : Drop{- public class LiquidShipmentItem : Drop+ private readonly Language _language;+ private readonly Order _order;+ private readonly OrderItem _orderItem;+ private readonly Product _product;+ private readonly Shipment _shipment;+ private readonly ShipmentItem _shipmentItem;++ public LiquidShipmentItem(ShipmentItem shipmentItem, Shipment shipment, Order order, OrderItem orderItem,+ Product product, Language language){- private readonly ShipmentItem _shipmentItem;- private readonly Shipment _shipment;- private readonly Product _product;- private readonly Order _order;- private readonly OrderItem _orderItem;- private readonly Language _language;-- public LiquidShipmentItem(ShipmentItem shipmentItem, Shipment shipment, Order order, OrderItem orderItem, Product product, Language language)- {- _shipmentItem = shipmentItem;- _language = language;- _shipment = shipment;- _order = order;- _orderItem = orderItem;- _product = product;-- AdditionalTokens = new Dictionary<string, string>();- }+ _shipmentItem = shipmentItem;+ _language = language;+ _shipment = shipment;+ _order = order;+ _orderItem = orderItem;+ _product = product;++ AdditionalTokens = new Dictionary<string, string>();+ }- public bool ShowSkuOnProductDetailsPage { get; set; }+ public bool ShowSkuOnProductDetailsPage { get; set; }- public string ProductName {- get {- var name = "";- if (_product != null)- name = WebUtility.HtmlEncode(_product.Name);+ public string ProductName {+ get {+ var name = "";+ if (_product != null)+ name = WebUtility.HtmlEncode(_product.Name);- return name;- }+ return name;}+ }- public string ProductSku => _orderItem.Sku;+ public string ProductSku => _orderItem.Sku;- public string AttributeDescription {- get {- var attDesc = "";+ public string AttributeDescription {+ get {+ var attDesc = "";- if (_orderItem != null)- attDesc = _orderItem.AttributeDescription;+ if (_orderItem != null)+ attDesc = _orderItem.AttributeDescription;- return attDesc;- }+ return attDesc;}+ }- public string ShipmentId => _shipment.Id;+ public string ShipmentId => _shipment.Id;- public string OrderItemId => _shipmentItem.OrderItemId;+ public string OrderItemId => _shipmentItem.OrderItemId;- public string ProductId => _shipmentItem.ProductId;+ public string ProductId => _shipmentItem.ProductId;- public int Quantity => _shipmentItem.Quantity;+ public int Quantity => _shipmentItem.Quantity;- public string WarehouseId => _shipmentItem.WarehouseId;+ public string WarehouseId => _shipmentItem.WarehouseId;- public IDictionary<string, string> AdditionalTokens { get; set; }- }-}+ public IDictionary<string, string> AdditionalTokens { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCart.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCart.csindex 9c638e6e7..1a5599f80 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCart.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCart.cs@@ -2,31 +2,30 @@using Grand.Domain.Common;using Grand.Domain.Customers;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidShoppingCart : Drop{- public class LiquidShoppingCart : Drop+ private readonly Customer _customer;++ public LiquidShoppingCart(Customer customer){- private ICollection<LiquidShoppingCartItem> _items;- private readonly Customer _customer;+ _customer = customer;+ Items = new List<LiquidShoppingCartItem>();+ AdditionalTokens = new Dictionary<string, string>();+ }- public LiquidShoppingCart(Customer customer)- {- _customer = customer;- _items = new List<LiquidShoppingCartItem>();- AdditionalTokens = new Dictionary<string, string>();- }- public string Email => _customer.Email;+ public string Email => _customer.Email;- public string Username => _customer.Username;+ public string Username => _customer.Username;- public string FullName => _customer.GetFullName();+ public string FullName => _customer.GetFullName();- public string FirstName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.FirstName);+ public string FirstName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.FirstName);- public string LastName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.LastName);+ public string LastName => _customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.LastName);- public ICollection<LiquidShoppingCartItem> Items => _items;+ public ICollection<LiquidShoppingCartItem> Items { get; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCartItem.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCartItem.csindex f3613960a..6713f976d 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCartItem.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidShoppingCartItem.cs@@ -5,88 +5,78 @@ using Grand.Domain.Localization;using Grand.Domain.Orders;using System.Net;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidShoppingCartItem : Drop{- public class LiquidShoppingCartItem : Drop+ private readonly Language _language;+ private readonly Product _product;+ private readonly ShoppingCartItem _shoppingCartItem;++ public LiquidShoppingCartItem(Product product,+ string attributeDescription,+ string pictureUrl,+ ShoppingCartItem shoppingCartItem,+ Language language){- private readonly Product _product;- private readonly Language _language;- private readonly string _attributeDescription;- private readonly string _pictureUrl;- private readonly ShoppingCartItem _shoppingCartItem;-- public LiquidShoppingCartItem(Product product,- string attributeDescription,- string pictureUrl,- ShoppingCartItem shoppingCartItem,- Language language)- {- _language = language;- _product = product;- _attributeDescription = attributeDescription;- _pictureUrl = pictureUrl;- _shoppingCartItem = shoppingCartItem;- AdditionalTokens = new Dictionary<string, string>();- }+ _language = language;+ _product = product;+ AttributeDescription = attributeDescription;+ PictureUrl = pictureUrl;+ _shoppingCartItem = shoppingCartItem;+ AdditionalTokens = new Dictionary<string, string>();+ }- public string AttributeDescription => _attributeDescription;+ public string AttributeDescription { get; }- public string PictureUrl => _pictureUrl;+ public string PictureUrl { get; }- public int Quantity => _shoppingCartItem.Quantity;+ public int Quantity => _shoppingCartItem.Quantity;- public ShoppingCartType ShoppingCartType => _shoppingCartItem.ShoppingCartTypeId;+ public ShoppingCartType ShoppingCartType => _shoppingCartItem.ShoppingCartTypeId;- public string ProductName- {- get- {- var name = "";+ public string ProductName {+ get {+ var name = "";- if (_product != null)- name = WebUtility.HtmlEncode(_product.GetTranslation(x => x.Name, _language.Id));+ if (_product != null)+ name = WebUtility.HtmlEncode(_product.GetTranslation(x => x.Name, _language.Id));- return name;- }+ return name;}+ }- public string ProductSeName- {- get- {- var name = "";+ public string ProductSeName {+ get {+ var name = "";- if (_product != null)- name = _product.GetTranslation(x => x.SeName, _language.Id);- return name;- }+ if (_product != null)+ name = _product.GetTranslation(x => x.SeName, _language.Id);+ return name;}- public string ProductShortDescription- {- get- {- var desc = "";+ }- if (_product != null)- desc = WebUtility.HtmlEncode(_product.GetTranslation(x => x.ShortDescription, _language.Id));+ public string ProductShortDescription {+ get {+ var desc = "";- return desc;- }+ if (_product != null)+ desc = WebUtility.HtmlEncode(_product.GetTranslation(x => x.ShortDescription, _language.Id));++ return desc;}+ }- public string ProductFullDescription- {- get- {- var desc = "";+ public string ProductFullDescription {+ get {+ var desc = "";- if (_product != null)- desc = WebUtility.HtmlDecode(_product.GetTranslation(x => x.FullDescription, _language.Id));+ if (_product != null)+ desc = WebUtility.HtmlDecode(_product.GetTranslation(x => x.FullDescription, _language.Id));- return desc;- }+ return desc;}-- public IDictionary<string, string> AdditionalTokens { get; set; }}++ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidStore.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidStore.csindex 6ce81b2af..ab0b58356 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidStore.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidStore.cs@@ -3,65 +3,64 @@ using Grand.Domain.Localization;using Grand.Domain.Messages;using Grand.Domain.Stores;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidStore : Drop{- public class LiquidStore : Drop- {- private readonly Store _store;- private readonly EmailAccount _emailAccount;- private readonly Language _language;+ private readonly EmailAccount _emailAccount;+ private readonly Language _language;+ private readonly Store _store;- public LiquidStore(Store store, Language language, EmailAccount emailAccount = null)- {- _store = store;- _language = language;- _emailAccount = emailAccount;+ public LiquidStore(Store store, Language language, EmailAccount emailAccount = null)+ {+ _store = store;+ _language = language;+ _emailAccount = emailAccount;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Name => _store.Name;+ public string Name => _store.Name;- public string Shortcut => _store.Shortcut;+ public string Shortcut => _store.Shortcut;- public string URL => _store.SslEnabled ? _store.SecureUrl : _store.Url;+ public string URL => _store.SslEnabled ? _store.SecureUrl : _store.Url;- public string Email => _emailAccount.Email;+ public string Email => _emailAccount.Email;- public string CompanyName => _store.CompanyName;+ public string CompanyName => _store.CompanyName;- public string CompanyAddress => _store.CompanyAddress;+ public string CompanyAddress => _store.CompanyAddress;- public string CompanyPhoneNumber => _store.CompanyPhoneNumber;+ public string CompanyPhoneNumber => _store.CompanyPhoneNumber;- public string CompanyEmail => _store.CompanyEmail;+ public string CompanyEmail => _store.CompanyEmail;- public string CompanyHours => _store.CompanyHours;+ public string CompanyHours => _store.CompanyHours;- public string CompanyRegNo => _store.CompanyRegNo;+ public string CompanyRegNo => _store.CompanyRegNo;- public string CompanyVat => _store.CompanyVat;+ public string CompanyVat => _store.CompanyVat;- public string BankCode => _store.BankAccount?.BankCode;+ public string BankCode => _store.BankAccount?.BankCode;- public string BankName => _store.BankAccount?.BankName;+ public string BankName => _store.BankAccount?.BankName;- public string SwiftCode => _store.BankAccount?.SwiftCode;+ public string SwiftCode => _store.BankAccount?.SwiftCode;- public string AccountNumber => _store.BankAccount?.AccountNumber;+ public string AccountNumber => _store.BankAccount?.AccountNumber;- public string TwitterLink { get; set; }+ public string TwitterLink { get; set; }- public string FacebookLink { get; set; }+ public string FacebookLink { get; set; }- public string YoutubeLink { get; set; }+ public string YoutubeLink { get; set; }- public string InstagramLink { get; set; }+ public string InstagramLink { get; set; }- public string LinkedInLink { get; set; }+ public string LinkedInLink { get; set; }- public string PinterestLink { get; set; }+ public string PinterestLink { get; set; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVatValidationResult.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVatValidationResult.csindex 4f6837597..c4878d4ab 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVatValidationResult.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVatValidationResult.cs@@ -1,24 +1,20 @@using DotLiquid;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidVatValidationResult : Drop{- public class LiquidVatValidationResult : Drop+ public LiquidVatValidationResult(string name, string address){- private readonly string name;- private readonly string address;-- public LiquidVatValidationResult(string name, string address)- {- this.name = name;- this.address = address;+ Name = name;+ Address = address;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Name => name;+ public string Name { get; }- public string Address => address;+ public string Address { get; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendor.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendor.csindex 99a63d18b..be58bbd66 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendor.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendor.cs@@ -1,42 +1,41 @@using DotLiquid;using Grand.Domain.Vendors;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidVendor : Drop{- public class LiquidVendor : Drop- {- private readonly Vendor _vendor;+ private readonly Vendor _vendor;- public LiquidVendor(Vendor vendor)- {- _vendor = vendor;- AdditionalTokens = new Dictionary<string, string>();- }+ public LiquidVendor(Vendor vendor)+ {+ _vendor = vendor;+ AdditionalTokens = new Dictionary<string, string>();+ }- public string Name => _vendor.Name;+ public string Name => _vendor.Name;- public string Email => _vendor.Email;+ public string Email => _vendor.Email;- public string Description => _vendor.Description;+ public string Description => _vendor.Description;- public string Address1 => _vendor.Address?.Address1;+ public string Address1 => _vendor.Address?.Address1;- public string Address2 => _vendor.Address?.Address2;+ public string Address2 => _vendor.Address?.Address2;- public string City => _vendor.Address?.City;+ public string City => _vendor.Address?.City;- public string Company => _vendor.Address?.Company;+ public string Company => _vendor.Address?.Company;- public string FaxNumber => _vendor.Address?.FaxNumber;+ public string FaxNumber => _vendor.Address?.FaxNumber;- public string PhoneNumber => _vendor.Address?.PhoneNumber;+ public string PhoneNumber => _vendor.Address?.PhoneNumber;- public string ZipPostalCode => _vendor.Address?.ZipPostalCode;+ public string ZipPostalCode => _vendor.Address?.ZipPostalCode;- public string StateProvince { get; set; }+ public string StateProvince { get; set; }- public string Country { get; set; }+ public string Country { get; set; }- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendorReview.cs b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendorReview.csindex 79c86069c..c6d46a8ce 100644--- a/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendorReview.cs+++ b/src/Business/Grand.Business.Core/Utilities/Messages/DotLiquidDrops/LiquidVendorReview.cs@@ -1,26 +1,26 @@using DotLiquid;using Grand.Domain.Vendors;-namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops+namespace Grand.Business.Core.Utilities.Messages.DotLiquidDrops;++public class LiquidVendorReview : Drop{- public class LiquidVendorReview : Drop+ private readonly Vendor _vendor;+ private readonly VendorReview _vendorReview;++ public LiquidVendorReview(Vendor vendor, VendorReview vendorReview){- private readonly VendorReview _vendorReview;- private readonly Vendor _vendor;- public LiquidVendorReview(Vendor vendor, VendorReview vendorReview)- {- _vendorReview = vendorReview;- _vendor = vendor;+ _vendorReview = vendorReview;+ _vendor = vendor;- AdditionalTokens = new Dictionary<string, string>();- }+ AdditionalTokens = new Dictionary<string, string>();+ }- public string VendorName => _vendor.Name;+ public string VendorName => _vendor.Name;- public string Title => _vendorReview.Title;+ public string Title => _vendorReview.Title;- public string ReviewText => _vendorReview.ReviewText;+ public string ReviewText => _vendorReview.ReviewText;- public IDictionary<string, string> AdditionalTokens { get; set; }- }+ public IDictionary<string, string> AdditionalTokens { get; set; }}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/BestCustomerReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/BestCustomerReportLine.csindex d981edeab..18d1c0225 100644--- a/src/Business/Grand.Business.Core/Utilities/System/BestCustomerReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/BestCustomerReportLine.cs@@ -1,24 +1,22 @@-namespace Grand.Business.Core.Utilities.System-{+namespace Grand.Business.Core.Utilities.System;+/// <summary>+/// Represents a best customer report line+/// </summary>+public class BestCustomerReportLine+{/// <summary>- /// Represents a best customer report line+ /// Gets or sets the customer identifier/// </summary>- public class BestCustomerReportLine- {- /// <summary>- /// Gets or sets the customer identifier- /// </summary>- public string CustomerId { get; set; }+ public string CustomerId { get; set; }- /// <summary>- /// Gets or sets the order total- /// </summary>- public double OrderTotal { get; set; }+ /// <summary>+ /// Gets or sets the order total+ /// </summary>+ public double OrderTotal { get; set; }- /// <summary>- /// Gets or sets the order count- /// </summary>- public int OrderCount { get; set; }- }-}+ /// <summary>+ /// Gets or sets the order count+ /// </summary>+ public int OrderCount { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/BestsellersReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/BestsellersReportLine.csindex ce5e48f81..f05f45eb5 100644--- a/src/Business/Grand.Business.Core/Utilities/System/BestsellersReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/BestsellersReportLine.cs@@ -1,25 +1,23 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++/// <summary>+/// Represents a best sellers report line+/// </summary>+[Serializable]+public class BestsellersReportLine{/// <summary>- /// Represents a best sellers report line+ /// Gets or sets the product identifier/// </summary>- [Serializable]- public class BestsellersReportLine- {- /// <summary>- /// Gets or sets the product identifier- /// </summary>- public string ProductId { get; set; }-- /// <summary>- /// Gets or sets the total amount- /// </summary>- public double TotalAmount { get; set; }+ public string ProductId { get; set; }- /// <summary>- /// Gets or sets the total quantity- /// </summary>- public int TotalQuantity { get; set; }+ /// <summary>+ /// Gets or sets the total amount+ /// </summary>+ public double TotalAmount { get; set; }- }-}+ /// <summary>+ /// Gets or sets the total quantity+ /// </summary>+ public int TotalQuantity { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/CustomerByTimeReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/CustomerByTimeReportLine.csindex 9fade6398..7a5b06acc 100644--- a/src/Business/Grand.Business.Core/Utilities/System/CustomerByTimeReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/CustomerByTimeReportLine.cs@@ -1,10 +1,8 @@-namespace Grand.Business.Core.Utilities.System-{- public class CustomerByTimeReportLine- {- public string Time { get; set; }+namespace Grand.Business.Core.Utilities.System;- public int Registered { get; set; }+public class CustomerByTimeReportLine+{+ public string Time { get; set; }- }-}+ public int Registered { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/DownloadUrl.cs b/src/Business/Grand.Business.Core/Utilities/System/DownloadUrl.csindex cb979aff1..7b49cbb42 100644--- a/src/Business/Grand.Business.Core/Utilities/System/DownloadUrl.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/DownloadUrl.cs@@ -1,19 +1,15 @@using System.Net.Http;-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++public static class DownloadUrl{- public static class DownloadUrl+ public static async Task<byte[]> DownloadFile(string url){- public static async Task<byte[]> DownloadFile(string url)- {- using var client = new HttpClient();- using var result = await client.GetAsync(url);- if (result.IsSuccessStatusCode)- {- return await result.Content.ReadAsByteArrayAsync();- }+ using var client = new HttpClient();+ using var result = await client.GetAsync(url);+ if (result.IsSuccessStatusCode) return await result.Content.ReadAsByteArrayAsync();- return null;- }+ return null;}-}+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/InstallationLanguage.cs b/src/Business/Grand.Business.Core/Utilities/System/InstallationLanguage.csindex 95e8d067e..3741b3a04 100644--- a/src/Business/Grand.Business.Core/Utilities/System/InstallationLanguage.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/InstallationLanguage.cs@@ -1,27 +1,26 @@-namespace Grand.Business.Core.Utilities.System-{- /// <summary>- /// Language class for installation process- /// </summary>- public class InstallationLanguage- {- public string Name { get; set; }- public string Code { get; set; }- public bool IsDefault { get; set; }- public bool IsRightToLeft { get; set; }+namespace Grand.Business.Core.Utilities.System;- public List<InstallationLocaleResource> Resources { get; protected set; } = new();- }+/// <summary>+/// Language class for installation process+/// </summary>+public class InstallationLanguage+{+ public string Name { get; set; }+ public string Code { get; set; }+ public bool IsDefault { get; set; }+ public bool IsRightToLeft { get; set; }- public class InstallationLocaleResource- {- public string Name { get; set; }- public string Value { get; set; }- }+ public List<InstallationLocaleResource> Resources { get; protected set; } = new();+}- public class InstallationCollation- {- public string Name { get; set; }- public string Value { get; set; }- }+public class InstallationLocaleResource+{+ public string Name { get; set; }+ public string Value { get; set; }}++public class InstallationCollation+{+ public string Name { get; set; }+ public string Value { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLine.csindex 8c2a7d39f..0da1c6935 100644--- a/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLine.cs@@ -1,28 +1,27 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++/// <summary>+/// Represents an order average report line+/// </summary>+public class OrderAverageReportLine{/// <summary>- /// Represents an order average report line+ /// Gets or sets the count/// </summary>- public class OrderAverageReportLine- {- /// <summary>- /// Gets or sets the count- /// </summary>- public int CountOrders { get; set; }+ public int CountOrders { get; set; }- /// <summary>- /// Gets or sets the shipping summary (excluding tax)- /// </summary>- public double SumShippingExclTax { get; set; }+ /// <summary>+ /// Gets or sets the shipping summary (excluding tax)+ /// </summary>+ public double SumShippingExclTax { get; set; }- /// <summary>- /// Gets or sets the tax summary- /// </summary>- public double SumTax { get; set; }+ /// <summary>+ /// Gets or sets the tax summary+ /// </summary>+ public double SumTax { get; set; }- /// <summary>- /// Gets or sets the order total summary- /// </summary>- public double SumOrders { get; set; }- }-}+ /// <summary>+ /// Gets or sets the order total summary+ /// </summary>+ public double SumOrders { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLineSummary.cs b/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLineSummary.csindex 18b4bbfc0..420da5cea 100644--- a/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLineSummary.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/OrderAverageReportLineSummary.cs@@ -1,63 +1,62 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++/// <summary>+/// Represents an order average report line summary+/// </summary>+public class OrderAverageReportLineSummary{/// <summary>- /// Represents an order average report line summary- /// </summary>- public class OrderAverageReportLineSummary- {- /// <summary>- /// Gets or sets the order status- /// </summary>- public int OrderStatus { get; set; }-- /// <summary>- /// Gets or sets the sum today total- /// </summary>- public double SumTodayOrders { get; set; }-- /// <summary>- /// Gets or sets the today count- /// </summary>- public int CountTodayOrders { get; set; }-- /// <summary>- /// Gets or sets the sum this week total- /// </summary>- public double SumThisWeekOrders { get; set; }-- /// <summary>- /// Gets or sets the this week count- /// </summary>- public int CountThisWeekOrders { get; set; }-- /// <summary>- /// Gets or sets the sum this month total- /// </summary>- public double SumThisMonthOrders { get; set; }-- /// <summary>- /// Gets or sets the this month count- /// </summary>- public int CountThisMonthOrders { get; set; }-- /// <summary>- /// Gets or sets the sum this year total- /// </summary>- public double SumThisYearOrders { get; set; }-- /// <summary>- /// Gets or sets the this year count- /// </summary>- public int CountThisYearOrders { get; set; }-- /// <summary>- /// Gets or sets the sum all time total- /// </summary>- public double SumAllTimeOrders { get; set; }-- /// <summary>- /// Gets or sets the all time count- /// </summary>- public int CountAllTimeOrders { get; set; }- }-}+ /// Gets or sets the order status+ /// </summary>+ public int OrderStatus { get; set; }++ /// <summary>+ /// Gets or sets the sum today total+ /// </summary>+ public double SumTodayOrders { get; set; }++ /// <summary>+ /// Gets or sets the today count+ /// </summary>+ public int CountTodayOrders { get; set; }++ /// <summary>+ /// Gets or sets the sum this week total+ /// </summary>+ public double SumThisWeekOrders { get; set; }++ /// <summary>+ /// Gets or sets the this week count+ /// </summary>+ public int CountThisWeekOrders { get; set; }++ /// <summary>+ /// Gets or sets the sum this month total+ /// </summary>+ public double SumThisMonthOrders { get; set; }++ /// <summary>+ /// Gets or sets the this month count+ /// </summary>+ public int CountThisMonthOrders { get; set; }++ /// <summary>+ /// Gets or sets the sum this year total+ /// </summary>+ public double SumThisYearOrders { get; set; }++ /// <summary>+ /// Gets or sets the this year count+ /// </summary>+ public int CountThisYearOrders { get; set; }++ /// <summary>+ /// Gets or sets the sum all time total+ /// </summary>+ public double SumAllTimeOrders { get; set; }++ /// <summary>+ /// Gets or sets the all time count+ /// </summary>+ public int CountAllTimeOrders { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/OrderByCountryReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/OrderByCountryReportLine.csindex 1f7ec95b0..d23e4e642 100644--- a/src/Business/Grand.Business.Core/Utilities/System/OrderByCountryReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/OrderByCountryReportLine.cs@@ -1,23 +1,22 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++/// <summary>+/// Represents an "order by country" report line+/// </summary>+public class OrderByCountryReportLine{/// <summary>- /// Represents an "order by country" report line+ /// Country identifier; null for un know country/// </summary>- public class OrderByCountryReportLine- {- /// <summary>- /// Country identifier; null for un know country- /// </summary>- public string CountryId { get; set; }+ public string CountryId { get; set; }- /// <summary>- /// Gets or sets the number of orders- /// </summary>- public int TotalOrders { get; set; }+ /// <summary>+ /// Gets or sets the number of orders+ /// </summary>+ public int TotalOrders { get; set; }- /// <summary>- /// Gets or sets the order total summary- /// </summary>- public double SumOrders { get; set; }- }-}+ /// <summary>+ /// Gets or sets the order total summary+ /// </summary>+ public double SumOrders { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/OrderByTimeReportLine.cs b/src/Business/Grand.Business.Core/Utilities/System/OrderByTimeReportLine.csindex e1b4736c6..9fe2902fa 100644--- a/src/Business/Grand.Business.Core/Utilities/System/OrderByTimeReportLine.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/OrderByTimeReportLine.cs@@ -1,14 +1,13 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++/// <summary>+/// Represents an "order by country" report line+/// </summary>+public class OrderByTimeReportLine{- /// <summary>- /// Represents an "order by country" report line- /// </summary>- public class OrderByTimeReportLine- {- public string Time { get; set; }+ public string Time { get; set; }- public int TotalOrders { get; set; }+ public int TotalOrders { get; set; }- public double SumOrders { get; set; }- }-}+ public double SumOrders { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/ProductsAttributeCombination.cs b/src/Business/Grand.Business.Core/Utilities/System/ProductsAttributeCombination.csindex 30a6014bf..f97b8e96e 100644--- a/src/Business/Grand.Business.Core/Utilities/System/ProductsAttributeCombination.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/ProductsAttributeCombination.cs@@ -1,9 +1,8 @@using Grand.Domain.Catalog;-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++public class ProductsAttributeCombination : ProductAttributeCombination{- public class ProductsAttributeCombination : ProductAttributeCombination- {- public string ProductId { get; set; }- }-}+ public string ProductId { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/ReportPeriodOrder.cs b/src/Business/Grand.Business.Core/Utilities/System/ReportPeriodOrder.csindex ef81690af..489452ff5 100644--- a/src/Business/Grand.Business.Core/Utilities/System/ReportPeriodOrder.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/ReportPeriodOrder.cs@@ -1,9 +1,8 @@-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++public class ReportPeriodOrder{- public class ReportPeriodOrder- {- public DateTime Date { get; set; }- public int Count { get; set; }- public double Amount { get; set; }- }-}+ public DateTime Date { get; set; }+ public int Count { get; set; }+ public double Amount { get; set; }+}\ No newline at end of filediff --git a/src/Business/Grand.Business.Core/Utilities/System/StandardAdminSiteMap.cs b/src/Business/Grand.Business.Core/Utilities/System/StandardAdminSiteMap.csindex 07122936b..6ed4abfa1 100644--- a/src/Business/Grand.Business.Core/Utilities/System/StandardAdminSiteMap.cs+++ b/src/Business/Grand.Business.Core/Utilities/System/StandardAdminSiteMap.cs@@ -1,1190 +1,1189 @@using Grand.Business.Core.Utilities.Common.Security;using Grand.Domain.Admin;-namespace Grand.Business.Core.Utilities.System+namespace Grand.Business.Core.Utilities.System;++public static class StandardAdminSiteMap{- public static class StandardAdminSiteMap- {- public static readonly List<AdminSiteMap> SiteMap = [- new() {- SystemName = "Dashboard",- ResourceName = "Admin.Dashboard",- ControllerName = "Home",- ActionName = "Index",- IconClass = "icon-home",- DisplayOrder = 0,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Dashboard",- ResourceName = "Admin.Dashboard",- ControllerName = "Home",- ActionName = "Index",- DisplayOrder = 0,- IconClass = "icon-bar-chart"- },- new() {- SystemName = "Dashboard",- ResourceName = "Admin.Dashboard.Statistics",- ControllerName = "Home",- ActionName = "Statistics",- DisplayOrder = 1,- PermissionNames = new List<string> { PermissionSystemName.Reports },- IconClass = "icon-bulb"- },- new() {- SystemName = "Shopping carts and wishlists",- ResourceName = "Admin.Dashboards.CurrentCartWishlists",- PermissionNames = new List<string> { PermissionSystemName.CurrentCarts },- ControllerName = "ShoppingCart",- ActionName = "CurrentCarts",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Online customers",- ResourceName = "Admin.Dashboards.OnlineCustomers",- PermissionNames = new List<string> { PermissionSystemName.Customers },- ControllerName = "OnlineCustomer",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- }+ public static readonly List<AdminSiteMap> SiteMap = [+ new AdminSiteMap {+ SystemName = "Dashboard",+ ResourceName = "Admin.Dashboard",+ ControllerName = "Home",+ ActionName = "Index",+ IconClass = "icon-home",+ DisplayOrder = 0,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Dashboard",+ ResourceName = "Admin.Dashboard",+ ControllerName = "Home",+ ActionName = "Index",+ DisplayOrder = 0,+ IconClass = "icon-bar-chart"+ },+ new() {+ SystemName = "Dashboard",+ ResourceName = "Admin.Dashboard.Statistics",+ ControllerName = "Home",+ ActionName = "Statistics",+ DisplayOrder = 1,+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ IconClass = "icon-bulb"+ },+ new() {+ SystemName = "Shopping carts and wishlists",+ ResourceName = "Admin.Dashboards.CurrentCartWishlists",+ PermissionNames = new List<string> { PermissionSystemName.CurrentCarts },+ ControllerName = "ShoppingCart",+ ActionName = "CurrentCarts",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Online customers",+ ResourceName = "Admin.Dashboards.OnlineCustomers",+ PermissionNames = new List<string> { PermissionSystemName.Customers },+ ControllerName = "OnlineCustomer",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"}- },+ }+ },- new() {- SystemName = "Catalog",- ResourceName = "Admin.Catalog",- PermissionNames = new List<string> {- PermissionSystemName.Products, PermissionSystemName.Categories, PermissionSystemName.Brands,- PermissionSystemName.Collections, PermissionSystemName.ProductReviews,- PermissionSystemName.ProductTags,- PermissionSystemName.ProductAttributes, PermissionSystemName.SpecificationAttributes- },- IconClass = "fa fa-sitemap",- DisplayOrder = 1,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Products",- ResourceName = "Admin.Catalog.Products.Manage",- PermissionNames = new List<string> { PermissionSystemName.Products },- ControllerName = "Product",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Categories",- ResourceName = "Admin.Catalog.Categories",- ControllerName = "Category",- PermissionNames = new List<string> { PermissionSystemName.Categories },- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Brands",- ResourceName = "Admin.Catalog.Brands",- ControllerName = "Brand",- PermissionNames = new List<string> { PermissionSystemName.Brands },- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Collections",- ResourceName = "Admin.Catalog.Collections",- PermissionNames = new List<string> { PermissionSystemName.Collections },- ControllerName = "Collection",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Product tags",- ResourceName = "Admin.Catalog.ProductTags",- PermissionNames = new List<string> { PermissionSystemName.ProductTags },- ControllerName = "ProductTags",- ActionName = "List",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Bulk edit products",- ResourceName = "Admin.Catalog.BulkEdit",- PermissionNames = new List<string> { PermissionSystemName.Products },- ControllerName = "Product",- ActionName = "BulkEdit",- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Product reviews",- ResourceName = "Admin.Catalog.ProductReviews",- PermissionNames = new List<string> { PermissionSystemName.ProductReviews },- ControllerName = "ProductReview",- ActionName = "List",- DisplayOrder = 6,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Products attributes",- ResourceName = "Admin.Catalog.Attributes.ProductAttributes",- ControllerName = "ProductAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.ProductAttributes },- DisplayOrder = 7,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Specification attributes",- ResourceName = "Admin.Catalog.Attributes.SpecificationAttributes",- ControllerName = "SpecificationAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.SpecificationAttributes },- DisplayOrder = 8,- IconClass = "fa fa-dot-circle-o"- }- }+ new AdminSiteMap {+ SystemName = "Catalog",+ ResourceName = "Admin.Catalog",+ PermissionNames = new List<string> {+ PermissionSystemName.Products, PermissionSystemName.Categories, PermissionSystemName.Brands,+ PermissionSystemName.Collections, PermissionSystemName.ProductReviews,+ PermissionSystemName.ProductTags,+ PermissionSystemName.ProductAttributes, PermissionSystemName.SpecificationAttributes},-- new() {- SystemName = "Sales",- ResourceName = "Admin.Sales",- PermissionNames = new List<string> {- PermissionSystemName.Orders, PermissionSystemName.Shipments,- PermissionSystemName.MerchandiseReturns, PermissionSystemName.PaymentTransactions,- PermissionSystemName.OrderTags,- PermissionSystemName.OrderStatus, PermissionSystemName.CheckoutAttributes- },- IconClass = "icon-basket",- DisplayOrder = 2,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Orders",- ResourceName = "Admin.Orders",- PermissionNames = new List<string> { PermissionSystemName.Orders },- ControllerName = "Order",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Shipments",- ResourceName = "Admin.Orders.Shipments.List",- PermissionNames = new List<string> { PermissionSystemName.Shipments },- ControllerName = "Shipment",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Merchandise returns",- ResourceName = "Admin.Orders.MerchandiseReturns",- PermissionNames = new List<string> { PermissionSystemName.MerchandiseReturns },- ControllerName = "MerchandiseReturn",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Payment transaction",- ResourceName = "Admin.Orders.PaymentTransaction",- PermissionNames = new List<string> { PermissionSystemName.PaymentTransactions },- ControllerName = "PaymentTransaction",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "OrderTags",- ResourceName = "Admin.Orders.OrderTags",- PermissionNames = new List<string> { PermissionSystemName.OrderTags },- ControllerName = "OrderTags",- ActionName = "List",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Checkout attributes",- ResourceName = "Admin.Orders.CheckoutAttributes",- ControllerName = "CheckoutAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.CheckoutAttributes },- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Order status",- ResourceName = "Admin.Orders.OrderStatus",- ControllerName = "OrderStatus",- PermissionNames = new List<string> { PermissionSystemName.OrderStatus },- ActionName = "Index",- DisplayOrder = 6,- IconClass = "fa fa-dot-circle-o"- }+ IconClass = "fa fa-sitemap",+ DisplayOrder = 1,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Products",+ ResourceName = "Admin.Catalog.Products.Manage",+ PermissionNames = new List<string> { PermissionSystemName.Products },+ ControllerName = "Product",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Categories",+ ResourceName = "Admin.Catalog.Categories",+ ControllerName = "Category",+ PermissionNames = new List<string> { PermissionSystemName.Categories },+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Brands",+ ResourceName = "Admin.Catalog.Brands",+ ControllerName = "Brand",+ PermissionNames = new List<string> { PermissionSystemName.Brands },+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Collections",+ ResourceName = "Admin.Catalog.Collections",+ PermissionNames = new List<string> { PermissionSystemName.Collections },+ ControllerName = "Collection",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Product tags",+ ResourceName = "Admin.Catalog.ProductTags",+ PermissionNames = new List<string> { PermissionSystemName.ProductTags },+ ControllerName = "ProductTags",+ ActionName = "List",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Bulk edit products",+ ResourceName = "Admin.Catalog.BulkEdit",+ PermissionNames = new List<string> { PermissionSystemName.Products },+ ControllerName = "Product",+ ActionName = "BulkEdit",+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Product reviews",+ ResourceName = "Admin.Catalog.ProductReviews",+ PermissionNames = new List<string> { PermissionSystemName.ProductReviews },+ ControllerName = "ProductReview",+ ActionName = "List",+ DisplayOrder = 6,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Products attributes",+ ResourceName = "Admin.Catalog.Attributes.ProductAttributes",+ ControllerName = "ProductAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.ProductAttributes },+ DisplayOrder = 7,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Specification attributes",+ ResourceName = "Admin.Catalog.Attributes.SpecificationAttributes",+ ControllerName = "SpecificationAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.SpecificationAttributes },+ DisplayOrder = 8,+ IconClass = "fa fa-dot-circle-o"}- },+ }+ },- new() {- SystemName = "Customers",- ResourceName = "Admin.Customers",- PermissionNames = new List<string> {- PermissionSystemName.Customers, PermissionSystemName.Vendors, PermissionSystemName.VendorReviews,- PermissionSystemName.CustomerTags, PermissionSystemName.CustomerGroups,- PermissionSystemName.SalesEmployees- },- IconClass = "icon-users",- DisplayOrder = 3,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Customers",- ResourceName = "Admin.Customers.Customers",- PermissionNames = new List<string> { PermissionSystemName.Customers },- ControllerName = "Customer",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Customer groups",- ResourceName = "Admin.Customers.CustomerGroups",- PermissionNames = new List<string> { PermissionSystemName.CustomerGroups },- ControllerName = "CustomerGroup",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Customer tags",- ResourceName = "Admin.Customers.CustomerTags",- PermissionNames = new List<string> { PermissionSystemName.CustomerTags },- ControllerName = "CustomerTag",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Vendors",- ResourceName = "Admin.Vendors",- PermissionNames = new List<string> { PermissionSystemName.Vendors },- ControllerName = "Vendor",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Vendor reviews",- ResourceName = "Admin.VendorReviews",- PermissionNames = new List<string> { PermissionSystemName.VendorReviews },- ControllerName = "VendorReview",- ActionName = "List",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Sales employee",- ResourceName = "Admin.Customers.SalesEmployees",- PermissionNames = new List<string> { PermissionSystemName.SalesEmployees },- ControllerName = "SalesEmployee",- ActionName = "Index",- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Customer attributes",- ResourceName = "Admin.Customers.Attributes.Customer",- ControllerName = "CustomerAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.CustomerAttributes },- DisplayOrder = 6,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Address attributes",- ResourceName = "Admin.Customers.Attributes.Address",- ControllerName = "AddressAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.AddressAttributes },- DisplayOrder = 7,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Sales",+ ResourceName = "Admin.Sales",+ PermissionNames = new List<string> {+ PermissionSystemName.Orders, PermissionSystemName.Shipments,+ PermissionSystemName.MerchandiseReturns, PermissionSystemName.PaymentTransactions,+ PermissionSystemName.OrderTags,+ PermissionSystemName.OrderStatus, PermissionSystemName.CheckoutAttributes+ },+ IconClass = "icon-basket",+ DisplayOrder = 2,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Orders",+ ResourceName = "Admin.Orders",+ PermissionNames = new List<string> { PermissionSystemName.Orders },+ ControllerName = "Order",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Shipments",+ ResourceName = "Admin.Orders.Shipments.List",+ PermissionNames = new List<string> { PermissionSystemName.Shipments },+ ControllerName = "Shipment",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Merchandise returns",+ ResourceName = "Admin.Orders.MerchandiseReturns",+ PermissionNames = new List<string> { PermissionSystemName.MerchandiseReturns },+ ControllerName = "MerchandiseReturn",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Payment transaction",+ ResourceName = "Admin.Orders.PaymentTransaction",+ PermissionNames = new List<string> { PermissionSystemName.PaymentTransactions },+ ControllerName = "PaymentTransaction",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "OrderTags",+ ResourceName = "Admin.Orders.OrderTags",+ PermissionNames = new List<string> { PermissionSystemName.OrderTags },+ ControllerName = "OrderTags",+ ActionName = "List",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Checkout attributes",+ ResourceName = "Admin.Orders.CheckoutAttributes",+ ControllerName = "CheckoutAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.CheckoutAttributes },+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Order status",+ ResourceName = "Admin.Orders.OrderStatus",+ ControllerName = "OrderStatus",+ PermissionNames = new List<string> { PermissionSystemName.OrderStatus },+ ActionName = "Index",+ DisplayOrder = 6,+ IconClass = "fa fa-dot-circle-o"}+ }+ },++ new AdminSiteMap {+ SystemName = "Customers",+ ResourceName = "Admin.Customers",+ PermissionNames = new List<string> {+ PermissionSystemName.Customers, PermissionSystemName.Vendors, PermissionSystemName.VendorReviews,+ PermissionSystemName.CustomerTags, PermissionSystemName.CustomerGroups,+ PermissionSystemName.SalesEmployees},+ IconClass = "icon-users",+ DisplayOrder = 3,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Customers",+ ResourceName = "Admin.Customers.Customers",+ PermissionNames = new List<string> { PermissionSystemName.Customers },+ ControllerName = "Customer",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Customer groups",+ ResourceName = "Admin.Customers.CustomerGroups",+ PermissionNames = new List<string> { PermissionSystemName.CustomerGroups },+ ControllerName = "CustomerGroup",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Customer tags",+ ResourceName = "Admin.Customers.CustomerTags",+ PermissionNames = new List<string> { PermissionSystemName.CustomerTags },+ ControllerName = "CustomerTag",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Vendors",+ ResourceName = "Admin.Vendors",+ PermissionNames = new List<string> { PermissionSystemName.Vendors },+ ControllerName = "Vendor",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Vendor reviews",+ ResourceName = "Admin.VendorReviews",+ PermissionNames = new List<string> { PermissionSystemName.VendorReviews },+ ControllerName = "VendorReview",+ ActionName = "List",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Sales employee",+ ResourceName = "Admin.Customers.SalesEmployees",+ PermissionNames = new List<string> { PermissionSystemName.SalesEmployees },+ ControllerName = "SalesEmployee",+ ActionName = "Index",+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Customer attributes",+ ResourceName = "Admin.Customers.Attributes.Customer",+ ControllerName = "CustomerAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.CustomerAttributes },+ DisplayOrder = 6,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Address attributes",+ ResourceName = "Admin.Customers.Attributes.Address",+ ControllerName = "AddressAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.AddressAttributes },+ DisplayOrder = 7,+ IconClass = "fa fa-dot-circle-o"+ }+ }+ },- new() {- SystemName = "Marketing",- ResourceName = "Admin.Marketing",- PermissionNames = new List<string> {- PermissionSystemName.Affiliates, PermissionSystemName.NewsletterCategories,- PermissionSystemName.NewsletterSubscribers,- PermissionSystemName.Campaigns, PermissionSystemName.Discounts,- PermissionSystemName.PushNotifications,- PermissionSystemName.Affiliates, PermissionSystemName.Documents, PermissionSystemName.GiftVouchers,- PermissionSystemName.ContactAttributes- },- IconClass = "icon-bulb",- DisplayOrder = 4,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Discounts",- ResourceName = "Admin.Marketing.Discounts",- PermissionNames = new List<string> { PermissionSystemName.Discounts },- ControllerName = "Discount",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Gift vouchers",- ResourceName = "Admin.GiftVouchers",- PermissionNames = new List<string> { PermissionSystemName.GiftVouchers },- ControllerName = "GiftVoucher",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Affiliates",- ResourceName = "Admin.Affiliates",- PermissionNames = new List<string> { PermissionSystemName.Affiliates },- ControllerName = "Affiliate",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Contact attributes",- ResourceName = "Admin.Catalog.Attributes.ContactAttributes",- ControllerName = "ContactAttribute",- ActionName = "List",- PermissionNames = new List<string> { PermissionSystemName.ContactAttributes },- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Newsletter",- ResourceName = "Admin.Marketing.Newsletter",- PermissionNames = new List<string>- { PermissionSystemName.Campaigns, PermissionSystemName.NewsletterSubscribers },- IconClass = "fa fa-dot-circle-o",- DisplayOrder = 5,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Campaigns",- ResourceName = "Admin.Marketing.Campaigns",- PermissionNames = new List<string> { PermissionSystemName.Campaigns },- ControllerName = "Campaign",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Newsletter categories",- ResourceName = "Admin.Marketing.NewsletterCategory",- PermissionNames = new List<string> { PermissionSystemName.NewsletterCategories },- ControllerName = "NewsletterCategory",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Newsletter subscriptions",- ResourceName = "Admin.Marketing.NewsletterSubscriptions",- PermissionNames = new List<string> { PermissionSystemName.NewsletterSubscribers },- ControllerName = "NewsLetterSubscription",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Marketing",+ ResourceName = "Admin.Marketing",+ PermissionNames = new List<string> {+ PermissionSystemName.Affiliates, PermissionSystemName.NewsletterCategories,+ PermissionSystemName.NewsletterSubscribers,+ PermissionSystemName.Campaigns, PermissionSystemName.Discounts,+ PermissionSystemName.PushNotifications,+ PermissionSystemName.Affiliates, PermissionSystemName.Documents, PermissionSystemName.GiftVouchers,+ PermissionSystemName.ContactAttributes+ },+ IconClass = "icon-bulb",+ DisplayOrder = 4,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Discounts",+ ResourceName = "Admin.Marketing.Discounts",+ PermissionNames = new List<string> { PermissionSystemName.Discounts },+ ControllerName = "Discount",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Gift vouchers",+ ResourceName = "Admin.GiftVouchers",+ PermissionNames = new List<string> { PermissionSystemName.GiftVouchers },+ ControllerName = "GiftVoucher",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Affiliates",+ ResourceName = "Admin.Affiliates",+ PermissionNames = new List<string> { PermissionSystemName.Affiliates },+ ControllerName = "Affiliate",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Contact attributes",+ ResourceName = "Admin.Catalog.Attributes.ContactAttributes",+ ControllerName = "ContactAttribute",+ ActionName = "List",+ PermissionNames = new List<string> { PermissionSystemName.ContactAttributes },+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Newsletter",+ ResourceName = "Admin.Marketing.Newsletter",+ PermissionNames = new List<string>+ { PermissionSystemName.Campaigns, PermissionSystemName.NewsletterSubscribers },+ IconClass = "fa fa-dot-circle-o",+ DisplayOrder = 5,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Campaigns",+ ResourceName = "Admin.Marketing.Campaigns",+ PermissionNames = new List<string> { PermissionSystemName.Campaigns },+ ControllerName = "Campaign",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Newsletter categories",+ ResourceName = "Admin.Marketing.NewsletterCategory",+ PermissionNames = new List<string> { PermissionSystemName.NewsletterCategories },+ ControllerName = "NewsletterCategory",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Newsletter subscriptions",+ ResourceName = "Admin.Marketing.NewsletterSubscriptions",+ PermissionNames = new List<string> { PermissionSystemName.NewsletterSubscribers },+ ControllerName = "NewsLetterSubscription",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "PushNotifications",- ResourceName = "Admin.PushNotifications",- PermissionNames = new List<string> { PermissionSystemName.PushNotifications },- ControllerName = "PushNotifications",- IconClass = "fa fa-dot-circle-o",- DisplayOrder = 7,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "PushNotifications",- ResourceName = "Admin.PushNotifications.Send",- PermissionNames = new List<string> { PermissionSystemName.PushNotifications },- ControllerName = "PushNotifications",- ActionName = "Send",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "PushNotifications",- ResourceName = "Admin.PushNotifications.Messages",- PermissionNames = new List<string> { PermissionSystemName.PushNotifications },- ControllerName = "PushNotifications",- ActionName = "Messages",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "PushNotifications",- ResourceName = "Admin.PushNotifications.Receivers",- PermissionNames = new List<string> { PermissionSystemName.PushNotifications },- ControllerName = "PushNotifications",- ActionName = "Receivers",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "PushNotifications",+ ResourceName = "Admin.PushNotifications",+ PermissionNames = new List<string> { PermissionSystemName.PushNotifications },+ ControllerName = "PushNotifications",+ IconClass = "fa fa-dot-circle-o",+ DisplayOrder = 7,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "PushNotifications",+ ResourceName = "Admin.PushNotifications.Send",+ PermissionNames = new List<string> { PermissionSystemName.PushNotifications },+ ControllerName = "PushNotifications",+ ActionName = "Send",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "PushNotifications",+ ResourceName = "Admin.PushNotifications.Messages",+ PermissionNames = new List<string> { PermissionSystemName.PushNotifications },+ ControllerName = "PushNotifications",+ ActionName = "Messages",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "PushNotifications",+ ResourceName = "Admin.PushNotifications.Receivers",+ PermissionNames = new List<string> { PermissionSystemName.PushNotifications },+ ControllerName = "PushNotifications",+ ActionName = "Receivers",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "Documents",- ResourceName = "Admin.Marketing.Documents",- PermissionNames = new List<string> { PermissionSystemName.Documents },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 8,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Document types",- ResourceName = "Admin.Marketing.Document.Type",- ControllerName = "Document",- ActionName = "Types",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Document list",- ResourceName = "Admin.Marketing.Document.List",- ControllerName = "Document",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "Documents",+ ResourceName = "Admin.Marketing.Documents",+ PermissionNames = new List<string> { PermissionSystemName.Documents },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 8,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Document types",+ ResourceName = "Admin.Marketing.Document.Type",+ ControllerName = "Document",+ ActionName = "Types",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Document list",+ ResourceName = "Admin.Marketing.Document.List",+ ControllerName = "Document",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"}}}- },+ }+ },- new() {- SystemName = "Content",- ResourceName = "Admin.Content",- PermissionNames = new List<string> {- PermissionSystemName.News, PermissionSystemName.Blog,- PermissionSystemName.Pages, PermissionSystemName.MessageTemplates,- PermissionSystemName.Knowledgebase, PermissionSystemName.Courses- },- IconClass = "icon-layers",- DisplayOrder = 5,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Pages",- ResourceName = "Admin.Content.Pages",- PermissionNames = new List<string> { PermissionSystemName.Pages },- ControllerName = "Page",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Message templates",- ResourceName = "Admin.Content.MessageTemplates",- PermissionNames = new List<string> { PermissionSystemName.MessageTemplates },- ControllerName = "MessageTemplate",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Knowledgebase",- ResourceName = "Admin.Content.Knowledgebase",- PermissionNames = new List<string> { PermissionSystemName.Knowledgebase },- ControllerName = "Knowledgebase",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "News",- ResourceName = "Admin.Content.News",- PermissionNames = new List<string> { PermissionSystemName.News },- ControllerName = "News",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Blog",- ResourceName = "Admin.Content.Blog",- PermissionNames = new List<string> { PermissionSystemName.Blog },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 4,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Blog categories",- ResourceName = "Admin.Content.Blog.BlogCategories",- ControllerName = "Blog",- ActionName = "CategoryList",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Blog posts",- ResourceName = "Admin.Content.Blog.BlogPosts",- ControllerName = "Blog",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Blog comments",- ResourceName = "Admin.Content.Blog.Comments",- ControllerName = "Blog",- ActionName = "Comments",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Content",+ ResourceName = "Admin.Content",+ PermissionNames = new List<string> {+ PermissionSystemName.News, PermissionSystemName.Blog,+ PermissionSystemName.Pages, PermissionSystemName.MessageTemplates,+ PermissionSystemName.Knowledgebase, PermissionSystemName.Courses+ },+ IconClass = "icon-layers",+ DisplayOrder = 5,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Pages",+ ResourceName = "Admin.Content.Pages",+ PermissionNames = new List<string> { PermissionSystemName.Pages },+ ControllerName = "Page",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Message templates",+ ResourceName = "Admin.Content.MessageTemplates",+ PermissionNames = new List<string> { PermissionSystemName.MessageTemplates },+ ControllerName = "MessageTemplate",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Knowledgebase",+ ResourceName = "Admin.Content.Knowledgebase",+ PermissionNames = new List<string> { PermissionSystemName.Knowledgebase },+ ControllerName = "Knowledgebase",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "News",+ ResourceName = "Admin.Content.News",+ PermissionNames = new List<string> { PermissionSystemName.News },+ ControllerName = "News",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Blog",+ ResourceName = "Admin.Content.Blog",+ PermissionNames = new List<string> { PermissionSystemName.Blog },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 4,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Blog categories",+ ResourceName = "Admin.Content.Blog.BlogCategories",+ ControllerName = "Blog",+ ActionName = "CategoryList",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Blog posts",+ ResourceName = "Admin.Content.Blog.BlogPosts",+ ControllerName = "Blog",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Blog comments",+ ResourceName = "Admin.Content.Blog.Comments",+ ControllerName = "Blog",+ ActionName = "Comments",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "Course",- ResourceName = "Admin.Content.Course",- PermissionNames = new List<string> { PermissionSystemName.Courses },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 5,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Course level",- ResourceName = "Admin.Content.Course.Level",- ControllerName = "Course",- ActionName = "Level",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Manage courses",- ResourceName = "Admin.Content.Course.Manage",- ControllerName = "Course",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "Course",+ ResourceName = "Admin.Content.Course",+ PermissionNames = new List<string> { PermissionSystemName.Courses },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 5,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Course level",+ ResourceName = "Admin.Content.Course.Level",+ ControllerName = "Course",+ ActionName = "Level",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Manage courses",+ ResourceName = "Admin.Content.Course.Manage",+ ControllerName = "Course",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"}}}- },+ }+ },- new() {- SystemName = "Reports",- ResourceName = "Admin.Reports",- PermissionNames = new List<string> { PermissionSystemName.Reports },- IconClass = "icon-bar-chart",- DisplayOrder = 6,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Low stock report",- ResourceName = "Admin.Reports.LowStockReport",- PermissionNames = new List<string> { PermissionSystemName.Reports },- ControllerName = "Reports",- ActionName = "LowStockReport",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Bestsellers",- ResourceName = "Admin.Reports.Bestsellers",- PermissionNames = new List<string> { PermissionSystemName.Reports },- ControllerName = "Reports",- ActionName = "BestsellersReport",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Products never purchased",- ResourceName = "Admin.Reports.NeverSold",- PermissionNames = new List<string> { PermissionSystemName.Reports },- ControllerName = "Reports",- ActionName = "NeverSoldReport",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Country report",- ResourceName = "Admin.Reports.Country",- PermissionNames = new List<string> { PermissionSystemName.Reports },- AllPermissions = true,- ControllerName = "Reports",- ActionName = "CountryReport",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Customer reports",- ResourceName = "Admin.Reports.Customers",- PermissionNames = new List<string> { PermissionSystemName.Reports },- AllPermissions = true,- ControllerName = "Reports",- ActionName = "Customer",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Reports",+ ResourceName = "Admin.Reports",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ IconClass = "icon-bar-chart",+ DisplayOrder = 6,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Low stock report",+ ResourceName = "Admin.Reports.LowStockReport",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ ControllerName = "Reports",+ ActionName = "LowStockReport",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Bestsellers",+ ResourceName = "Admin.Reports.Bestsellers",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ ControllerName = "Reports",+ ActionName = "BestsellersReport",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Products never purchased",+ ResourceName = "Admin.Reports.NeverSold",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ ControllerName = "Reports",+ ActionName = "NeverSoldReport",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Country report",+ ResourceName = "Admin.Reports.Country",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ AllPermissions = true,+ ControllerName = "Reports",+ ActionName = "CountryReport",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Customer reports",+ ResourceName = "Admin.Reports.Customers",+ PermissionNames = new List<string> { PermissionSystemName.Reports },+ AllPermissions = true,+ ControllerName = "Reports",+ ActionName = "Customer",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"}- },+ }+ },- new() {- SystemName = "Configuration",- ResourceName = "Admin.Configuration",- PermissionNames = new List<string> {- PermissionSystemName.Countries, PermissionSystemName.Languages, PermissionSystemName.Settings,- PermissionSystemName.PaymentMethods, PermissionSystemName.ExternalAuthenticationMethods,- PermissionSystemName.TaxSettings, PermissionSystemName.ShippingSettings,- PermissionSystemName.Currencies, PermissionSystemName.Measures,- PermissionSystemName.Acl, PermissionSystemName.EmailAccounts, PermissionSystemName.Plugins,- PermissionSystemName.Widgets, PermissionSystemName.Stores, PermissionSystemName.Maintenance- },- IconClass = "icon-settings",- DisplayOrder = 7,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Stores",- ResourceName = "Admin.Configuration.Stores",- PermissionNames = new List<string> { PermissionSystemName.Stores },- ControllerName = "Store",- ActionName = "List",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Permissions",- ResourceName = "Admin.Configuration.Permissions",- PermissionNames = new List<string> { PermissionSystemName.Acl },- ControllerName = "Permission",- ActionName = "Index",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "EmailAccounts",- ResourceName = "Admin.Configuration.EmailAccounts",- PermissionNames = new List<string> { PermissionSystemName.EmailAccounts },- ControllerName = "EmailAccount",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Languages",- ResourceName = "Admin.Configuration.Languages",- PermissionNames = new List<string> { PermissionSystemName.Languages },- ControllerName = "Language",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Currencies",- ResourceName = "Admin.Configuration.Currencies",- PermissionNames = new List<string> { PermissionSystemName.Currencies },- ControllerName = "Currency",- ActionName = "List",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Countries",- ResourceName = "Admin.Configuration.Countries",- PermissionNames = new List<string> { PermissionSystemName.Countries },- ControllerName = "Country",- ActionName = "List",- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Search engine friendly names",- ResourceName = "Admin.Configuration.SeNames",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Maintenance",- ActionName = "SeNames",- DisplayOrder = 6,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Admin menu",- ResourceName = "Admin.Configuration.Menu",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Menu",- ActionName = "Index",- DisplayOrder = 7,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Payment",- ResourceName = "Admin.Configuration.Payment",- PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 8,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Payment methods",- ResourceName = "Admin.Configuration.Payment.Methods",- PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },- ControllerName = "Payment",- ActionName = "Index",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Payment settings",- ResourceName = "Admin.Configuration.Payment.Settings",- PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },- ControllerName = "Payment",- ActionName = "Settings",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Payment method restrictions",- ResourceName = "Admin.Configuration.Payment.MethodRestrictions",- PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },- ControllerName = "Payment",- ActionName = "MethodRestrictions",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Configuration",+ ResourceName = "Admin.Configuration",+ PermissionNames = new List<string> {+ PermissionSystemName.Countries, PermissionSystemName.Languages, PermissionSystemName.Settings,+ PermissionSystemName.PaymentMethods, PermissionSystemName.ExternalAuthenticationMethods,+ PermissionSystemName.TaxSettings, PermissionSystemName.ShippingSettings,+ PermissionSystemName.Currencies, PermissionSystemName.Measures,+ PermissionSystemName.Acl, PermissionSystemName.EmailAccounts, PermissionSystemName.Plugins,+ PermissionSystemName.Widgets, PermissionSystemName.Stores, PermissionSystemName.Maintenance+ },+ IconClass = "icon-settings",+ DisplayOrder = 7,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Stores",+ ResourceName = "Admin.Configuration.Stores",+ PermissionNames = new List<string> { PermissionSystemName.Stores },+ ControllerName = "Store",+ ActionName = "List",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Permissions",+ ResourceName = "Admin.Configuration.Permissions",+ PermissionNames = new List<string> { PermissionSystemName.Acl },+ ControllerName = "Permission",+ ActionName = "Index",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "EmailAccounts",+ ResourceName = "Admin.Configuration.EmailAccounts",+ PermissionNames = new List<string> { PermissionSystemName.EmailAccounts },+ ControllerName = "EmailAccount",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Languages",+ ResourceName = "Admin.Configuration.Languages",+ PermissionNames = new List<string> { PermissionSystemName.Languages },+ ControllerName = "Language",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Currencies",+ ResourceName = "Admin.Configuration.Currencies",+ PermissionNames = new List<string> { PermissionSystemName.Currencies },+ ControllerName = "Currency",+ ActionName = "List",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Countries",+ ResourceName = "Admin.Configuration.Countries",+ PermissionNames = new List<string> { PermissionSystemName.Countries },+ ControllerName = "Country",+ ActionName = "List",+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Search engine friendly names",+ ResourceName = "Admin.Configuration.SeNames",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Maintenance",+ ActionName = "SeNames",+ DisplayOrder = 6,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Admin menu",+ ResourceName = "Admin.Configuration.Menu",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Menu",+ ActionName = "Index",+ DisplayOrder = 7,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Payment",+ ResourceName = "Admin.Configuration.Payment",+ PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 8,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Payment methods",+ ResourceName = "Admin.Configuration.Payment.Methods",+ PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },+ ControllerName = "Payment",+ ActionName = "Index",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Payment settings",+ ResourceName = "Admin.Configuration.Payment.Settings",+ PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },+ ControllerName = "Payment",+ ActionName = "Settings",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Payment method restrictions",+ ResourceName = "Admin.Configuration.Payment.MethodRestrictions",+ PermissionNames = new List<string> { PermissionSystemName.PaymentMethods },+ ControllerName = "Payment",+ ActionName = "MethodRestrictions",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "Shipping",- ResourceName = "Admin.Configuration.Shipping",- PermissionNames = new List<string> { PermissionSystemName.ShippingSettings },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 9,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Shipping providers",- ResourceName = "Admin.Configuration.Shipping.Providers",- ControllerName = "Shipping",- ActionName = "Providers",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Shipping methods",- ResourceName = "Admin.Configuration.Shipping.Methods",- ControllerName = "Shipping",- ActionName = "Methods",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Shipping method restrictions",- ResourceName = "Admin.Configuration.Shipping.Restrictions",- ControllerName = "Shipping",- ActionName = "Restrictions",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Shipping settings",- ResourceName = "Admin.Configuration.Shipping.Settings",- ControllerName = "Shipping",- ActionName = "Settings",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Measures",- ResourceName = "Admin.Configuration.Measures",- PermissionNames = new List<string> { PermissionSystemName.Measures },- ControllerName = "Measure",- DisplayOrder = 4,- ActionName = "Index",- IconClass = "fa fa-arrow-circle-o-right"- },- new() {- SystemName = "Delivery dates",- ResourceName = "Admin.Configuration.Shipping.DeliveryDates",- ControllerName = "Shipping",- DisplayOrder = 5,- ActionName = "DeliveryDates",- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Warehouses",- ResourceName = "Admin.Configuration.Shipping.Warehouses",- ControllerName = "Shipping",- DisplayOrder = 6,- ActionName = "Warehouses",- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "PickupPoints",- ResourceName = "Admin.Configuration.Shipping.PickupPoints",- ControllerName = "Shipping",- DisplayOrder = 7,- ActionName = "PickupPoints",- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "Shipping",+ ResourceName = "Admin.Configuration.Shipping",+ PermissionNames = new List<string> { PermissionSystemName.ShippingSettings },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 9,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Shipping providers",+ ResourceName = "Admin.Configuration.Shipping.Providers",+ ControllerName = "Shipping",+ ActionName = "Providers",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Shipping methods",+ ResourceName = "Admin.Configuration.Shipping.Methods",+ ControllerName = "Shipping",+ ActionName = "Methods",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Shipping method restrictions",+ ResourceName = "Admin.Configuration.Shipping.Restrictions",+ ControllerName = "Shipping",+ ActionName = "Restrictions",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Shipping settings",+ ResourceName = "Admin.Configuration.Shipping.Settings",+ ControllerName = "Shipping",+ ActionName = "Settings",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Measures",+ ResourceName = "Admin.Configuration.Measures",+ PermissionNames = new List<string> { PermissionSystemName.Measures },+ ControllerName = "Measure",+ DisplayOrder = 4,+ ActionName = "Index",+ IconClass = "fa fa-arrow-circle-o-right"+ },+ new() {+ SystemName = "Delivery dates",+ ResourceName = "Admin.Configuration.Shipping.DeliveryDates",+ ControllerName = "Shipping",+ DisplayOrder = 5,+ ActionName = "DeliveryDates",+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Warehouses",+ ResourceName = "Admin.Configuration.Shipping.Warehouses",+ ControllerName = "Shipping",+ DisplayOrder = 6,+ ActionName = "Warehouses",+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "PickupPoints",+ ResourceName = "Admin.Configuration.Shipping.PickupPoints",+ ControllerName = "Shipping",+ DisplayOrder = 7,+ ActionName = "PickupPoints",+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "Tax",- ResourceName = "Admin.Configuration.Tax",- PermissionNames = new List<string> { PermissionSystemName.TaxSettings },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 10,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Tax providers",- ResourceName = "Admin.Configuration.Tax.Providers",- ControllerName = "Tax",- ActionName = "Providers",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Tax categories",- ResourceName = "Admin.Configuration.Tax.Categories",- ControllerName = "Tax",- ActionName = "Categories",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Tax settings",- ResourceName = "Admin.Configuration.Tax.Settings",- ControllerName = "Tax",- ActionName = "Settings",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "Tax",+ ResourceName = "Admin.Configuration.Tax",+ PermissionNames = new List<string> { PermissionSystemName.TaxSettings },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 10,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Tax providers",+ ResourceName = "Admin.Configuration.Tax.Providers",+ ControllerName = "Tax",+ ActionName = "Providers",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Tax categories",+ ResourceName = "Admin.Configuration.Tax.Categories",+ ControllerName = "Tax",+ ActionName = "Categories",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Tax settings",+ ResourceName = "Admin.Configuration.Tax.Settings",+ ControllerName = "Tax",+ ActionName = "Settings",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"}- },- new() {- SystemName = "Templates",- ResourceName = "Admin.Configuration.Layouts",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- IconClass = "fa fa-arrow-circle-o-right",- DisplayOrder = 11,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Category layouts",- ResourceName = "Admin.Configuration.Layouts.Category",- ControllerName = "Layout",- ActionName = "CategoryLayouts",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Brand layouts",- ResourceName = "Admin.Configuration.Layouts.Brand",- ControllerName = "Layout",- ActionName = "BrandLayouts",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Collection layouts",- ResourceName = "Admin.Configuration.Layouts.Collection",- ControllerName = "Layout",- ActionName = "CollectionLayouts",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Product layouts",- ResourceName = "Admin.Configuration.Layouts.Product",- ControllerName = "Layout",- ActionName = "ProductLayouts",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Page layouts",- ResourceName = "Admin.Configuration.Layouts.Page",- ControllerName = "Layout",- ActionName = "PageLayouts",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- }+ }+ },+ new() {+ SystemName = "Templates",+ ResourceName = "Admin.Configuration.Layouts",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ IconClass = "fa fa-arrow-circle-o-right",+ DisplayOrder = 11,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Category layouts",+ ResourceName = "Admin.Configuration.Layouts.Category",+ ControllerName = "Layout",+ ActionName = "CategoryLayouts",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Brand layouts",+ ResourceName = "Admin.Configuration.Layouts.Brand",+ ControllerName = "Layout",+ ActionName = "BrandLayouts",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Collection layouts",+ ResourceName = "Admin.Configuration.Layouts.Collection",+ ControllerName = "Layout",+ ActionName = "CollectionLayouts",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Product layouts",+ ResourceName = "Admin.Configuration.Layouts.Product",+ ControllerName = "Layout",+ ActionName = "ProductLayouts",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Page layouts",+ ResourceName = "Admin.Configuration.Layouts.Page",+ ControllerName = "Layout",+ ActionName = "PageLayouts",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"}}}- },+ }+ },- new() {- SystemName = "Settings",- PermissionNames = new List<string> { PermissionSystemName.Settings },- ResourceName = "Admin.Settings",- IconClass = "icon-wrench",- DisplayOrder = 8,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "General and common settings",- ResourceName = "Admin.Settings.GeneralCommon",- ControllerName = "Setting",- ActionName = "GeneralCommon",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Catalog settings",- ResourceName = "Admin.Settings.Catalog",- ControllerName = "Setting",- ActionName = "Catalog",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Customer settings",- ResourceName = "Admin.Settings.Customer",- ControllerName = "Setting",- ActionName = "Customer",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Sales settings",- ResourceName = "Admin.Settings.Sales",- ControllerName = "Setting",- ActionName = "Sales",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Media settings",- ResourceName = "Admin.Settings.Media",- ControllerName = "Setting",- ActionName = "Media",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Content settings",- ResourceName = "Admin.Settings.Content",- ControllerName = "Setting",- ActionName = "Content",- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Vendor settings",- ResourceName = "Admin.Settings.Vendor",- ControllerName = "Setting",- ActionName = "Vendor",- DisplayOrder = 6,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Push notifications settings",- ResourceName = "Admin.Settings.PushNotifications",- ControllerName = "Setting",- ActionName = "PushNotifications",- DisplayOrder = 7,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Admin search settings",- ResourceName = "Admin.Settings.AdminSearch",- ControllerName = "Setting",- ActionName = "AdminSearch",- DisplayOrder = 8,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "System settings",- ResourceName = "Admin.Settings.System",- ControllerName = "Setting",- ActionName = "SystemSetting",- DisplayOrder = 9,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "Settings",+ PermissionNames = new List<string> { PermissionSystemName.Settings },+ ResourceName = "Admin.Settings",+ IconClass = "icon-wrench",+ DisplayOrder = 8,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "General and common settings",+ ResourceName = "Admin.Settings.GeneralCommon",+ ControllerName = "Setting",+ ActionName = "GeneralCommon",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Catalog settings",+ ResourceName = "Admin.Settings.Catalog",+ ControllerName = "Setting",+ ActionName = "Catalog",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Customer settings",+ ResourceName = "Admin.Settings.Customer",+ ControllerName = "Setting",+ ActionName = "Customer",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Sales settings",+ ResourceName = "Admin.Settings.Sales",+ ControllerName = "Setting",+ ActionName = "Sales",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Media settings",+ ResourceName = "Admin.Settings.Media",+ ControllerName = "Setting",+ ActionName = "Media",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Content settings",+ ResourceName = "Admin.Settings.Content",+ ControllerName = "Setting",+ ActionName = "Content",+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Vendor settings",+ ResourceName = "Admin.Settings.Vendor",+ ControllerName = "Setting",+ ActionName = "Vendor",+ DisplayOrder = 6,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Push notifications settings",+ ResourceName = "Admin.Settings.PushNotifications",+ ControllerName = "Setting",+ ActionName = "PushNotifications",+ DisplayOrder = 7,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Admin search settings",+ ResourceName = "Admin.Settings.AdminSearch",+ ControllerName = "Setting",+ ActionName = "AdminSearch",+ DisplayOrder = 8,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "System settings",+ ResourceName = "Admin.Settings.System",+ ControllerName = "Setting",+ ActionName = "SystemSetting",+ DisplayOrder = 9,+ IconClass = "fa fa-dot-circle-o"}- },+ }+ },- new() {- SystemName = "Plugins",- ResourceName = "Admin.Plugins",- PermissionNames = new List<string> {- PermissionSystemName.Plugins, PermissionSystemName.Widgets,- PermissionSystemName.ExternalAuthenticationMethods- },- IconClass = "icon-puzzle",- DisplayOrder = 9,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "External authentication methods",- ResourceName = "Admin.Plugins.ExternalAuthenticationMethods",- PermissionNames = new List<string> { PermissionSystemName.ExternalAuthenticationMethods },- ControllerName = "ExternalAuthentication",- ActionName = "Methods",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Widgets",- ResourceName = "Admin.Plugins.Widgets",- PermissionNames = new List<string> { PermissionSystemName.Widgets },- ControllerName = "Widget",- ActionName = "List",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Local plugins",- ResourceName = "Admin.Plugins.Local",- PermissionNames = new List<string> { PermissionSystemName.Plugins },- ControllerName = "Plugin",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- }- }+ new AdminSiteMap {+ SystemName = "Plugins",+ ResourceName = "Admin.Plugins",+ PermissionNames = new List<string> {+ PermissionSystemName.Plugins, PermissionSystemName.Widgets,+ PermissionSystemName.ExternalAuthenticationMethods},+ IconClass = "icon-puzzle",+ DisplayOrder = 9,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "External authentication methods",+ ResourceName = "Admin.Plugins.ExternalAuthenticationMethods",+ PermissionNames = new List<string> { PermissionSystemName.ExternalAuthenticationMethods },+ ControllerName = "ExternalAuthentication",+ ActionName = "Methods",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Widgets",+ ResourceName = "Admin.Plugins.Widgets",+ PermissionNames = new List<string> { PermissionSystemName.Widgets },+ ControllerName = "Widget",+ ActionName = "List",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Local plugins",+ ResourceName = "Admin.Plugins.Local",+ PermissionNames = new List<string> { PermissionSystemName.Plugins },+ ControllerName = "Plugin",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ }+ }+ },- new() {- SystemName = "System",- ResourceName = "Admin.System",- PermissionNames = new List<string> {- PermissionSystemName.MessageQueue, PermissionSystemName.MessageContactForm,- PermissionSystemName.Maintenance, PermissionSystemName.ScheduleTasks, PermissionSystemName.System- },- IconClass = "icon-info",- DisplayOrder = 10,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "System information",- ResourceName = "Admin.System.SystemInfo",- PermissionNames = new List<string> { PermissionSystemName.System },- ControllerName = "System",- ActionName = "SystemInfo",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Queued emails",- ResourceName = "Admin.System.QueuedEmails",- PermissionNames = new List<string> { PermissionSystemName.MessageQueue },- ControllerName = "QueuedEmail",- ActionName = "List",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Contact Us form",- ResourceName = "Admin.System.ContactForm",- PermissionNames = new List<string> { PermissionSystemName.MessageContactForm },- ControllerName = "ContactForm",- ActionName = "List",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Maintenance",- ResourceName = "Admin.System.Maintenance",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Maintenance",- ActionName = "Maintenance",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Schedule tasks",- ResourceName = "Admin.System.ScheduleTasks",- PermissionNames = new List<string> { PermissionSystemName.ScheduleTasks },- ControllerName = "ScheduleTask",- ActionName = "List",- DisplayOrder = 5,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Developer tools",- ResourceName = "Admin.System.DeveloperTools",- PermissionNames = new List<string>- { PermissionSystemName.Maintenance, PermissionSystemName.System },- IconClass = "fa fa-dot-circle-o",- DisplayOrder = 6,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Manage API Users",- ResourceName = "Admin.System.APIUsers",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "ApiUser",- ActionName = "Index",- DisplayOrder = 0,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Roslyn compiler",- ResourceName = "Admin.System.Roslyn",- PermissionNames = new List<string> { PermissionSystemName.System },- ControllerName = "System",- ActionName = "Roslyn",- DisplayOrder = 1,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Custom css",- ResourceName = "Admin.System.CustomCss",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Maintenance",- ActionName = "CustomCss",- DisplayOrder = 2,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Custom JS",- ResourceName = "Admin.System.CustomJs",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Maintenance",- ActionName = "CustomJs",- DisplayOrder = 3,- IconClass = "fa fa-dot-circle-o"- },- new() {- SystemName = "Robot.txt",- ResourceName = "Admin.System.RobotsTxt",- PermissionNames = new List<string> { PermissionSystemName.Maintenance },- ControllerName = "Maintenance",- ActionName = "RobotsTxt",- DisplayOrder = 4,- IconClass = "fa fa-dot-circle-o"- }+ new AdminSiteMap {+ SystemName = "System",+ ResourceName = "Admin.System",+ PermissionNames = new List<string> {+ PermissionSystemName.MessageQueue, PermissionSystemName.MessageContactForm,+ PermissionSystemName.Maintenance, PermissionSystemName.ScheduleTasks, PermissionSystemName.System+ },+ IconClass = "icon-info",+ DisplayOrder = 10,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "System information",+ ResourceName = "Admin.System.SystemInfo",+ PermissionNames = new List<string> { PermissionSystemName.System },+ ControllerName = "System",+ ActionName = "SystemInfo",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Queued emails",+ ResourceName = "Admin.System.QueuedEmails",+ PermissionNames = new List<string> { PermissionSystemName.MessageQueue },+ ControllerName = "QueuedEmail",+ ActionName = "List",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Contact Us form",+ ResourceName = "Admin.System.ContactForm",+ PermissionNames = new List<string> { PermissionSystemName.MessageContactForm },+ ControllerName = "ContactForm",+ ActionName = "List",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Maintenance",+ ResourceName = "Admin.System.Maintenance",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Maintenance",+ ActionName = "Maintenance",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Schedule tasks",+ ResourceName = "Admin.System.ScheduleTasks",+ PermissionNames = new List<string> { PermissionSystemName.ScheduleTasks },+ ControllerName = "ScheduleTask",+ ActionName = "List",+ DisplayOrder = 5,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Developer tools",+ ResourceName = "Admin.System.DeveloperTools",+ PermissionNames = new List<string>+ { PermissionSystemName.Maintenance, PermissionSystemName.System },+ IconClass = "fa fa-dot-circle-o",+ DisplayOrder = 6,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Manage API Users",+ ResourceName = "Admin.System.APIUsers",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "ApiUser",+ ActionName = "Index",+ DisplayOrder = 0,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Roslyn compiler",+ ResourceName = "Admin.System.Roslyn",+ PermissionNames = new List<string> { PermissionSystemName.System },+ ControllerName = "System",+ ActionName = "Roslyn",+ DisplayOrder = 1,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Custom css",+ ResourceName = "Admin.System.CustomCss",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Maintenance",+ ActionName = "CustomCss",+ DisplayOrder = 2,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Custom JS",+ ResourceName = "Admin.System.CustomJs",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Maintenance",+ ActionName = "CustomJs",+ DisplayOrder = 3,+ IconClass = "fa fa-dot-circle-o"+ },+ new() {+ SystemName = "Robot.txt",+ ResourceName = "Admin.System.RobotsTxt",+ PermissionNames = new List<string> { PermissionSystemName.Maintenance },+ ControllerName = "Maintenance",+ ActionName = "RobotsTxt",+ DisplayOrder = 4,+ IconClass = "fa fa-dot-circle-o"}}}- },+ }+ },- new() {- SystemName = "Help",- ResourceName = "Admin.Help",- IconClass = "icon-question",- DisplayOrder = 11,- ChildNodes = new List<AdminSiteMap> {- new() {- SystemName = "Community forums",- ResourceName = "Admin.Help.Forums",- Url =- "https://grandnode.com/boards?utm_source=web&utm_medium=admin&utm_term=web&utm_campaign=Community",- IconClass = "fa fa-dot-circle-o",- DisplayOrder = 0,- OpenUrlInNewTab = true- },- new() {- SystemName = "Premium support services",- ResourceName = "Admin.Help.SupportServices",- Url =- "https://grandnode.com/premium-support-packages?utm_source=web&utm_medium=admin&utm_term=web&utm_campaign=Support",- IconClass = "fa fa-dot-circle-o",- DisplayOrder = 1,- OpenUrlInNewTab = true- }+ new AdminSiteMap {+ SystemName = "Help",+ ResourceName = "Admin.Help",+ IconClass = "icon-question",+ DisplayOrder = 11,+ ChildNodes = new List<AdminSiteMap> {+ new() {+ SystemName = "Community forums",+ ResourceName = "Admin.Help.Forums",+ Url =+ "https://grandnode.com/boards?utm_source=web&utm_medium=admin&utm_term=web&utm_campaign=Community",+ IconClass = "fa fa-dot-circle-o",+ DisplayOrder = 0,+ OpenUrlInNewTab = true+ },+ new() {+ SystemName = "Premium support services",+ ResourceName = "Admin.Help.SupportServices",+ Url =+ "https://grandnode.com/premium-support-packages?utm_source=web&utm_medium=admin&utm_term=web&utm_campaign=Support",+ IconClass = "fa fa-dot-circle-o",+ DisplayOrder = 1,+ OpenUrlInNewTab = true}- },-- new() {- SystemName = "Third party plugins",- ResourceName = "Admin.Plugins",- DisplayOrder = 12}- ];- }+ },++ new AdminSiteMap {+ SystemName = "Third party plugins",+ ResourceName = "Admin.Plugins",+ DisplayOrder = 12+ }+ ];}\ No newline at end of file