• Welcome to KonaKart Community Forum. Please login or sign up.
 

Pay with coupons

Started by lordnaikon, October 14, 2008, 02:09:04 pm

Previous topic - Next topic

lordnaikon

hi, folks

i used the search function but my first attempt didn't lead me to the same problem...
i am new to KanoKart an trying to evaluate some shopping systems, that fit my needs and KonaKart is very close to that :)

is it possible to pay only with a coupon(code)? this means, i don't want my customers to be able to pay with money or credit card etc. the problem is, that you can by things even if the coupon doesn't discount the hole amount of the price (i know, this is not the original intention). the customer should not be able to buy a product if the coupon doesn't "fit" / discount the hole price ...

is it necessary to code my own payment (or something like this) module?

thanks for listening :)
best regards!

julie

Hi,

What you could do is to put some code in CheckoutDeliveryAction.java to not allow checkout unless the total of the order (including the discount) is zero.

lordnaikon

thx for the quick response :)

i'll check this out, after i get this working, maybe it's better do add a custom payment module ... i have read the "tutorial" for this. my main problem is how to make such modifications (how to build an deploy them). but miraculously konakart is well dokumented! :)

ok first i have to find out how to get the actual cart balance .. and how to interrupt the order procedure (like these warning signs "Credit Card Number is not a valid credit card number." if i try to enter an invalid number in PayJunction)

thx .. :)

lordnaikon

Hi, i hadn't had much time on this. i have a serious problem in getting it running.
1. where do i get these "overall" price of the delivery. from the ordermanager object?
2. i never workt with struts .. how do i get a error message appearing on the form?! and not continue the checkout process?

lordnaikon

ok, after a little tryout and searching in the api doc's i get the information that i whant.
OrderMgr orderMgr = kkAppEng.getOrderMgr();
OrderIf order = orderMgr.getCheckoutOrder();
OrderTotalIf[] totals = order.getOrderTotals();


totals contains the information as strings.

an my solution for "not continue the checkout process" i returned with :
return mapping.findForward("ShowCartItems");  if the total price is not zero ,is this a good one?  :D

but now i have another problem.

if the user is logged in and gets to the "Order Confirmation" after he confirmed the "What's In My Cart? " (sry i don't know the names of the pages, so i write the headlines ..  :) ) the coupon code has to be retyped.

1. how do i get the coupon code shipped to the "Order Confirmation" page from "What's In My Cart? "?
2. if this is to complex for a simple answer , what java classfile corresponds to that page?!
    the "What's In My Cart?" corresponds to the "CheckoutDeliveryAction.java" file as julie mentioned.
    but i can't figure out which file correspondes to the "Order Confirmation" page.
    in this case i could do the same changes as in "CheckoutDeliveryAction.java" to solve this problem.

best regards

julie

November 10, 2008, 05:35:30 pm #5 Last Edit: November 10, 2008, 05:57:53 pm by julie
This link may help you to navigate through the struts part of the application http://www.konakart.com/javadoc/struts_doc/index.html .

You can save the coupon in the session. KKAppEng has 5 custom string fields so you could always use one of those.

lordnaikon

hi, its me again :)

thx for the hint to this "struts navigation" document.

but i really can't find the action java class which is called when i am at the "Order Confirmation" page.


i tried to find a java class which uses the "CheckoutForm" but there is nothing to find. also when i leave the payment field blank to geht the error message "Cannot checkout because a payment method hasn't been selected." which is the "one.page.checkout.no.payment.methods.selected". this is never called in any of the java classes in "Konakart\custom\appn\src\com\konakart\actions". is it possible that this part of konakart is not editable?! because there is no file for this page?!

greg

Hi,

Perhaps you need to look at the GWT one-page checkout for that page...  All the source (and build file) is in the download kit.

You can choose to use the JSP version instead, if you wish, by disabling the one-page checkout in the Admin App.

-Greg