Tagged: currency format, error
- This topic has 2 replies, 2 voices, and was last updated 7 years, 1 month ago by
mila_support.
- AuthorPosts
- April 18, 2016 at 20:13 #8473
AnonymousInactiveDear Supsystic,
After updating your plugin last week, a website of our client shows an error, and stopped working.
As you’ve mentioned a “bugfix” in currency formatting, I’m suspecting this is where things go wrong.Uncaught TypeError: Cannot read property ‘match’ of undefined —> tables.shortcode.js?ver=1.3.7:41
$(document).ready(function () { $('.supsystic-table').each(function () { var table = $(this), format = table.data('currency-format'), formatWithoutCurrency = format.match(/\d.*\d/)[0], currencySymbol = format.replace(formatWithoutCurrency, '') || '$', formatDelimiters = (formatWithoutCurrency.match(/[^\d]/g) || ['.', ',']).reverse(), delimiters = { decimal: formatDelimiters[0], thousands: formatDelimiters[1] }, ...etc.
The ‘formatWithoutCurrency’ part is row number 41.
Could you please work out a solution to this error?
Thank you in advance, thumbs up for a beautiful plugin!
PS. url of the troubled page = http://www.letsmeat.nu/bestellen/
April 18, 2016 at 20:34 #8474
AnonymousInactiveI ‘sort of’ fixed this issue myself by playing around and reading the code.
By changing ‘currency format’ under ‘editor settings’ of each of my tables, from ‘$1,000.00’ to ‘$1.000,00’ (note: switching period and comma) I resolved the errors from the console.
However, I don’t think this is the right solution, but it works!
PS. Perhaps this has something to do with our own currency settings vs. yours? (Dutch vs. US english).
April 19, 2016 at 23:14 #8526
mila_supportMemberHello!
We tried to reproduce this issue on our test servers – and have no luck with this. Most likely it was the problem with cache.
We have fixed problem with cache in our plugin and released new version. Please update plugin to the latest version and check the issue with currency format. - AuthorPosts
- You must be logged in to reply to this topic.