View Single Post
  #1  
Old 01-07-2014, 10:20 AM
bcglobe's Avatar
bcglobe bcglobe is offline
Junior Member
 
Join Date: Jul 2013
Posts: 7
Default Single Product Widget Does Not Handle OnPageLoaded Callback

What I have done:
1. Created a product with options (of types SELECT and TEXTFIELD) in ecwid Control Panel

2. Copied the snippet from the product's Product HTML Codes into a blank file named ecwid-html-<product-id>.html

3. Appended these 2 functions to the html file:
<script type="text/javascript">

Ecwid.OnPageLoad.add
(
function(page)
{
alert('LoadingPage:' + page.type);
}
);

Ecwid.OnPageLoaded.add
(
function(page)
{
alert('LoadedPage:' + JSON.stringify(page));
}
);
</script>


4. Opened the file in IE

5. Actual Result: Only "LoadingPage" alert is shown. I am expecting to see "LoadedPage" alert after "LoadingPage" alert.

Kindly advise.