How to submit a Woocommerce form using a link button in Wordpress? (Elementor) - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Sunday, June 6, 2021

How to submit a Woocommerce form using a link button in Wordpress? (Elementor)

Example

Hi guys, basically - the "add to cart" button adds one of a product to cart - as shown by this HTML here:

<form class="cart" action="https://www.upcvs.com/product/value-package/" method="post" enctype="multipart/form-data">
    
        <div class="quantity hidden">
    <input type="hidden" id="quantity_60bbc6784d2e4" class="qty" name="quantity" value="1">
</div>

    <button type="submit" name="add-to-cart" value="5789" class="single_add_to_cart_button button alt">Add to cart</button>

        </form>

I wanted to know how one would integrate this form submission into the button above (the purchase now) in perhaps the form of a link? (essentially, clicking on "purchase now" would be the same as clicking as the add to cart).



source https://stackoverflow.com/questions/67853042/how-to-submit-a-woocommerce-form-using-a-link-button-in-wordpress-elementor

No comments:

Post a Comment