
10-28-2015, 10:21 AM
|
 |
Ecwid Team
|
|
Join Date: Sep 2009
Posts: 10,847
|
|
Quote:
Originally Posted by ukcfacademy
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>
jsfiddle: https://jsfiddle.net/Lgxn8v3c/1/
Is there a way to do something like this or is there some kind of obvious scope issue I am missing here?
Many thanks!
|
Hi,
Try to replace our Single product widgets with custom buttons that use our JavaScript API to add items to a bag: https://help.ecwid.com/customer/en/p...CartaddProduct
|