addElement doesn't work.

Posted almost 6 years ago by grcnhml

Post a topic
Answered
g
grcnhml

Hi All,


I am very new on fancy product designer. Firstly, I have tried to add a text and image to my designer.


In the sample Html, after the line of 


yourDesigner = new FancyProductDesigner($yourDesigner, pluginOpts);


I have added the line:


yourDesigner.addElement("image","images/designs/heart_circle.png","Test"); 


but I'm getting error


FancyProductDesigner-all.js:12604 Uncaught TypeError: Cannot read property 'addElement' of undefined

    at FancyProductDesigner.addElement (FancyProductDesigner-all.js:12604)

    at eval (eval at <anonymous> ((index):44), <anonymous>:1:14)

    at HTMLDocument.<anonymous> ((index):68)

    at c (jquery.min.js:3)

    at Object.fireWith [as resolveWith] (jquery.min.js:3)

    at Function.ready (jquery.min.js:3)

    at HTMLDocument.H (jquery.min.js:3)


Did I make any mistake or is there any issue related to addElement?


Thanks in advance


0 Votes

D

Deleted Agent posted almost 6 years ago Best Answer

you need to wait for the designer to be ready.


$yourDesigner.on("productCreate", function(){
yourDesigner.addElement("image","images/designs/heart_circle.png","Test"); 
});


should work.

0 Votes


5 Comments

Sorted by
rady kal

rady kal posted over 4 years ago Admin

Unfortunately we can't provide support without your license number. You need to find another programmer to help you or purchase a new license. 

0 Votes

S

Shrikant Miskin posted over 4 years ago

As I told you I dont have license number with me.

I was with old developer and he is no more.


0 Votes

rady kal

rady kal posted over 4 years ago Admin

Please open a support ticket on our website, so we can have a closer look at your issue.  

0 Votes

S

Shrikant Miskin posted over 4 years ago

I am facing this problem:
Uncaught TypeError: Cannot read property 'productThumbnail' of undefined

    at j (FancyProductDesigner-all.min.js?ver=4.9.0:15)

    at HTMLDivElement.<anonymous> (FancyProductDesigner-all.min.js?ver=4.9.0:15)

    at HTMLDivElement.dispatch (jquery.js?ver=1.12.4-wp:3)

    at HTMLDivElement.r.handle (jquery.js?ver=1.12.4-wp:3)

    at Object.trigger (jquery.js?ver=1.12.4-wp:3)

    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)

    at HTMLDivElement.<anonymous> (jquery.js?ver=1.12.4-wp:3)

    at Function.each (jquery.js?ver=1.12.4-wp:2)

    at a.fn.init.each (jquery.js?ver=1.12.4-wp:2)

    at a.fn.init.trigger (jquery.js?ver=1.12.4-wp:3)


Please help me

0 Votes

D

Deleted Agent posted almost 6 years ago Answer

you need to wait for the designer to be ready.


$yourDesigner.on("productCreate", function(){
yourDesigner.addElement("image","images/designs/heart_circle.png","Test"); 
});


should work.

0 Votes

Login or Sign up to post a comment