FYI: Smooth Scroll KB item and Woocommerce variable product conflict

Just a heads up so others using this combo don’t end up pulling out what hair they have remaining :slight_smile:

The JS code in the above-noted KB article conflicts with Woocommerce when using variable products. The quantity and add to cart will not be displayed. Remove the code, and all is well. Guess I’ll have to find a different method to do the scroll to link at the correct location :slight_smile:

Cheers!
Lyle

Hey Lyle,

We’ll definitely want to check that out. Let me play around with it a bit and see if I can recreate the issue.

Ben

Hey Lyle,

It seems the problem is worse, when you have that code on, a JS error is present on all posts and pages not using the Page Builder. I’ll go ahead and file a bug report. Thanks for the heads up! For now, you can try using the Page Builder for your products CPT even just for texts, it should work.

Ben

Ho Ben,

Thanks for looking into this :slight_smile:

Just to clarify, I was not using BB for any of the WC pages, just the basic WC ones. The JS was for the site’s home page to scroll to the various BB rows.

I’ll try your suggestion though and report back :slight_smile:

Cheers!
Lyle

No worries, Lyle! Let us know how it goes! :slight_smile:

Ben

Hey Lyle,

The problem was that the Builder JS doesn’t load on pages/posts not using it. We’ve updated the code on the KB article so it does a check before applying the code. :slight_smile:

Ben

Thanks Ben and crew! :slight_smile: … works perfectly now! :slight_smile:

Awesome! :slight_smile:

Hi support,

I’m having a problem similar to this when trying to display variable products from a chosen category. The variation and add to cart are not showing until you click through to the product page. I’m not using smooth scroll, just a plain text or woocommerce module (I’ve tried both)

Thanks, Gerry

Hi Gerry,

Unless you are also using the Knowledge Base code to provide a method to manually change the offset of the scroll-to-ID functionality, then I am afraid yours is more of a question for the WC crew :slight_smile:

That said, in my limited exposure to WC, I can say that the Variation and Add to Cart will NOT display until you are on a product page and also that you HAVE selected a Variation (unless, of course, you have set a Default Variation). :slight_smile:

Cheers!
Lyle

Hi Lyle,

OK thanks for clearing that up.

Cheers,

Gerry