Jump to content

fast add to cart by reference


ruisonika

Recommended Posts

Hello, does anybody knows or can give me a hint/help with this:
- I wanna a add a form with 2 input fields, one is product reference and other is quantity, and a submit button to add to cart.
Thanks for all the help.
I will buy you a coffee :)

<form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
  <input type="text" name="id_product" value="{$product.id}" id="product_page_product_id">
  <input
    type="text"
    name="qty"
    id="quantity_wanted"
    value="1"
    class="input-group"
    min="1"
    max="10000"
    aria-label="{l s='Quantity' d='Shop.Theme.Actions'}">
  <!-- submit -->
  <button
    class="btn btn-main add-to-cart"
    data-button-action="add-to-cart"
    type="submit">
    Add to cart
  </button>
</form>


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...