PUPT: Show the Version of the AmeriCommerce software your site is running in your browsers console
I wrote a script that when included in the footer of a site theme will log the version of the AmeriCommerce software your site is running to the browser console for easy access. Simply add the following to the footer of your site theme:
<script>$.getScript('https://cdn.jsdelivr.net/gh/JoshuaA-WCCC/AmeriCommerce@585c14a5669529627d4240a1d2ab41c6b03881df/js/GetSiteVersion.min.js');</script>
Add the above line just before the following line in the footer of your theme:
</ac:pagelayout>
When AmeriCommerce releases updates and features you can just go to your site and check your browsers console to see if your site has been upgraded to a version that supports the new features or patches.
-
Very cool, thanks for putting that together
1 -
You can also add a shortcut in chrome/edge with this javascript (a bookmarklet), this will pop up the version in a quick javascript alert in the browser when you would like to know and would have the side benefit of keeping the html out of your theme:
javascript:(function()%7B(function()%7Bvar r %3D new XMLHttpRequest()%3Br.open("GET"%2C "%2Fstore%2Fsitemonitor.aspx"%2C true)%3Br.onreadystatechange %3D function () %7Bif (r.readyState !%3D 4 %7C%7C r.status !%3D 200) return%3Bvar data %3D r.responseText.split("%26")%3Bvar obj %3D %7B%7D%3Bfor(var i %3D0%2C l%3Ddata.length%3B i < l%3B i%2B%2B)%7Bvar key %3D data%5Bi%5D.split("%3D")%5B0%5D%3Bvar val %3D data%5Bi%5D.split("%3D")%5B1%5D%3Bobj%5Bkey%5D %3D val%3B%7Dalert("Version%3A " %2B obj%5B"Code Version"%5D)%3B%7D%3Br.send()%3B%7D)()%7D)()
1
Please sign in to leave a comment.
Comments
2 comments