7

I have two issues which are appearing within my Chrome browsers console.

FYI, I am using WordPress 3.9, Gravity Forms 1.8.8 and WooCommerce Gravity Add On (latest).

Basically, when I am going into one of my products on my site (sorry, only have it running local on my machine), I am receiving the following two errors:

Error 1: Uncaught ReferenceError: gform is not defined

Error 2: Uncaught ReferenceError: gformCalculateTotalPrice is not defined

FYI, I am using the WooCommerce Gravity Forms Add On but am not using any pricing fields at all within my Gravity forms.

I am not sure how to track down why these errors are occurring or how to prevent them from occurring.

halfer
  • 19,824
  • 17
  • 99
  • 186
tonyf
  • 34,479
  • 49
  • 157
  • 246
  • 1
    Have you managed to resolve this issue? Because I'm getting the exact same error when using the `[product_page]` WooCommerce shortcode to show a product on the homepage – adamj Jul 23 '14 at 03:58
  • 1
    Same problem here "gform is not defined" from Gravity Forms Product Add-Ons plugin (WooCommerce extension) template gravityforms-product-addons-form.php ~line 183. As a workaround until bug is fixed by plugin developer, I added this simple javascript variable check to see if undefined: `code` if (typeof gform !== 'undefined'){ gform.addFilter('gform_product_total', function(total, formId) { return update_dynamic_price(total); }); } `code` – Marty McGee Feb 03 '15 at 18:20
  • Marty, did you add this code directly on the 'template gravityforms-product-addons-form.php ~line 183'? – jampafoo Nov 20 '16 at 05:32

1 Answers1

1

You have to define the jquery at header section.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

I faced same issue with Gravity Forms and WooCommerce after initialize jquery at header section its resolved for me.

So, i think you have to initialize jquery at header section.

Jayson
  • 1,105
  • 7
  • 25