I was going to try modifying invokeXSLT but the teaCommerce file is packed. While looking at the TeaCommerce.invokeXSLT function in Chrome console I noticed the 'html' argument at the end of this function definition and thought that should maybe be using the settings.dataType instead:
TeaCommerce.invokeXSLT
function (a,b,c){c=l.fixSettings(c);return l.callBase('InvokeXSLT',[a,b,c.umbracoLanguageId],null,c.async,c.successfn,c.errorfn,'html')}
That's a fantastic idea. And actually you could call it a bug, that your "datatype" setting is ignoed. I made a very small change to the Tea Commerce script, allowing the datatype to be altered with the settings and still setting it to html as default. It will be released with the next big release of Tea Commerce, which will be sometime next week.
BUT please write me at rg [at] teasolutions.dk and I will e-mail you the altered script files.
By the way. Tea Commerce is always shipped with the unpacked version of the JavaScript, teaCommerce_unpacked.js.
InvokeXSLT using json dataType
Hello fellow Umbracians,
I am trying to use the TeaCommerce.invokeXSLT JavaScript API method to get back some json data from a parent node using xslt.
The json that my xslt file returns looks correct when I call the base URL directly.
However, when setting the dataType to 'json' it still seems to be fetching HTML:
I was going to try modifying invokeXSLT but the teaCommerce file is packed. While looking at the TeaCommerce.invokeXSLT function in Chrome console I noticed the 'html' argument at the end of this function definition and thought that should maybe be using the settings.dataType instead:
Any help would be greatly appreciated!
Thanks,
Bryce Darling
Hi Bryce,
That's a fantastic idea. And actually you could call it a bug, that your "datatype" setting is ignoed. I made a very small change to the Tea Commerce script, allowing the datatype to be altered with the settings and still setting it to html as default. It will be released with the next big release of Tea Commerce, which will be sometime next week.
BUT please write me at rg [at] teasolutions.dk and I will e-mail you the altered script files.
By the way. Tea Commerce is always shipped with the unpacked version of the JavaScript, teaCommerce_unpacked.js.
/Rune
Rune,
It's great to know that the unpacked version is available, I must have overlooked it, oops!
I would definitely high-five you but unfortunately I lack the necessary karma. :)
Thank you so much,
Bryce
The files are sent. Please let me know if it behaves correctly. Didn't have the time to test it properly.
/Rune
is working on a reply...