title: Magento 1.9.2.1 related product not adding correctly
body: <p>I am building a Magento theme and am having trouble customising the way the related products work.</p>
  
  <p>By default as some of you will be aware the related products system works with checkboxes. You simply tick related items and click the main "add to cart" button to add all the products at once. </p>
  
  <p>I am wanting to add an "add to cart" button and quantity input for <strong>individual related items</strong>, so I can add them individually to the cart without adding the main product.</p>
  
  <p>I added the following code from the link below to the template/catalog/product/list/related.phtml.</p>
  
  <p><a href="http://sarathlal.com/add-to-cart-button-in-related-products-on-product-detail-page-magento/" rel="nofollow">http://sarathlal.com/add-to-cart-button-in-related-products-on-product-detail-page-magento/</a> </p>
  
  <p>This adds the "add to cart" button and quantity input perfectly but when the "add to cart" button is clicked on <strong>first</strong> related product in the list the <strong>main product</strong> on the page is added instead of the related item. When I click the <strong>second, third, fourth etc</strong> in the list it weirdly adds the correct related item.</p>
  
  <p>I have re-indexed everything and flushed all caches.</p>
  
  <p>Can anybody advise? I would really appreciate it.</p>
  
  <p><a href="http://i.stack.imgur.com/e70zQ.jpg" rel="nofollow">Screenshot to help with my description</a></p>