I'm working with Umbraco 4.11.4, TeaCommerce 1.4.4.2, jQuery 1.7.2 and attempting to build a shop using TeaCommerce Starterkit 1.4.4.4. So far I have added some products, the MiniCart and an Add-to-Cart button.
Yes, I have changed /tcbase/ to /base/ everywhere.
When I hit Add-to-Cart I get errors. (see below).
Also where is /base/teacommerce/SubmitForm.aspx hiding?
Thanks
John P
<error><![CDATA[MESSAGE:
Exception has been thrown by the target of an invocation.
STACKTRACE:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Umbraco.Web.BaseRest.RestExtensionMethodInfo.Invoke(String[] parameters)
INNEREXCEPTION:
System.InvalidOperationException: Nullable object must have a value.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at TeaCommerce.Base.FormAddOrderLine(Dictionary`2 fieldKeyValues)
at TeaCommerce.Base.ParseAction(IDictionary`2 vars)
at TeaCommerce.Base.SubmitForm()]]></error>
Looks like the add to cart call does not recieve all necessary parameters.
Is the failing call made by JavaScript or simply the form posting? Have you changed the html output of the product? If so what does it look like now? You might have removed/changed some important stuff.
I mostly a beginner in this environment - and not liking xslt very much.
My project uses exactly the calling sequence set up by products-products.xslt from the tea commerce starter site - so a <form> post.
Yes, I have likely removed some important stuff - my the html is somewhat simpler than the starter site - but I don't know what defines "important stuff" or "necessary parameters".
Is there a way to get more information about what may be missing?
I could send you the whole project - it runs as localhost under webmatrix. MSSQL 2012.
First of all the input/select fields used in the starter kit are all important as they are the ones that hold the information the server needs.
Secondly you might be getting a JavaScript error before the form is posted. Otherwise the standard starter kit JavaScript would be doing the adding to cart for you. The JavaScript is using the standard html, classes and id's to findt the information it needs and the the correct calls. This JavaScript might need to be changed according to your new markup. Most of it is in the teaCommerce_Advanced.js and some of it is in the teaCommerce_Simple.js. The code you need to find is in the teaCommerce_Advanced.js around line 206 and starts something like this: jQuery('.productAddToCart').live('click', function () {
If I where you I would start out by making sure that the standard markup works, and then work your way forward.
As for your dislike of xslt we are currently working all we can to finish a release candidate of Tea Commerce 2 and the starter kit for that. The new starter kit is 100% razor and much more simple to change. Currently we are setting up a couple of our own customers e-commerce solutions on a beta version and it's going great.
SubmitForm.aspx usage
I'm working with Umbraco 4.11.4, TeaCommerce 1.4.4.2, jQuery 1.7.2 and attempting to build a shop using TeaCommerce Starterkit 1.4.4.4. So far I have added some products, the MiniCart and an Add-to-Cart button.
Yes, I have changed /tcbase/ to /base/ everywhere.
When I hit Add-to-Cart I get errors. (see below).
Also where is /base/teacommerce/SubmitForm.aspx hiding?
Thanks
John P
Hi John,
Looks like the add to cart call does not recieve all necessary parameters.
Is the failing call made by JavaScript or simply the form posting?
Have you changed the html output of the product? If so what does it look like now? You might have removed/changed some important stuff.
The Tea Commerce base is located in our c# code. It's a extension using Umraco base http://our.umbraco.org/wiki/reference/umbraco-base
/Rune
Thanks Rune
I mostly a beginner in this environment - and not liking xslt very much.
My project uses exactly the calling sequence set up by products-products.xslt from the tea commerce starter site - so a <form> post.
Yes, I have likely removed some important stuff - my the html is somewhat simpler than the starter site - but I don't know what defines "important stuff" or "necessary parameters".
Is there a way to get more information about what may be missing?
I could send you the whole project - it runs as localhost under webmatrix. MSSQL 2012.
Thanks
John P
tag [at] qfhs.org.au
Well, yes, what is important. :)
First of all the input/select fields used in the starter kit are all important as they are the ones that hold the information the server needs.
Secondly you might be getting a JavaScript error before the form is posted. Otherwise the standard starter kit JavaScript would be doing the adding to cart for you. The JavaScript is using the standard html, classes and id's to findt the information it needs and the the correct calls. This JavaScript might need to be changed according to your new markup. Most of it is in the teaCommerce_Advanced.js and some of it is in the teaCommerce_Simple.js. The code you need to find is in the teaCommerce_Advanced.js around line 206 and starts something like this:
jQuery('.productAddToCart').live('click', function () {
If I where you I would start out by making sure that the standard markup works, and then work your way forward.
As for your dislike of xslt we are currently working all we can to finish a release candidate of Tea Commerce 2 and the starter kit for that. The new starter kit is 100% razor and much more simple to change. Currently we are setting up a couple of our own customers e-commerce solutions on a beta version and it's going great.
Tea Commerce 2 might be more the thing for you.
/Rune
Thanks Rune, I'll work through it all again.I'm finding it hard to visualize how the core and the javascript interact during Add-to-Cart.
The razor version sounds great! The uncertain time scale meant that I have had to proceed using xslt. I'm learning but slowly.
John P
Yeah sorry about the time scale. Too many great features we want and only 24 hours earth cycle :(
/Rune
Hi Rune
Fixed now - my error. I had entered
/scripts/teaCommerce/Advanced.js
instead of
/scripts/teaCommerce_Advanced.js
Your prompt support was much appreciated.
Moving forwards again...
John P
is working on a reply...