Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
You can also find the source code for the Tea Commerce here on github: https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco and the starter kit here: https://github.com/TeaCommerce/Starter-kit-for-Umbraco
Hope this helps,
Thanks for the tip about jsbeautfier :) will defiantly use that in the future!
I ended up finding the file on the github link you gave: https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/master/Source/Lib/Tea%20Commerce/tea-commerce.js Will have a play with it tomorrow and see what's causing the issue :)
You´re welcome, happy that I could help you.
Looking forward to hear from you, about what causing the issue
First - @Dennis - great help!
I've managed to find the issue now. Basically what is happening is; Because in the tea commerce file it extends the Array object with the contains method (Array.prototype.contains), when iterating an array using for-in (as they do in the one js library i'm using) it actually also enumerate the contains property. Which in turn was breaking the library. I'm going to try go through the library i'm using and change all for-in loops to use for instead and see if that works.
Actually I'm going to edit the source tea commerce js file to change the contains to a util on TCService rather than extending the Array object, as the for-in loop features alot in the js library i'm using :( lol
It would be amazing if you could make the method as a util method that just gets the array as a parameter. AND then made a pull request :)
Just done that :) Hopefully it is right, if not let me know what to change.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted