Woocommerce quantity field
-
Hi,
I’m a total novice with wordpress and woocommerce, but am managing to put a shop together bit by by bit. Sadly I’ve come across an issue that I hope your plugin can help me resolve.
I need the woocommerce quantity field to reflect a calculated field from your plugin.
For example, our customer might require 5 pieces of an item cut at 100mm.
I have created an input for quantity required(fieldname2) and length required in mm(fieldname3). As we sell items in our inventory package in metres I have created a field that calculates the required amount as follows.
fieldname2*(fieldname3/1000) = 0.5 which is great. The issue i’m having is getting the value to update the woocommerce quantity field, which I will hide from the customers view.
I have tried to add some script as per a thread on this forum, but to no avail
<script>jQuery(document).one('change','[id*="fieldname1"]', function(){jQuery('[name="quantity"]').val(this.value)});</script>
Please can you help me understand where I’m going wrong?
Thank you
The page I need help with: [log in to see the link]
- The topic ‘Woocommerce quantity field’ is closed to new replies.