Receiving Gravity Form Errors within WooCommerce Site
Asked Answered
W

1

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.

Wexford answered 10/6, 2014 at 10:1 Comment(3)
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 homepageYuma
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); }); } codeFears
Marty, did you add this code directly on the 'template gravityforms-product-addons-form.php ~line 183'?Nanon
C
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.

Cimbura answered 17/4, 2015 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.