The product is added and when you do a manual refresh you will see a minicart in the bottom of the screen. But if you look in the console you'll see that the output is kinda odd.
And yes, the minicart.xslt is allowed to be used with invokeXSLT :)
My code looks like this:
/* When we add product to cart */ jQuery(".productAddToCart").live("click", function () { var nodeId = jQuery(this).attr('nodeid'); /* Add orderline is called using the Tea Commerce javascript API */ TeaCommerce.addOrderLine(nodeId, 1, false); return false; }); TeaCommerce.subscribeToOnCartUpdated(function (data) { var cart = jQuery('#minicart'); //Update the cart of the site //Fetch the new cart html with invokeXSLT and update the UI var cartJqHtml = jQuery(TeaCommerce.invokeXSLT('minicart.xslt', _nodeId, false)); console.log(cartJqHtml); cart.after(cartJqHtml); //cart.remove(); });
Yep, I have an idea. you can't pass along false as settings. You must create your settings like this {async:false}.
Same problem with your addOrderLine method. In that case it does'nt matter though. Nothing's happining after the servercall that you should wait for. So you could just do it like this:
invokeXSLT doesn't return any HTML ...
Link: http://teacommerce.sheriffone.com/products.aspx
Script: http://teacommerce.sheriffone.com/scripts/Shop.js
For some reason invokeXSLT doesn't get me any HTML.
I'm pretty much using this example: http://rune.gronkjaer.dk/en-US/2010/11/16/tea-commerce-javascript-api/#invokeXSLT
The product is added and when you do a manual refresh you will see a minicart in the bottom of the screen.
But if you look in the console you'll see that the output is kinda odd.
And yes, the minicart.xslt is allowed to be used with invokeXSLT :)
My code looks like this:
Yep, I have an idea. you can't pass along false as settings. You must create your settings like this {async:false}.
Same problem with your addOrderLine method. In that case it does'nt matter though. Nothing's happining after the servercall that you should wait for. So you could just do it like this:
/Rune
Awesome ... thanx alot.
is working on a reply...