WE HAVE A PROBLEM.

We would like the ability to display variation groups on page builder pages. Looking at how these groups work, I've added this script to site-wide custom headers:


Unfortunately, this isn't working but we'd like to see if it's possible. I'm quite certain I'm just leaving something important out, but not sure what. Please let me know what I can do to get this running. Below is an example of how we would like it to appear, and below that, what is actually happening.


What it should look like:

I've only copied the outer HTML, to show what we want to see by default. But please notice that it does not expand when you click "VIEW ALL 52 ITEMS".

Adapters MP x MP Steel
This result has multiple product variations
View All 52 items

What it ACTUALLY looks like:

If I use the complete HTML code, it will only show up fully expanded. You'll that certain details are oddly placed, or don't load properly. I'm just not sure what to do from here. 

Adapters MP x MP Steel
This result has multiple product variations
View All 52 items

Product Variations

Part #
0
-1
-1
-1
AD2MP-2MP

AD2MP-2MP

$1.15 EA
AD2MP-2MP-L2

AD2MP-2MP-L2

$8.26 EA
AD2MP-2MP-L3

AD2MP-2MP-L3

$7.20 EA
AD2MP-4MP

AD2MP-4MP

$1.39 EA
AD2MP-4MP-2CH

AD2MP-4MP-2CH

$1.45 EA
AD2MP-6MP

AD2MP-6MP

$2.23 EA
AD4MP-4MP

AD4MP-4MP

$1.30 EA
AD4MP-4MP-2CH

AD4MP-4MP-2CH

$3.13 EA
AD4MP-4MP-L1%201%2F2

AD4MP-4MP-L1 1/2

$9.17 EA
AD4MP-4MP-L2

AD4MP-4MP-L2

$8.11 EA
AD4MP-4MP-L3

AD4MP-4MP-L3

$11.23 EA
AD4MP-4MP-L4

AD4MP-4MP-L4

$11.76 EA
AD4MP-4MP-L6

AD4MP-4MP-L6

$37.12 EA
AD4MP-6MP

AD4MP-6MP

$1.87 EA
AD4MP-8MP

AD4MP-8MP

$2.88 EA
AD4MP-8MP-2CH

AD4MP-8MP-2CH

$4.62 EA
AD4MP-12MP

AD4MP-12MP

$9.89 EA
AD4MP-16MP

AD4MP-16MP

$34.80 EA
AD6MP-6MP

AD6MP-6MP

$1.73 EA
AD6MP-6MP-2CH

AD6MP-6MP-2CH

$3.85 EA
AD6MP-6MP-L2

AD6MP-6MP-L2

$12.48 EA
AD6MP-6MP-L2%201%2F2

AD6MP-6MP-L2 1/2

$13.54 EA
AD6MP-8MP

AD6MP-8MP

$2.54 EA
AD6MP-8MP-2CH

AD6MP-8MP-2CH

$5.94 EA
AD6MP-12MP

AD6MP-12MP

$7.20 EA
AD8MP-8MP

AD8MP-8MP

$2.30 EA
AD8MP-8MP-2CH

AD8MP-8MP-2CH

$7.44 EA
AD8MP-8MP-CL

AD8MP-8MP-CL

$3.92 EA
AD8MP-8MP-L2

AD8MP-8MP-L2

$5.76 EA
AD8MP-8MP-L3

AD8MP-8MP-L3

$17.18 EA
AD8MP-8MP-L4

AD8MP-8MP-L4

$18.72 EA
AD8MP-8MP-L6

AD8MP-8MP-L6

$28.70 EA
AD8MP-12MP

AD8MP-12MP

$3.65 EA
AD8MP-16MP

AD8MP-16MP

$9.50 EA
AD12MP-12MP

AD12MP-12MP

$3.84 EA
AD12MP-12MP-L6

AD12MP-12MP-L6

$37.49 EA
AD12MP-12MPBH-LN

AD12MP-12MPBH-LN

$78.05 EA
AD12MP-16MP

AD12MP-16MP

$6.72 EA
AD12MP-20MP

AD12MP-20MP

$13.82 EA
AD16MP-16MP

AD16MP-16MP

$5.47 EA
AD16MP-16MP-L3

AD16MP-16MP-L3

$34.27 EA
AD16MP-16MP-L6

AD16MP-16MP-L6

$37.73 EA
AD16MP-20MP

AD16MP-20MP

$13.01 EA
AD16MP-24MP

AD16MP-24MP

$27.31 EA
AD16MP-32MP

AD16MP-32MP

$97.20 EA
AD20MP-20MP

AD20MP-20MP

$11.14 EA
AD20MP-24MP

AD20MP-24MP

$26.45 EA
AD20MP-32MP

AD20MP-32MP

$85.82 EA
AD24MP-24MP

AD24MP-24MP

$19.68 EA
AD24MP-32MP

AD24MP-32MP

$57.22 EA
AD32MP-32MP

AD32MP-32MP

$42.62 EA
AD32MP-32MP-B

AD32MP-32MP-B

$71.17 EA