Code:
<!-- START category that links to an external site --> <script> // categoryURLs array as category Id => redirection URL // Please use this array to define your own redirection rules var categoryURLs = { '1234567' : '/index.html', // Sample 01 Category Page redirects to Homepage '2345678' : '/index.html' // Sample 02 Category Page redirects to Homepage }; // Add handler for Ecwid's OnPageLoad event if ( typeof(Ecwid) == 'object' && typeof(Ecwid.OnPageLoad) == 'object' ) { Ecwid.OnPageLoad.add(function(page) { // Redirect user if needed if ( typeof(page) == 'object' && 'CATEGORY' == page.type && typeof(categoryURLs[page.categoryId]) == 'string' && categoryURLs[page.categoryId].length > 0 ) { window.location = categoryURLs[page.categoryId]; } }); } </script> <!-- END category that links to an external site --> <!-- START product that links to an external site --> <script> // categoryURLs array as category Id => redirection URL // Please use this array to define your own redirection rules var categoryURLs = { '123456789' : '../sample-product-page.html' }; // Add handler for Ecwid's OnPageLoad event if ( typeof(Ecwid) == 'object' && typeof(Ecwid.OnPageLoad) == 'object' ) { Ecwid.OnPageLoad.add(function(page) { // Redirect user if needed if ( typeof(page) == 'object' && 'PRODUCT' == page.type && typeof(categoryURLs[page.productId]) == 'string' && categoryURLs[page.productId].length > 0 ) { window.location = categoryURLs[page.productId]; } }); } </script> <!-- END product that links to an external site -->
Also your js base file on github appears to be down:
[You can use the following js file as a base for your own one:
https://raw.github.com/gist/1373124/44bea3e8c112a4fcb9ad288ac2693b80dab073ed/ecwid_category_redirects.js]