WooCommerce Quantity Parameter in URL - wordpress

I am building custom WooCommerce Add to Cart buttons and I'm encountering the following problem.
The URL for the buttons are as simple as: https://mywebsite.com/shop/?add-to-cart=131&quantity=6
131 is the product ID which is dynamically pulled from the product page. However, I also want to make the quantity input dynamic. On the page I inserted a simple HTML number input field with the ID: QTY.
What I want is that when the Add to Car button is clicked, the input from the number input field is added to the URL and then of course adds the right amount of products in the cart.
Thanks in advance!

Related

How to set the add to cart button to get the price from a form field?

I am currently working on a ecommerce site. The word press theme I'm using is Astra. I have a form which calculate the prices for certain products. I want the add to cart button to get the final price from the form. How can I do that? Please help.

WooCommerce Single Product Page Seperate Cost

I'm trying to add a second button to a product page with a updated price.
For example I'm using [add_to_cart id='$product->id'] which displays correctly, but I would like to assign this short code a custom price.
The results should show two buttons on a single product page. One with the regular price value and the other with the custom price value.
I tried doing this through variables, but need them in two buttons instead of a drop down.
Thanks for the help!

can i embed a single product into another page on wordpress so that it has the add to cart and variable options?

I have a single product with variables but I need it to show on a user profile page. I can easily put a sidebar in with best products or popular products but that means it needs another click to get to the product page. So I need the product displayed on a certain page with all the variables showing and add to cart also showing.

Show custom fields in products loop

I've added custom products fields with this tutorial http://www.remicorson.com/mastering-woocommerce-products-custom-fields/
Now i need to show them in the products loop like shown in the image below
The left part are table headings with the custom field names, on the rigs side are products with up to 4 products on one page (the client doesn't want more).
I'm stuck on the product loop display here, got the procuct variations to show on category page with the ability to add to cart, but can't wrap my head around this task so any advice how to show this would be appreciated

Woocommerce qty box just adds 1 product

I'm trying to make this work but i cannot solve it. In the single product page i have placed the product details in a tab, but the quantity box is no longer working. I also tried it with a text field, but it constantly adds just one product. Can anybody help me with this?
It seems that the submit button is not taking the amount into account...
Add to cart
Where data-quantity is not updating...

Resources