KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: rotaryswing on September 04, 2008, 04:04:57 pm

Title: coupon code not working
Post by: rotaryswing on September 04, 2008, 04:04:57 pm
I've checked to make sure the module is installed and created a promotion that requires a coupon. It is at http://www.oneplanegolfswing.com:8780/konakart/Welcome.do

When you add the coupon code "golfsmart" nothing happens, although it should take 15% off the price. The date is active.
Title: Re: coupon code not working
Post by: pete on September 04, 2008, 04:11:54 pm
Does it work in the checkout screen ?
Do you get anything in the log ?
Have you set up a default customer so that it can estimate the shipping costs when someone isn't logged in. http://www.konakart.com/configurationfaq.php#What_is_a_default_customer_
Title: Re: coupon code not working
Post by: rotaryswing on September 04, 2008, 04:50:22 pm
The default customer trick fixed it, sorry!
Title: Re: coupon code not working
Post by: pete on September 04, 2008, 04:58:56 pm
That's OK. In the Order Totals section of the Admin App you should make the sort order of the "Total" order total, greater than that of the "discount" order total otherwise the discount won't get subtracted.
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 02:04:27 am
Ok, I changed the sort order of total to 99, the product discount is 22, order total discount is 20. After changing it, now the discount doesn't show up at all. Before I changed the total to 99 it showed up, but didn't give the discount once transferred to PayPal.
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 02:17:04 am
Also now when I use the coupon code "softlaunch" on the order confirmation page, nothing happens at all.

http://www.oneplanegolfswing.com:8780/konakart
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 06:15:30 am
QuoteOk, I changed the sort order of total to 99, the product discount is 22, order total discount is 20. After changing it, now the discount doesn't show up at all. Before I changed the total to 99 it showed up, but didn't give the discount once transferred to PayPal.


Are you sure that you only changed the sort order ? Take a look at our online demo (which works). The ordering we use is :
Order Total Discount : 20
Product Discount      : 22
Total                      : 40
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 01:39:34 pm
Yes, but either way, I changed the numbers to match yours and the result is still the same, it does not show up at all now.
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 01:53:30 pm
Ok, I've got it working to where it shows the discount on the page. On the shopping cart page, it takes it off but then you have to re-enter the code on the actual checkout page. That's problem 1. The second is that once it forwards to paypal, the deduction is no longer there.
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 03:23:55 pm
QuoteOk, I've got it working to where it shows the discount on the page. On the shopping cart page, it takes it off but then you have to re-enter the code on the actual checkout page. That's problem 1. The second is that once it forwards to paypal, the deduction is no longer there.


1. The coupon does have to be rentered during checkout. The cart page is really just a place where you should be able to see details (shipping, promotion etc.) so that you aren't forced to register to see that stuff. It frustrates people to have to register in order to see how much shipping will cost. In some cases, after logging in, the promotion may not even apply to you any more. You could always save the coupon code on the session and use it for checkout if that is what you want.

2. Is order total the last item in the sort order ?
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 03:57:40 pm
Yes, coupon code is last in the sort at 40, next down is shipping at 25 and then discounts at 22 and 20
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 05:15:19 pm
Just to confirm nothing was hosed accidentally, I did a fresh install and got the exact same behavior, everything looks great and then when it goes to paypal it shows the total without the discount.
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 05:57:42 pm
QuoteYes, coupon code is last in the sort at 40, next down is shipping at 25 and then discounts at 22 and 20


That is the problem. Order Total should be last.
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 06:02:00 pm
Sorry, that was mistyped, Total is last at 40. Order is:

Subtotal
Order total discount
Product discount
Shipping
Total
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 06:07:53 pm
Maybe you could post a screenshot of the checkout screen showing the order details just before checkout ?
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 06:19:23 pm
img attached
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 07:15:06 pm
Looks OK. If the correct amount isn't showing up in PayPal, it could be a problem in the PayPal payment module. You have the source for that. It's in KonaKart\custom\modules\src\com\konakart\bl\modules\payment\paypal .
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 07:29:54 pm
That hasn't been touched, so are you saying the one that is included with your download doesn't work correctly?
Title: Re: coupon code not working
Post by: pete on September 05, 2008, 09:58:32 pm
All I am saying is that "if" there is a problem with the PayPal payment module processing orders with promotions, you can investigate it since you have the source to debug it. I assume that since you are using KonaKart, you or someone in your team knows their way around a java program.

We will also take a look, but cannot guarantee any response times since you aren't under a support agreement. If we find a problem and fix it, we'll probably make the fix available in the next release.
Title: Re: coupon code not working
Post by: rotaryswing on September 05, 2008, 11:00:40 pm
I couldn't find pricing info for a support program on your site or I would have done it. I assume it's high now that you don't have your pricing posting publicly so I've decided to look into another vendor since this doesn't work.
Title: Re: coupon code not working
Post by: pete on September 06, 2008, 06:24:56 am
Well, since you couldn't be bothered to even ask us about how we can support you, it looks like you've made your decision. Good luck.
Title: Re: coupon code not working
Post by: pete on September 08, 2008, 05:02:44 pm
For anyone following this thread, a bug was found in the PayPal payment module which stopped it from processing discounts created by promotion modules.

I've fixed the problem and attached a new source file and class file. You only need to update if you are using the PayPal payment module and also plan to use promotions. The module has been tested with KonaKart 2.2.6.0 although it should also work with older versions.
Title: Re: coupon code not working
Post by: dhan on November 12, 2008, 05:49:39 pm
Pete,

I am having slightly different problem.

The shipping cost is not being shown at the invoice or checkout while I get the correct value (flat rate) in the "View Cart" page.

I am checking all admin configuration settings and also verified the sort order in OrderTotal, but can't able to get the shipping amount in invoice.

Here's my sort order:
Sub-Total: 1
Shipping: 25
Total: 40

Thanks for the help!
Dhan
Title: Re: coupon code not working
Post by: ryan on November 12, 2008, 07:38:27 pm
Hi,

Can you verify that the product is a normal physical product. i.e. not a digital download or a product with free shipping.
Title: Re: coupon code not working
Post by: lrkwz on November 16, 2012, 03:24:07 pm
Quote from: pete on September 05, 2008, 03:23:55 pm
1. The coupon does have to be rentered during checkout. (...) In some cases, after logging in, the promotion may not even apply to you any more. You could always save the coupon code on the session and use it for checkout if that is what you want.


In my configuration (quite common for my users although) it is quite annoing because you (the user):


I've overridden LoginSubmitAction with


final String coupon = kkAppEng.getOrderMgr().getCouponCode();
(...)
String sessionId = kkAppEng.getCustomerMgr().login(lf.getUser(), lf.getPassword()); // this calls refreshCustomerCachedData() which cleanup all customer data including the coupon
kkAppEng.getOrderMgr().setCouponCode(coupon);


and it seems to work.