Developer forum

Forum » Development » Discounts

Reply
Hi,

I am wondering if someone came across this and/or has some pointers on how to do this.

We need to set up
- discount voucher associated to a product (only assigned if the client inserts the voucher number and buys product X)
- that discount should be configured to either be applied to the product the whole cart or selected products
- the voucher can only be used once per client

It's maybe a good idea to have both generated vouchers (client orientated campaigns) per client or a single voucher for every client (campaign orientated vouchers)

I know this seems like a big development, but if some of this is already standard and I'm just not seeing it, would make things easier. Thoughts anyone?

Nuno

Replies

 
Reply
Hi Nuno,
 
I think you should to use SalesDiscountProvider, like this.
 
Imports Dynamicweb.eCommerce
Imports Dynamicweb.eCommerce.Prices
Imports Dynamicweb.eCommerce.Orders
Imports Dynamicweb.eCommerce.Products
Imports Dynamicweb.Extensibility

< _
AddInName("Simple voucher discount"), _
AddInDescription("Simple voucher discount."), _
AddInActive(True) _
> _
Public Class SimpleVoucherDiscount
Inherits SalesDiscountProvider

#Region "Fields"

Private _VoucherCode As String = ""

#End Region

#Region "Properties"

_
Public Property VoucherCode() As String
Get
Return _VoucherCode
End Get
Set(ByVal Value As String)
_VoucherCode = Value
End Set
End Property

#End Region

#Region "Methods"

Public Overrides Sub ProcessOrder(ByVal _order As Order)

' todo: insert code here

End Sub

#End Region

End Class
 
About SalesDiscountProvider http://engage.dynamicweb-cms.com/api/ecommerce/Dynamicweb~Dynamicweb.eCommerce.Orders.SalesDiscounts.SalesDiscountProvider.html
 
Reply
Hi,

I'll take a look at it and see what we can do.

Thanks,
Nuno

 

You must be logged in to post in the forum