How to show/render 'Add to Cart' button? I have a Commerce Kickstart 2 site.  I know how to create products and variations.  I used the Omega Kick Start theme and have implemented my own template files for the entire site.  Now I need to theme the shopping basket, starting with the "Add To Cart" button.  For the life of me - cannot get it right.

I've already tried the advice from this question -  but no luck.  For the record, my reference field is setup to render / display as Add to Cart form:



The Shopping cart block from Kickstart is enabled and set to my Content region:



The template file to render my product starts off like this:

&lt;?php
$nodew = entity_metadata_wrapper('node', $node);

/* Manually extract the product ID to get a new wrapper */
$product_id = field_get_items('node', $node, 'field_product')[0]['product_id'];
$productw = entity_metadata_wrapper('commerce_product', $product_id);
?&gt;

&lt;section class="home-hero about-course"&gt;
  &lt;div class="blurb content"&gt;
    &lt;h1&gt;&lt;?php echo $nodew-&gt;title_field-&gt;value(); ?&gt;&lt;/h1&gt;
    &lt;p&gt;&lt;?php echo $nodew-&gt;body-&gt;value(); ?&gt; &lt;/p&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div class="list-wrapper"&gt;
  &lt;div class="left"&gt;
    &lt;?php } $duration=$ nodew-&gt;field_duration-&gt;value(); if (!empty($duration)) { ?&gt;
    &lt;p&gt; Duration -
      &lt;?php echo $duration; ?&gt;
    &lt;/p&gt;
    &lt;?php } $assignments=$ nodew-&gt;field_assessments-&gt;value(); if (!empty($assignments)) { ?&gt;
    &lt;p&gt; No of assignments -
      &lt;?php echo $assignments; ?&gt;
    &lt;/p&gt;
    &lt;?php } ?&gt;
  &lt;/div&gt;
&lt;/div&gt;


What I would like to do is add/show the default, standard Commerce Kickstart "Add To Cart" button below all these attribute fields, and then hopefully I can use the standard commerce kick start shopping basket system (allowing me to just theme the relevant pages).

Just a side note - if I change the theme back to the Omega Kickstart 7.x-3.4 theme - my products show, and obviously the Add To Cart button as well, so I am fairly sure I did not break anything (uninstalled a module that was needed, or something like that).
There are a couple of things I would try to see what is going on.In the post that you referenced, they said the following code. render($content['field_product']).

Have you tried just rendering the whole content using the following render($content), which for you I think would be render($productw). This should render the whole product including the add to cart button.  I am guessing that if it doesn't show up then, then there is something wrong with how you are getting the content and field_product isn't even available to render.

Also, which display are you affecting when you change your product reference to Add to Cart form?  Your default or your teaser? Are you modifying the right template?