Developer forum

Forum » Development » How to create a new sales discount?

How to create a new sales discount?

Judy Zhang
Reply
Hi,
I need to use 'sales discount provider' to create a special order line.
And I followed the API's SalesDiscountProvider Class example code to add a new custom discount.
Look at the picture:


Then? What should I do to active my new discount?
I have tried to find it from 'eCommerce indstillinger'-->'Produktkatalog'-->'Rabatter', but it can't be seen there. 
Is that because I did something wrong or I should to find it from another place?
 

Replies

 
Morten Bengtson
Reply
Looks like you need to add one more class attribute: AddInActive(true)

Any reason for not configuring a standard shipping method or implementing a FeeProvider? Do you need multiple shipping fees on a single order?

/Morten
 
Judy Zhang
Reply

Looks like you need to add one more class attribute: AddInActive(true)

Any reason for not configuring a standard shipping method or implementing a FeeProvider? Do you need multiple shipping fees on a single order?

/Morten

Yes, we need multiple shipping fees on a single order.

Thank you. And I have added it, but I still can't find my new discount.
Is that because "Dynamicweb.Extensibility.Editors.DiscountValueEditor" is obsolete? Look at the picture:


 
Morten Bengtson
Reply
Yes, you need to remove both _DiscountValue and DiscountValue.
The DiscountValue property is inherited from the base class, SalesDiscountProvider, so it is always available.

/Morten
 
Morten Bengtson
Reply
 ... and make sure that Sales Discounts (Extended) is activated.

/Morten
 
Judy Zhang
Reply
I have checked that  Sales Discounts (Extended) is activated and removed _DiscountValue and DiscountValue.

But the custom sales discount still can't be found.
What is the process to use the custom sales discount?
Where can I find a custom discount with the name 'Fragt'?
fx. should I find the new rabatter here?

 
Nicolai Høeg Pedersen
Reply
When you click on discounts in the management center, you get a list of created discounts.

To apply your own discount, create a new one. In the create sales discount window, the Sales discount group box, click the green arrow called "additional discounts". In the list appearing you will find your discount - choose it and configure it.

Creating a discount: http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/eCommerce-settings/Product-catalog/Sales-discounts.aspx

See manual here: http://manual.dynamicweb-cms.com/Default.aspx?ID=7379

 
Judy Zhang
Reply

Thank you, Nicolai!
I find it now.

 

You must be logged in to post in the forum