Compare commits

..

No commits in common. "9777d3dd53ee387075602391fabb669a21c01c93" and "82876de785841685f3fa36f9a333ae037f0a9bab" have entirely different histories.

5 changed files with 4 additions and 18 deletions

View File

@ -9,7 +9,6 @@ public interface IProductToAuctionDtoBase : IMgModelDtoBase
public int AuctionId { get; set; } public int AuctionId { get; set; }
public int WinnerCustomerId { get; set; } public int WinnerCustomerId { get; set; }
public AuctionStatus AuctionStatus { get; set; } public AuctionStatus AuctionStatus { get; set; }
public decimal StartingPrice { get; set; } public decimal StartingPrice { get; set; }

View File

@ -12,7 +12,6 @@ public class ProductToAuctionDto : IProductToAuctionDto
public int ProductId { get; set; } public int ProductId { get; set; }
public int AuctionId { get; set; } public int AuctionId { get; set; }
public int WinnerCustomerId { get; set; } public int WinnerCustomerId { get; set; }
public AuctionStatus AuctionStatus { get; set; } public AuctionStatus AuctionStatus { get; set; }
public decimal StartingPrice { get; set; } public decimal StartingPrice { get; set; }
public decimal CurrentPrice { get; set; } public decimal CurrentPrice { get; set; }
@ -23,20 +22,14 @@ public class ProductToAuctionDto : IProductToAuctionDto
/// EGYELŐRE NE HASZNÁLD!!! - J. /// EGYELŐRE NE HASZNÁLD!!! - J.
/// </summary> /// </summary>
public decimal StepAmount { get; set; } public decimal StepAmount { get; set; }
public List<AuctionBidDto> AuctionBidDtos { get; } = []; public List<AuctionBidDto> AuctionBidDtos { get; } = [];
public bool IsActiveItem => AuctionStatus is AuctionStatus.Active or AuctionStatus.FirstWarning or AuctionStatus.SecondWarning; public bool IsActiveItem => AuctionStatus is AuctionStatus.Active or AuctionStatus.FirstWarning or AuctionStatus.SecondWarning;
public decimal BidPrice { get; set; } public decimal BidPrice { get; set; }
public ProductToAuctionDto() public ProductToAuctionDto() { }
{ public ProductToAuctionDto(ProductToAuctionMapping productToAuction) : this(productToAuction, 0/*AuctionService.GetStepAmount(productToAuction.BidPrice)*/) { }
}
public ProductToAuctionDto(ProductToAuctionMapping productToAuction) : this(productToAuction, 0 /*AuctionService.GetStepAmount(productToAuction.BidPrice)*/)
{
}
/// <summary> /// <summary>
/// ///
@ -49,7 +42,7 @@ public class ProductToAuctionDto : IProductToAuctionDto
if (stepAmount > 0) StepAmount = stepAmount; if (stepAmount > 0) StepAmount = stepAmount;
//else StepAmount = AuctionService.GetStepAmount(productToAuction.BidPrice); //else StepAmount = AuctionService.GetStepAmount(productToAuction.BidPrice);
Id = productToAuction.Id; Id = productToAuction.Id;
ProductId = productToAuction.ProductId; ProductId = productToAuction.ProductId;

View File

@ -5,8 +5,6 @@ namespace Nop.Plugin.Misc.AuctionPlugin.Domains.Entities.Interfaces;
public interface IProductToAuctionMapping : IProductToAuctionDtoBase, ITimeStampInfo //, ISoftRemoveEntityInt public interface IProductToAuctionMapping : IProductToAuctionDtoBase, ITimeStampInfo //, ISoftRemoveEntityInt
{ {
public int? BiddingNumber { get; set; }
public int OrderId { get; set; } public int OrderId { get; set; }
public Guid? OrderGuid { get; set; } public Guid? OrderGuid { get; set; }
} }

View File

@ -17,7 +17,6 @@ public partial class ProductToAuctionMapping : MgEntityBase, IProductToAuctionMa
public int OrderId { get; set; } public int OrderId { get; set; }
public Guid? OrderGuid { get; set; } public Guid? OrderGuid { get; set; }
public int WinnerCustomerId { get; set; } public int WinnerCustomerId { get; set; }
public int? BiddingNumber { get; set; }
[NotMapped] [NotMapped]
[NotColumn] [NotColumn]

View File

@ -15,7 +15,6 @@ using Nop.Core.Domain.Common;
using Nop.Services.Common; using Nop.Services.Common;
using Nop.Services.Customers; using Nop.Services.Customers;
using Nop.Services.Shipping; using Nop.Services.Shipping;
using NUglify.Helpers;
namespace Nop.Plugin.Misc.AuctionPlugin.Services; namespace Nop.Plugin.Misc.AuctionPlugin.Services;
@ -256,9 +255,7 @@ public class AuctionService(
CustomerId = productToAuction.WinnerCustomerId, CustomerId = productToAuction.WinnerCustomerId,
OrderTotal = productToAuction.CurrentPrice, OrderTotal = productToAuction.CurrentPrice,
}; };
processPaymentRequest.CustomValues.Add("TÉTEL: ", $"#{productToAuction.SortIndex}"); processPaymentRequest.CustomValues.Add("ProductToAuctionMappingId", productToAuction.Id);
if (productToAuction.BiddingNumber != null) processPaymentRequest.CustomValues.Add("BIDNUM", $"#{productToAuction.BiddingNumber}");
processPaymentRequest.CustomValues.Add("PTAID", $"#{productToAuction.Id}");
var product = await productService.GetProductByIdAsync(productToAuction.ProductId); var product = await productService.GetProductByIdAsync(productToAuction.ProductId);
product.DisableBuyButton = false; //TODO: ezt automatikusan kéne false-ra állítani, mikor Assign-oljuk a ProductToAuctionItem-hez! vagy valami hasonló... - J. product.DisableBuyButton = false; //TODO: ezt automatikusan kéne false-ra állítani, mikor Assign-oljuk a ProductToAuctionItem-hez! vagy valami hasonló... - J.