I'm trying to setup a basic Tea Commerce Implementation based on Anders Burla's blog post.
I have this in my javascript file that is fired when the user clicks Checkout:
/* The confirm order step of the cart */ jQuery('a#confirmOrder').live("click", function () { var personalInformation = jQuery("#personalInformation");
/* We fetch the information from the form and creates an object that can be sent to the server as a form POST submit */ var formObj = { "firstName": personalInformation.find("#firstName").val(), "lastName": personalInformation.find("#lastName").val(), "email": personalInformation.find("#email").val() };
/* The properties is sent to the server with a syncronous call This way we lock the UI and can redirect the user.*/ TeaCommerce.updateOrderProperties(formObj, false); TeaCommerce.setPaymentMethod(2, false); TeaCommerce.goToPayment(); return false; });
I get the error "rtnData is null" and the user is not moved to the next step. I'm referencing the teaCommerce_unpacked.js file instead of the minified version, to make it easier for me to debug. The same error was occuring before I switched, although it was "b is null".
Looking through the teaCommerce_unpacked.js code, the problem appears to be with teaCommerceService.callBase. If I view the "data" variable in the success function that fires after the ajax call, it always has a value, except when goToPayment is called, in which case it is null.
Note: I haven't licensed Tea Commerce yet, as I'm still running it on my local machine in test mode.
I'd appreciate any suggestions you have as to how I can fix this. I'm really enjoying working with Tea Commerce, and I hope this can be resolved.
Thanks Anders and Rune, you were right about the Countries. I totally missed the "Available in these countries" tab. Thanks for you quick response, and for creating such a great product!
goToPayment throwing javascript error
I'm trying to setup a basic Tea Commerce Implementation based on Anders Burla's blog post.
I have this in my javascript file that is fired when the user clicks Checkout:
I get the error "rtnData is null" and the user is not moved to the next step. I'm referencing the teaCommerce_unpacked.js file instead of the minified version, to make it easier for me to debug. The same error was occuring before I switched, although it was "b is null".
Looking through the teaCommerce_unpacked.js code, the problem appears to be with teaCommerceService.callBase. If I view the "data" variable in the success function that fires after the ajax call, it always has a value, except when goToPayment is called, in which case it is null.
Note: I haven't licensed Tea Commerce yet, as I'm still running it on my local machine in test mode.
I'd appreciate any suggestions you have as to how I can fix this. I'm really enjoying working with Tea Commerce, and I hope this can be resolved.
Thanks,
Jeremy
Hi Jeremy
This often happens when the payment method isnt setup correctly. Have you added the countries as possible countries for the payment method?
Any luck fixing it?
Yes, the payment method is probably not selected. As Anders mentions this happens because it is not valid in the chosen country.
Under the payment methods "Available in these countries" tab you must check the countries that are allowed for that payment method.
/Rune
Thanks Anders and Rune, you were right about the Countries. I totally missed the "Available in these countries" tab. Thanks for you quick response, and for creating such a great product!
Cheers,
Jeremy
Great you got it solved. It would be a help for others if you would mark the right solution to your problem.
And thanks for the kind words - we love to help people
is working on a reply...