View Single Post
Old 10-28-2015, 10:21 AM
Qetzal's Avatar
Qetzal Qetzal is offline
Ecwid Team
Join Date: Sep 2009
Posts: 10,847

Originally Posted by ukcfacademy View Post
Hi all,

I am attempting to postpone the load of ECWID until I activate the div in which it is stored, and generally gain more control over when the xSingleProduct() widget is loaded.

Currently, if I call the function xSingleProudct() in line in a script tag, as the documentation states, it all works fine.

However if I call the function after the page finished loading (e.g. on click, or on $(document).ready(...) ). then it replaces the entire contents of the page with:

<body><div id="SingleProduct-1"></div></body>


Is there a way to do something like this or is there some kind of obvious scope issue I am missing here?

Many thanks!

Try to replace our Single product widgets with custom buttons that use our JavaScript API to add items to a bag:
Eugene K.
Ecwid Team

@ecwid | Facebook | Ecwid Knowledge Base