title: Magento 1.9 - add a configurable product directly to cart from cross-sells in shopping cart
body: <p>I have a question about adding a configurable product directly from the cross-sell section to the cart on the shopping cart page. With a simple product, this is not a problem because it has no attributes. But for a configurable product normally I have to choose via a dropdown which properties I want to have for my product (like size or color). If I choose a configurable product as a cross-sell and I click on the "Add-to-Cart"-Button it will redirect me to the product detail page.</p>
  
  <p>So the idea would be to have something like a popup where I can choose the size and color directly and add the product (with the chosen properties) to the shopping cart. </p>
  
  <p>Is there a module which brings the functionality (I can't find it)? Or can I write something on my own like a form for each cross-sell?</p>
  
  <p>Like the form on the product detail page</p>
  
  <pre><code>&lt;form action="&lt;?php echo $this-&gt;getSubmitUrl($_product, array('_secure' =&gt; $this-&gt;_isSecure())) ?&gt;" method="post" id="product_addtocart_form"&lt;?php if($_product-&gt;getOptions()): ?&gt; enctype="multipart/form-data"&lt;?php endif; ?&gt;&gt;
      &lt;?php echo $this-&gt;getBlockHtml('formkey') ?&gt;
      &lt;div class="no-display"&gt;
          &lt;input type="hidden" name="product" value="&lt;?php echo $_product-&gt;getId() ?&gt;" /&gt;
          &lt;input type="hidden" name="related_product" id="related-products-field" value="" /&gt;
      &lt;/div&gt;
  ...
  </code></pre>