Nested Forms Itemized Products in the Order Summary [RESOLVED]

I have 2 nested forms in my parent form. I’ve set up product fields in the parent field to pass the total amount of the product from the child forms. However, in the order summary it only displays the total amount of the parent’s product field. It does not show/itemize the products. The quantity is always 1 and the unit price is always the total instead of listing the total quantity
of the product in the nest form and the unit price assigned to the product.

I’ve tried to use the gpecf-itemized-product-options-order-summary-markup snippet but it’s not working. Do I need to add the Form ID somewhere? I noticed in the add filter line of code has a 10 and 6 in it but I don’t know what those number pertain to (i.e. —>
add_filter( ‘gpecf_order_sumary_markup’, ‘get_custom_order_summary_markup’, 10, 6 );

In the body of the notification email, using the tag {order_summary}

What am I doing wrong? Any help would be much appreciated!

I believe this is the code snippet you’ll need to use: snippet-library/gp-nested-forms/gpnf-child-products-in-parent-order-summary.php at master · gravitywiz/snippet-library · GitHub

There’s a video linked in the comment section of the code snippet which shows off this functionality: GP Nested Forms -- Include Child Products Directly in Parent Form Order Summary | Loom

P.s. the numbers 10 and 6 in the add_filter line is the filter priority (order) and number of parameters the callable will accept. It’s not numbers you would need to modify/configure in this instance.

1 Like

Thanks so much for clarification and pointing me in the right direction! I ended up going with the Gravity Wiz Better Pre-submission Confirmation snippet which gave me exactly what I was looking for in the end.

2 Likes