-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDiscountAmountSample.cs
More file actions
35 lines (32 loc) · 904 Bytes
/
DiscountAmountSample.cs
File metadata and controls
35 lines (32 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Grand.Core.Plugins;
using Grand.Services.Discounts;
using Grand.Core.Domain.Discounts;
using Grand.Core;
namespace Grand.Plugin.DiscountAmount.Sample
{
public class DiscountAmountSample : BasePlugin, IDiscountAmountProvider
{
private readonly IWebHelper _webHelper;
public DiscountAmountSample(IWebHelper webHelper)
{
this._webHelper = webHelper;
}
public decimal DiscountAmount(Discount discount, decimal amount)
{
return 1;
}
public override string GetConfigurationPageUrl()
{
return $"{_webHelper.GetStoreLocation()}Admin/DiscountAmountSample/Configure";
}
public override void Install()
{
base.Install();
}
public override void Uninstall()
{
//locales
base.Uninstall();
}
}
}