Advertisement
Guest User

Untitled

a guest
May 21st, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.99 KB | None | 0 0
  1. <div> <script type='text/javascript' src='http://app.ecwid.com/script.js?6872207'></script> <script type='text/javascript'>  xProductBrowser("categoriesPerRow=3","views=grid(3,3) list(10) table(20)","categoryView=grid","searchView=list","style=","defaultCategoryId=12722333"); </script> </div>
  2.  
  3. <script>
  4. // productURLs array as product Id => redirection URL
  5. // Please use this array to define your own redirection rules
  6. var productURLs = {
  7.   '38144130' : 'http://www.google.com',
  8.   '42138296' : 'http://www.ecwid.com'
  9. };
  10.  
  11. // Add handler for Ecwid's OnPageLoad event
  12. if (
  13.   typeof(Ecwid) == 'object'
  14.   && typeof(Ecwid.OnPageLoad) == 'object'
  15. ) {
  16.  Ecwid.OnPageLoad.add(function(page) {
  17.    // Redirect user if needed
  18.    if (
  19.      typeof(page) == 'object'
  20.      && 'PRODUCT' == page.type
  21.      && typeof(productURLs[page.productId]) == 'string'
  22.      && productURLs[page.productId].length > 0
  23.    ) {
  24.      window.parent.location = productURLs[page.productId];
  25.     }
  26.   });
  27. }
  28. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement