Drupal Commerce: Theming the Add Products form (Bulk Production Creation) I am using Drupal Commerce Bulk Product Creation to add products to my site.

I would like to theme the Bulk Add Products form to make it more user-friendly to edit. 

I can use page--admin--commerce--products--add-bulk--PRODUCTNAME.tpl.php to override the form. However, I don't know what PHP code to use to print out the product fields.

I found some articles online (1, 2, 3) and have tried the following, but none of them work:

&lt;?php print render($content['form']['product:field_FIELDNAME']); ?&gt;
&lt;?php print render($content['form']['field_FIELDNAME']); ?&gt;
&lt;?php print drupal_render($field_FIELDNAME) ?&gt;
&lt;?php print render($field_FIELDNAME) ?&gt;
&lt;?php print drupal_render($vars['form']['field_FIELDNAME']);     ?&gt;
&lt;?php print drupal_render_children($form['field_FIELDNAME']); ?&gt;


Any pointers would be appreciated.
I have figured this out.

Step 1):
Find the ID of your form.
To do this, view the source of the form and search for "form" keep on searching until you see a field like this:

&lt;form enctype="multipart/form-data" action="SOME_URL_HERE" method="post" id="commerce-bpc-create-bulk-form" accept-charset="UTF-8"&gt;&lt;div&gt;


The id you want is in the id="" string

You need to tell Drupal where to find your tpl.php file.
In template.php add the following:

function YOURTHEME_theme($existing, $type, $theme, $path) {
    return array(
        'INSERT_ID_HERE' =&gt; array(
            'arguments' =&gt; array('form' =&gt; NULL),
            'template' =&gt; 'templates/add/node--add--TEMPLATE_NAME',
            'render element' =&gt; 'form',
            ),
    );
}


So if you were themeing a  Drupal Commerce Bulk Product Creation form, your code would look like this:

function YOURTHEME_theme($existing, $type, $theme, $path) {
    return array(
        'commerce_bpc_create_bulk_form' =&gt; array(
            'arguments' =&gt; array('form' =&gt; NULL),
            'template' =&gt; 'templates/add/node--add--bpc',
            'render element' =&gt; 'form',
            ),
    );
}


3) Create a tpl.php template file and save it in the appropriate directory.
In our example, the file is called node--add--bpc.tpl.php and is saved in templates/add

4) In your tpl.php file, insert variables for the fields on the form. Here is a list of the most common fields:

&lt;?php print drupal_render($form['product']['sku_fragment']); ?&gt;
&lt;?php print drupal_render($form['product']['title_fragment']); ?&gt;
&lt;?php print drupal_render($form['product']['commerce_price']); ?&gt;
&lt;?php print drupal_render($form['submit']); ?&gt;
&lt;?php print drupal_render($form['static_values']['field_YOUR_CUSTOM_FIELD']); ?&gt;


5) At the end of the tpl.php file, put the following code:

 &lt;?php print  drupal_render_children($form) ?&gt;  


It's very important you put this code, or you will get errors when trying to upload images.

6) The code in step 5, might print out fields you do not want. So you to have unset these fields. Here is a list of the most common fields to unset.

&lt;?php unset ($form['product']); ?&gt;
&lt;?php unset ($form['combinations']); ?&gt;
&lt;?php unset ($form['title']); ?&gt;
&lt;?php unset ($form['static_values']); ?&gt;
&lt;?php unset ($form['description']); ?&gt;


You put all this code on a line before:

 &lt;?php print  drupal_render_children($form) ?&gt;  


7) If you find that any of the steps don't work, be sure to flush your cache. You can do this at: yousite.com/admin/config/development/performance