I want to add a custom "ADD TO CART" button in the single product page.
I have done it using the id of the product.
<?php echo '<a href="?add-to-cart='.get_the_id($product_id).'">ADD TO CART</a>'; ?>
I want to add quantity, variation and attribute tags too.
so that I can get sth like:
domain/myproduct/?add-to-cart=100&variation_id=200&attribute_pa_colour=blue