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 |
---|---|
21 | |
21 | |
9 | |
7 | |
6 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023