title: Secondary sorting in Magento
body: <p>I have come across a problem which my developer says there is no solution to. </p>
  
  <p>I have an ecommerce site www.lovefashion.pk roughly 800 products to date. It has categories with collections of products from a particular brand and New Arrivals and Sale pages that show  a number of categories. The issue I am faced with is the way Magento displays these products on catalog pages.</p>
  
  <p>We create a custom sort 'BY date' and called it 'Latest' so I would choose a date for a collection and the catalog pages would show the collection with newest sort by date first and so on. Issue is with secondary sorting now. I have products with design codes say Brand A code 1-A, Brand A code 1-B, Brand A code 2-A and so on. When creating these products, we go alphabetically like 1-A,1-B, 2-A etc. </p>
  
  <p>Say a collection has 15 products and i have given all its products a sort by date of 15th April. Magento does the date sorting OK but secondary sorting i.e by product ID (oldest to newest) is what we cant find a way to implement. It shows products now with latest ID first, i.e 20-B, 20-A, 19-B, and so on till 1-A e.g <a href="http://www.lovefashion.pk/shop-by-price/" rel="nofollow">http://www.lovefashion.pk/shop-by-price/</a></p>
  
  <p>Is there a way to solve this problem? or can SQL manipulation do the trick? Will aprreicate any help</p>