PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Can we use the Add to Cart Woocommerce Shortcode as the submission button?

  1. matsilva
    Member

    I am attempting to "Not" use my Gravity Form inside of a Woocommerce Product Page so as not to have to create a custom page template and such.

    My question is if all of the price calculation from a Gravity Form in a page can be submitted to the Woocommerce cart as a purchasable item directly from the Gravity Form instead of just a "submit" or "purchase" button.

    This way I can have my form properly formatted in a page but upon submit it sends the pricing to the cart and can use the Gravity Forms / Woocommerce add-on if necessary which I do have.

    Would a shortcode used for the submit button be necessary?

    Posted 11 years ago on Friday November 16, 2012 | Permalink
  2. David Peralty

    Not that I know of as Woocomerce does all of the cart interactions, and not Gravity Forms, and as such, we don't hook into Woocommerce as much as it hooks into Gravity Forms.

    Posted 11 years ago on Friday November 16, 2012 | Permalink
  3. matsilva
    Member

    Thanks David.

    Then I am quite stumped here because there isn't really any kind of documentation on targeting 1 specific product ID for the single-product.php template that displays a product in WooCommerce.

    My form just ends up squashed in the product page when using the WooCommerce/Gravity Forms add-on in a product page.

    This is super easy to do in any WordPress page but nothing is documented for specific single products in regard to customizing the actual template its on.

    Posted 11 years ago on Friday November 16, 2012 | Permalink
  4. matsilva
    Member

    Update: I found a workaround to have the form display properly but upon completion of the form it won't allow you to add it to the cart due to an:

    "There was a problem with your submission. Errors have been highlighted below" error message but the form shouldn't do that if filled out correctly.

    Posted 11 years ago on Friday November 16, 2012 | Permalink