How to print the product variation separately from the submit/pay button in a Commerce add to cart form? I want to put the calculated product price between the "product variation" select widget and the "pay" button.

In commerce-product.html.twig (my products display an add to cart form on the product itself), I have this code:

&lt;article{{ attributes }}&gt;
  &lt;h2&gt;{{ product.title }}&lt;/h2&gt;
  {{ product|without('title', 'variation_price' }}
  {{ product.variation_price }}
&lt;/article&gt;


variation_price is the calculated price.


What is the name of the variable that contains the product variation select widget?  Answer: product.variations
How can I place the submit/pay button separately from the variation type selection widget?  Answer: ??


I tried using kint to debug but it broke my site.  (And then people on this site kindly explained how to fix it.)  So I now understand that the variable containing the widget that shows the variations is named product.variations, and this is actually the "Add to cart" form (since that is what I set the display widget to in the UI).

So I guess I need to print the "Add to cart" form twice, and in one instance show the submit button, and in the other instance show the select widget... But how do I do that?

I looked at the twig debug theme suggestions but they don't give me a template for the "Add to cart" form:

&lt;!-- FILE NAME SUGGESTIONS:
   * field--commerce-product--variations--contenttype.html.twig
   * field--commerce-product--variations.html.twig
   * field--commerce-product--contenttype.html.twig
   * field--variations.html.twig
   * field--entity-reference.html.twig
   x field.html.twig
This is how I fixed this issue:

Added this preprocess function in my .theme file

function YOURTHEME_preprocess_commerce_product(&amp;$variables) {

   // Get the commerce product.
   $product = $variables['elements']['#commerce_product'];
   // Pass the price.
   $variables['price'] = $product-&gt;variations-&gt;entity-&gt;getPrice();
}


And in my twig file I print the price like this:

{{ price|commerce_price_format }}