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.
User | RANK |
---|---|
37 | |
26 | |
14 | |
13 | |
9 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023