Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-2092: add configurable product #753

Merged
merged 8 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/VirtoCommerce.CatalogModule.Core/Model/CatalogProduct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public class CatalogProduct : AuditableEntity, IHasLinks, ISeoSupport, IHasOutli
/// </summary>
public bool? TrackInventory { get; set; }

/// <summary>
/// Indicates configurable product.
/// </summary>
public bool IsConfigurable { get; set; }

/// <summary>
/// The date and time when the product was last indexed for search.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System.Collections.Generic;

namespace VirtoCommerce.CatalogModule.Core.Model;

public class ProductConfiguration
{
public IList<ProductConfigurationSection> ConfigurationSections { get; set; } = [];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;

namespace VirtoCommerce.CatalogModule.Core.Model;

public class ProductConfigurationSection
{
public string Id { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string Description { get; set; }
public bool IsRequired { get; set; }
public int DisplayOrder { get; set; }

public IList<ProductConfigurationOption> Options { get; set; } = [];
}

public class ProductConfigurationOption
{
public string Id { get; set; }
public string ProductId { get; set; }
public int Quantity { get; set; } = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System.Threading.Tasks;
using VirtoCommerce.CatalogModule.Core.Model;

namespace VirtoCommerce.CatalogModule.Core.Services;
public interface IConfigurableProductService
{
Task<ProductConfiguration> GetProductConfigurationAsync(string productId);
}
Loading
Loading