Created
August 1, 2012 08:32
-
-
Save makfruit/3225040 to your computer and use it in GitHub Desktop.
A drop-in script for Ecwid for redirection a visitor from featured products page to the main store page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var ecwid_ProductBrowserURL = 'http://www.example.com'; // change it to your store page URL | |
if (typeof(Ecwid) == 'object') { | |
// Add handler for Ecwid's OnPageLoad event | |
Ecwid.OnPageLoad.add(function(page) { | |
// If any Ecwid link is clicked, open the corresponding Ecwid page in the main product browser | |
if (window.location.hash.match(/\/~\//) !== null) { | |
window.location = ecwid_ProductBrowserURL + window.location.hash; | |
} | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment