KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: lionCoolKing on June 16, 2011, 10:20:25 am

Title: Coupon Code Issue
Post by: lionCoolKing on June 16, 2011, 10:20:25 am
Folks,
I am new to konakart and found it very impressive.
Now I am facing an issue. My requirement is that after the user enters the coupon code in a field the user is supposed to get the discounted value of that product. I have tried many ways but all in vain. My idea was to use createOrder() and get the order object, set the coupon code in order object and invoke the saveOrder(). Its giving exception as "The order must contain at least one OrderTotal object". Don't know how to populate the OrderTotal object.

Please suggest me some other ways to achieve it.

Thanks
Title: Re: Coupon Code Issue
Post by: trevor on June 16, 2011, 05:15:09 pm
Why don't you just take a look at how we do it in ShowCartItemsAction.java.
Title: Re: Coupon Code Issue
Post by: lionCoolKing on June 16, 2011, 06:34:32 pm
Thanks for the quick response. Can u please tell me where i can get the ShowCartItemsAction.java file

Regards
Title: Re: Coupon Code Issue
Post by: trevor on June 16, 2011, 06:48:48 pm
KonaKart\custom\appn\src\com\konakart\actions
Title: Re: Coupon Code Issue
Post by: lionCoolKing on June 16, 2011, 09:12:44 pm
Thanks a ton.

But we are not using struts framework. we are using jsf. Please suggest some other way to achieve it.

Regards
Title: Re: Coupon Code Issue
Post by: trevor on June 17, 2011, 05:57:13 am
All KonaKart functionality is available through the engine APIs. Our store-front and admin applications use the APIs. Take a look at the javadoc http://www.konakart.com/documentation/javadoc .
Title: Re: Coupon Code Issue
Post by: lionCoolKing on June 17, 2011, 11:39:03 am
Thanks ;)