Use jQuery to update WooCommerce product quantity based on GravityForms selection
$25-100 USD
Status
Publicerad nästan åtta år sedan
$25-100 USD
Betalning vid leverans
I'm using the WooCommerce Gravity Forms plugin to integrate the flexibility of GravityForms with my product pages.
For reasons too lengthy to get into here (please just trust me that it's necessary), I'm using WooCommerce product variations on a product while also using a hidden GravityForms product with the same price. This is exemplified in the attached screenshots.
By doing this, I can use WooCommerce's inventory management and yet still use GravityForms' flexibility, particularly with being able to make the 'quantity' field something more human like 'How many people are you booking?' (Since each product is a stay at a hospitality business.)
And now finally to my main point. The issue is that if I have a (GF) quantity of 2, the price is correct since the hidden GF product is the same price as the WC product page that it's on, but when the order is submitted, it would only deduct a quantity of 1 from the WC product (since the WC quantity field isn't being used).
So! All I need to do is update the WC quantity field with the numeric value of the GF quantity. I believe that can fairly easily be done using jQuery, but I have no experience with it and to be honest, I think it'd be easier to simply pay someone who does. If that's you, I look forward to working with you :-)
Hi there - My name is Yogesh. I’ve read your brief..My team has 4 years experience designing and developing mobile apps and Websites.I would approach your project by starting with wireframes and getting the site completed, before starting the actual development phase. I am highly qualified for this project and would love to speak with you further about taking this project on. If you'd like to view my previous work, take a look at my Freelancer Portfolio.
Regards,
Yogesh
Thanks, Diamond looking forward for your reply.