I have a woocommerce store setup with 2 products that come in many variants, these are wristbands.
The customer is able to customise the product by selecting the colour, size, band type and they are able to add text to the band if they want to.
I have created a variable product with various dropdowns which is all good but I have come un-stuck trying to add a text field for the user to be able to write some text that is then saved and taken through the checkout field. The file that needs to be edited is: variable.php but I’m not sure how to achieve this.
I added a text field attribute to the variable product but this displays a dropdown on the front end and I don’t want it to do that i need to display 2 text fields that take user input which is then saved.
I found this question: Woocommerce Custom Product Text which is quite similar to what I want to create.
I want to do this stuff in code without having to buy an add-on and I keep coming across solutions with plugins that need to be purchased. I just need a little help with this if anyone can that would be great as I have looked online for a couple of days now and I’m sure its not difficult I just need a little help. Thanks
Adding this an answer so that other’s might find it:
I’d strongly recommend saving yourself some time by simply purchasing the this plugin, it’s only $49 dollars. However, if you really do want to figure this out for yourself; here’s something to get you started. You’ll need to hook into the following filters/actions: