An abp application module group that provides basic e-shop service.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
gdlcf88 3cdccbe5ea Upgrade to ABP 7.2.1 3 years ago
..
host/EasyAbp.EShop.Plugins.Promotions.Host.Shared Initialize the new `Promotions` plugin module 3 years ago
src Batch discount products to improve performance 3 years ago
test Upgrade to ABP 7.2.1 3 years ago
.gitattributes Initialize the new `Promotions` plugin module 3 years ago
.gitignore Initialize the new `Promotions` plugin module 3 years ago
.prettierrc Initialize the new `Promotions` plugin module 3 years ago
EasyAbp.EShop.Plugins.Promotions.abpmdl.json Initialize the new `Promotions` plugin module 3 years ago
EasyAbp.EShop.Plugins.Promotions.abpsln.json Initialize the new `Promotions` plugin module 3 years ago
EasyAbp.EShop.Plugins.Promotions.sln Initialize the new `Promotions` plugin module 3 years ago
EasyAbp.EShop.Plugins.Promotions.sln.DotSettings Initialize the new `Promotions` plugin module 3 years ago
NuGet.Config Initialize the new `Promotions` plugin module 3 years ago
README.md Docs for Promotions module and sample app improvements 3 years ago

README.md

EShop.Plugins.Promotions

ABP version NuGet NuGet Download Discord online GitHub stars

A promotion discount provider plugin for EShop.

Installation

  1. Install the following NuGet packages. (see how)

    • EasyAbp.EShop.Orders.Plugins.Promotions.Domain (install at EasyAbp.EShop.Orders.Domain location)
    • EasyAbp.EShop.Products.Plugins.Promotions.Domain (install at EasyAbp.EShop.Products.Domain location)
    • EasyAbp.EShop.Plugins.Promotions.Application
    • EasyAbp.EShop.Plugins.Promotions.Application.Contracts
    • EasyAbp.EShop.Plugins.Promotions.Domain
    • EasyAbp.EShop.Plugins.Promotions.Domain.Shared
    • EasyAbp.EShop.Plugins.Promotions.EntityFrameworkCore
    • EasyAbp.EShop.Plugins.Promotions.HttpApi
    • EasyAbp.EShop.Plugins.Promotions.HttpApi.Client
    • (Optional) EasyAbp.EShop.Plugins.Promotions.MongoDB
    • (Optional) EasyAbp.EShop.Plugins.Promotions.Web
  2. Add DependsOn(typeof(EShopXxxModule)) attribute to configure the module dependencies. (see how)

  3. Add builder.ConfigureEShopPluginsPromotions(); to the OnModelCreating() method in MyProjectDbContext.cs.

  4. Add EF Core migrations and update your database. See: ABP document.

Concepts

This promotion plugin module provides an easy way to define EShop's product discounts and order discounts.

Promotion Type

Promotion type is defined to provide programs for different discount logics.

We have created SimpleProductDiscount and MinQuantityOrderDiscount promotion type definitions for you. You can define custom promotion types yourself if you need different discount logic.

Product Discount

Product discounts subtract the price of products before customers place an order.

For a product SKU, if there are more than one promotion offering product discounts, customers will see all of them, but only the one with the highest discount amount will be applied, since they have the same EffectGroup = "Promotion".

The promotion product discounts coexist with other types of discounts with different EffectGroup.

Order Discount

Order discounts subtract the price of products after customers place an order.

For an order line, if there are more than one promotion offering order discounts, only the one with the highest discount amount will be applied, since they have the same EffectGroup = "Promotion".

The promotion order discounts coexist with other types of discounts with different EffectGroup.

The Best Combination of Discounts

If your product or order has many related discounts with conflicts, EShop will find the best combination of discounts using BFS.

See these codes for more:

Usage

Create a Promotion for Product Discounts

You can create a promotion with the preset promotion type SimpleProductDiscount. It offers direct product discounts for the products you specify.

SimpleProductDiscount

Create a Promotion for Order Discounts

You can create a promotion with the preset promotion type SimpleProductDiscount. It discounts an order line if the OrderLine.Quantity >= Configurations.MinQuantity.

MinQuantityOrderDiscount