Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Add an item to the cart using javascript instead of the button

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Add an item to the cart using javascript instead of the button

Tagged: add to cart javascript, code to add to cart, submit add to cart with code

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 2 months ago by Robert.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 17, 2013 at 6:53 pm #8962
    Robert
    Participant

    This may be a dumb question, but I have a need to submit information via a form and would like to be able to put an add to cart button on the page, but hidden, but still show the price, quantity and variations (I’ve figured out that part).

    The question is how can I “activate” the add to cart using php or javascript?

    April 18, 2013 at 5:58 am #55185
    admin
    Keymaster

    Each eStore payment buttons have a class attached to it. So using JQuery you can target that button and deactivate or reactivate it (set the status of the input form to be disabled) from your JQuery code. You will need good JQuery understanding to develop custom code like that though.

    Also, check this feature of eStore that might give you an alternative way to do what you are after:

    https://support.tipsandtricks-hq.com/forums/topic/estore-how-to-use-a-text-link-to-accommodate-the-purchase-of-a-product

    April 18, 2013 at 5:50 pm #55186
    Robert
    Participant

    That might be a great solution. The problem is I have a quantity and variation for the button that needs to be sent. If I could dynamically send that info it would work.

    Otherwise, what I need is to use code to “press” the hidden add to cart button after processing my form.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ