ASPX templates
Version 6.x > ASPX templates > Question on "How to implement discount functionality for an entire order" View modes: 
User avatar
Member
Member
seanbun - 6/6/2013 8:44:21 PM
   
Question on "How to implement discount functionality for an entire order"
I have followed the article to implement entire order discount and I found a question.

http://devnet.kentico.com/Knowledge-Base/E-commerce/How-to-implement-discount-functionality-for-an-ent.aspx

Says there are 2 products in my cart

Product A : $50
Product B : $20

And I have created a "Entire Order Discount" for $10.

I would expect the total price = ($50 + $20) - $10 = $60

But I found the result = (($50-$10) + ($20-$10) - $10) = $40

The discount applied on each item and also to the order instead of the entire order.

I reckon I need to override the function ShoppingCartInfoProvider.CalculateTotalItemsPrice(cart) to stop discount action for each cart item if it is a entire order discount.

I work on v6 - ASPX Template.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 6/10/2013 8:06:02 AM
   
RE:Question on "How to implement discount functionality for an entire order"
Hi,

Could you please tell me if you have any products added to this Discount Coupon under CMS Desk -> E-commerce -> Discount coupons -> Edit your coupon -> Products and also which option have you selected. As showed also in the E-commerce Guide - Discount coupons at the bottom of the page.

Best regards,
Martin Danko

User avatar
Member
Member
seanbun - 6/12/2013 2:05:30 AM
   
RE:Question on "How to implement discount functionality for an entire order"
I choose the option for all products.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 6/12/2013 2:10:42 AM
   
RE:Question on "How to implement discount functionality for an entire order"
Hi,

This is also the reason why it applies to all products and also to an order, you should choose the first option - only the following products and don't select any product... so it won't be applied to any product, just to the order.

Best regards,
Martin Danko

User avatar
Member
Member
seanbun - 6/12/2013 7:03:17 PM
   
RE:Question on "How to implement discount functionality for an entire order"
I've got the logic now. Thank you.