Liquid, JavaScript, themes, sales channels
Hello,
My development store is:
https://testingstorewithapp.myshopify.com/products/sample-product
PW - "helpme" - please see image for further details.
I am using an app called product personalizer - https://apps.shopify.com/product-personalizer which created two fields for me called "Name" and "Text". There are behind the scenes conditional logic with those two fields affecting price.
I added in the line property field called "Copy Number and Text Simultaneously" myself in the product-template file.
I am trying to copy the values in Number and Text and then store it in that field whenever the two fields change. I tried document.getElementsByName and whatever else I could find on Stack Overflow. Here is an example of how I am trying to work through it.
I added the below script right below the line property field I created but it was unsuccessful.
<script>
var letters = document.getElementsByName('properties[Text]')[0].value;
console.log(letters);
</script>
but it results in Cannot read properties of undefined (reading 'value')
This task is very important to me and I may be underestimating the work required since the app is creating the fields I need, so I cannot access the value easily. If that is the case, please let me know if you are interested in helping me with this task for a monetary gain.
Thank you for your time and help. Appreciate any assistance with this.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024