Retrieve product variations separately WooCommerce & show total price of variable product

Job ID: 31899693

Budget: €8 – €30 EUR

Im currently building a custom multistep order form for variable products in WooCommerce.

It is a basic jquery next step form build inside the standard Woocommerce variable product form.

<form class="variations_form cart" action="<?php echo esc_url( apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ) ); ?>" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->get_id() ); ?>" data-product_variations="<?php echo $variations_attr; ?>"

<div id="msform">
<fieldset class="step one">

**Get product variation A here.**

<input type="button" name="next" class="next action-button" value="Next" />

</fieldset>

<fieldset class="step-two">

**Get product variation B here.**

<input type="button" name="next" class="next action-button" value="Next" />

</fieldset>
</div>
</form>

In each step i want to get a specific variation of the current product. Now the variations are retrieved via the standard foreach loop.

Can anyone help me with retrieving each variation separately?

Question number two.

In the final step of the multistep form i want to display all the selected attributes and the total price.

Name of product variation A - Value
Name of product variaton B - Value
Total price of variable product - Display total price

All help is appreciated.

Thanks.
Related categories: PHP JavaScript AJAX WordPress WooCommerce