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

GWT/One-Page-Checkout Customization

Started by DispatchMediaGroup, August 01, 2012, 08:03:21 pm

Previous topic - Next topic

DispatchMediaGroup

Hey KonaKarts,

I've upgraded to the new 6.3.0.0-C version of KK from 5.2...whew!  Part of that process was making all of the same custom changes we made a year or two ago when we first set up KonaKart as out eCommerce solution.

The last leg of the upgrade is the GWT alterations to the One Page Checkout (i.e. OPC) process.  This is where I'm running into problems that I'm hoping an admin or some well-learned KonaKarter can help me out with.

First off, I'm following some of my own documentation from another forum thread at http://www.konakart.com/forum/index.php/topic,1527.msg6044.html#msg6044.  Please let me know if something in that thread is part of what's throwing me off.

Okay, so to the issue: in short, the GWT/OPC changes I've made, compiled, and migrated to the KonaKart server are not being picked up by tomcat - at least it seems that way.  It's like the GWT changes I've made aren't being served.

I've altered the GWTValidation class to show friendly error messages, I've altered the LoginBody file to send the customer off to a custom login page, and I've also updated the Payment method to show 'Credit Card' instead of 'Authorize.net' or some other customer-confusing text. 

I've made these changes under \<konakart>\custom\onepagecheckout and compile according to the documentation at http://www.konakart.com/docs/OPC.html.  Since I'm running a headless Linux installation, I simply call $>..\bin\kkant compile in order to skip the GUI thingy.  I've also used ant instead of kkant during my development, but it doesn't seem to make any difference - let me know if that's a dangerous/naive/ignorant assumption to have made.

Then, I copy the resulting files from war\com.konakart.Konakart to \<konakart>\webapps\konakart\, overwriting as necessary.  And then I also copied resulting files from war\WEB-INF to \<konakart>\webapps\konakart\WEB-INF\

I restart KonaKart and it functions exactly like it did before.  I can see the numerous new .js and .html files, I can see the new class files at \<konakart>\webapps\konakart\WEB-INF\classes\com\konakart\, and from what I know of class-loading mechanisms for Tomcat, those class files and such should be getting picked up...but they're not.

Could someone please help me figure this out?  I know I can't be that far away from success, and I know I'm not the only one struggling with this.  Please let me know if there are assumptions making me go wrong, if there are known bugs or issues, etc.  I am very appreciative of any help from fellow KonaKarts, admins, or joe-schmoes.  Thanks guys!

ming

In your JSP (OnePageCheckoutBody.jsp?) where you define the one page checkout javascript file ensure that your are defining the correct filename.

Compare with a default installation to see what's required.



BTW, You wrote:

Quoteand I know I'm not the only one struggling with this


What made you say that?   I don't know of anyone else who is struggling with this.

DispatchMediaGroup

You actually hit on the exact issue: the generated javascript file did not have the KonaKart version information in the file name; the original did have that.  No where in the documentation was this mentioned, nor in the forums, which makes it seem like a possible bug. 

Also, not sure why it matters to you that I mentioned that I wasn't the only one having issues with this, however I said that because of the old if-you-have-a-question-others-do-too adage, and also because at the time I was posting, there were other forum posts with no answers and similar questions/issues:

http://www.konakart.com/forum/index.php/topic,1434.msg5718.html#msg5718
http://www.konakart.com/forum/index.php/topic,1631.msg6440.html#msg6440
http://www.konakart.com/forum/index.php/topic,1541.msg6103.html#msg6103
http://www.konakart.com/forum/index.php/topic,1518.msg6027.html#msg6027

The OPC documentation is a little sparse, and the step-by-step guide is hardly that at all; it skips many necessary steps, and unless you're a good googler, know about web architecture well enough, or actually get a helpful answer in forums, you're gonna have a bad time figuring out how to successfully alter the GWT code.

ming

QuoteAlso, not sure why it matters to you that I mentioned that I wasn't the only one having issues with this


Clearly if a lot of people are having the same problem there is likely to be  problem.   In this case it is only you who was struggling with this particular issue.

You refer to completely different questions in the 4 forum posts you identify so your comment was misleading.


If you find it too difficult to follow with the documentation provided you could always consider getting a support contract.

DispatchMediaGroup

It wasn't only me struggling with this, as I stated before.  And, again, as I said before, there were other posts similar to mine, not exactly the same; although the first and third links do parallel my issue pretty darn closely.  I was not misleading, I was quite clear in what I was having issues with, and I was quite clear in the steps I'd taken to get where I am.

I've considered a support contract, but it's really not necessary.  I have Google to use, some documentation from KonaKart, and I have these forums where I occasionally post a question and sometimes get an answer or help. 

And when I find documentation too difficult to follow, or more likely, sparse, then I post and ask. 

piripo

Hello Konakarts!

I would like to continue with this post because I have been reading carefully your answers but I cannot make any progress.

I'll be brief. I want to customize the one page checkout but don't know what am I doing wrong. If I test that change following the instructions here http://www.konakart.com/docs/OPC.html it works perfectly, but when I want to execute the whole application with that change I cannot see anything. I have executed the ant for the one page checkout, copying all the classes and whatever was necessary. I even copied the javascript generated and I changed its name as explained in this thread. But nothing, I am not able to see my modifications. My problem seems to be the one why this thread was opened, so I (also) think I'm close to get the solution. Btw I'm using Eclipse, although it probably doesn't make any difference.

Do you know what am I doing wrong? Don't I have to copy any jar? I'm not an expert with tomcat and webapps, so probably I'm doing wrong something obvious for other experienced programmer.

Thanks!!

ming

GWT converts java to javascript so it's the javascript that you need to copy.

You shouldn't need to rename any files.  You may have to ensure that the name of the javascript file you reference is the one you want to use and not a previous one.

If you've done all that correctly and still see your previous version...  the problem could be that you're caching an old version in your browser.

Have you tried using another browser to test that?

piripo

Hello and thanks for your answer.

If I just copy the .js and I rename it to match the one that was before, it appears a never ending loading image when I want to checkout.

Is that normal? I tried with Firefox, Chrome and Safari and I get same results.

piripo

Finally I got it working!

It seems I was doing something wrong... I copied the js and the generated classes, as explained before, so thanks very much. I had to post here, but I guess that made me get the solution :)