title: Adding the onepage checkout on product page
body: <p>I have encounter a slight problem regarding magento checkout process.
  Currently I am using the list.phtml file to add orders into the cart, and upon changing the product, the cart is emptied and the newly selected product is added. I do this via this functionality:</p>
  
  <p>this is the form for deleting (i have the form key into it)</p>
  
  <pre><code>&lt;form action="&lt;?php echo $this-&gt;getUrl('checkout/cart/updatePost') ?&gt;" method="POST" name="emptyTheCart"&gt;
              &lt;?php echo $this-&gt;getBlockHtml('formkey'); ?&gt;
              &lt;button type="submit" name="update_cart_action" value="empty_cart" style="display:none" title="&lt;?php echo $this-&gt;__('Empty Cart'); ?&gt;" id="empty_cart_button"&gt;&lt;/button&gt;
        &lt;/form&gt;
  
  
  
  $('.item').click(function() {
  $(this).find('input:radio')[0].checked = true;  
  var formurl = $(this).find('input:radio').val();
  var datafile=$("#product_addtocart_form").serialize();
      var dataExecURL = "&lt;?php echo $this-&gt;getUrl('checkout/cart/updatePost') ?&gt;";
       var datafiles=$("#emptyTheCart").serialize();
       datafiles = datafiles + "&amp;update_cart_action=empty_cart";
  
       $.ajax({
              type : 'POST',
              data : datafiles,
              url  : dataExecURL,
              success: function()
              {
                    $.ajax({
                              type : 'POST',
                              data : datafile,
                              url  : formurl
  
  
  
                          });
              }
  
  
          });
  });
  </code></pre>
  
  <p>This part works very good.
  The thing is that on the Category page i have the following custom design in the Custom Layout Update:</p>
  
  <pre><code>&lt;block type="cms/block" name="opdracht_text" before="-"&gt;
          &lt;action method="setBlockId"&gt;&lt;block_id&gt;opdracht_text&lt;/block_id&gt;&lt;/action&gt;
      &lt;/block&gt;
  &lt;block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml" &gt;
  
  &lt;block type="cms/block" name=" shipping_method" &gt;
          &lt;action method="setBlockId"&gt;&lt;block_id&gt; shipping_method &lt;/block_id&gt;&lt;/action&gt;
      &lt;/block&gt;
  &lt;block type="checkout/onepage_shipping_method_available" template="checkout/onepage/shipping_method/available.phtml"/&gt;
  
  &lt;block type="cms/block" name="billing" &gt;
          &lt;action method="setBlockId"&gt;&lt;block_id&gt;billing&lt;/block_id&gt;&lt;/action&gt;
      &lt;/block&gt;
  
  
  &lt;block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/&gt;
  &lt;block type="cms/block" name="opdracht-delivery" &gt;
          &lt;action method="setBlockId"&gt;&lt;block_id&gt;opdracht-delivery&lt;/block_id&gt;&lt;/action&gt;
      &lt;/block&gt;
  
  &lt;block type="cms/block" name="payment_method" &gt;
          &lt;action method="setBlockId"&gt;&lt;block_id&gt; payment_method &lt;/block_id&gt;&lt;/action&gt;
      &lt;/block&gt;
  &lt;block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml"&gt;
                      &lt;block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/info.phtml"&gt;
                          &lt;action method="setMethodFormTemplate"&gt;&lt;method&gt;purchaseorder&lt;/method&gt;&lt;template&gt;payment/form/purchaseorder.phtml&lt;/template&gt;&lt;/action&gt;
                      &lt;/block&gt;
                      &lt;block type="core/template" name="checkout.onepage.payment.additional" as="additional" /&gt;
                      &lt;block type="core/template" name="checkout.onepage.payment.methods_additional" as="methods_additional" /&gt;
                  &lt;/block&gt;
  &lt;/reference&gt;
  </code></pre>
  
  <p>As a onepage checkout functionality I have added to magento the extension from</p>
  
  <p><a href="http://www.magentocommerce.com/magento-connect/one-page-checkout.html" rel="nofollow">http://www.magentocommerce.com/magento-connect/one-page-checkout.html</a></p>
  
  <p>when I navigate to my store_url/chekout/cart
  I can clearely see the cart and the shipping methods and update the price there and after that proceed to the checkout page at </p>
  
  <p>store_url/ onepage/</p>
  
  <p>where I have my billing + shipping + payment methods</p>
  
  <p>I have taken the blocks from the checkout.xml file from the layout folder from my template (default rwd template) and added them to the category page</p>
  
  <p>The main issue that I am having is the fact that upon opening the page I cannot view the shipping method until after I have selected a product and refreshed the page.
  The State/Province Field is not shown at all and also the Payment methods do not show up.</p>
  
  <p>The thing that I am currently trying to accomplish is that the checkout forms to be on the product page like in the following flow:</p>
  
  <p>Product Selection -> Shipping Method -> Billing Method -> Payment Method</p>
  
  <p>These are the steps that I am currently trying to put in one single page  ( the  product display page / category page )</p>