I'm trying to figure out how to update text elements in a product designer within woocommerce product page, using jquery. I've taken a look through http://jquerydoc.fancyproductdesigner.com/ but its not immedietely clear to me how to target specific text elements that I've set up in a product designer canvas.
Ideally, I'd like to be able to do something like:
$productDesigner[getElementByID['textline1'].value = "new value"
$productDesigner[getElementByID['textline2'].value = "another new value"
...but I can't figure out what the ID of text elements created it (chrome inspect not telling me anything useful). Is there a way to achieve this?
Thanks,
A Barton
Best Answer
a
a barton
said
almost 8 years ago
Think I figured this out:
fancyProductDesigner.setElementParameters({text:"this is the new text"},"TITLE OF TEXT ELEMENT");
I've made some progress on this, but I'm pretty sure this is not a very clean/efficient way to do it. Any thoughts/improvements? The below changes the text of the text element which has title "Line 1".
a barton
Hi,
I'm trying to figure out how to update text elements in a product designer within woocommerce product page, using jquery. I've taken a look through http://jquerydoc.fancyproductdesigner.com/ but its not immedietely clear to me how to target specific text elements that I've set up in a product designer canvas.
Ideally, I'd like to be able to do something like:
$productDesigner[getElementByID['textline1'].value = "new value"
$productDesigner[getElementByID['textline2'].value = "another new value"
...but I can't figure out what the ID of text elements created it (chrome inspect not telling me anything useful). Is there a way to achieve this?
Thanks,
A Barton
Think I figured this out:
fancyProductDesigner.setElementParameters({text:"this is the new text"},"TITLE OF TEXT ELEMENT");
- Oldest First
- Popular
- Newest First
Sorted by Oldest Firsta barton
Hi,
I've made some progress on this, but I'm pretty sure this is not a very clean/efficient way to do it. Any thoughts/improvements? The below changes the text of the text element which has title "Line 1".
jQuery("#fancy-product-designer-66 span[title='Line 1']").text("changed");
Thanks,
Aengus
a barton
Think I figured this out:
fancyProductDesigner.setElementParameters({text:"this is the new text"},"TITLE OF TEXT ELEMENT");
-
Adding Fancy Products to Categories
-
Shortcode for specfic product designer
-
What theme is recommended to use with FPD ?
-
Exclude Image from export
-
Google Font Family adds extras
-
Floating Dialog box
-
Uploadzone not working
-
Image transparency like in T-shirt demo
-
How do I get clipart
-
What does the LOAD button do / what is it for?
See all 2205 topics