title: Calculate possible combinations for SKU
body: <p>I have this situation:</p>
  
  <ul>
  <li>a product with an SKU</li>
  <li>this product has attributes (checkboxes) who have a SKU suffix</li>
  <li>(imagine a product with addons)</li>
  </ul>
  
  <p>Attributes are always in a fixed order and are not manditory. The final SKU for a product is basesku + selected attributes' suffixes.</p>
  
  <p>For example a product with basesku <code>XXX</code> has 3 attributes with suffixes <code>A</code>, <code>B</code> and <code>C</code>.</p>
  
  <p>Possible combinations for this product are:</p>
  
  <pre><code>XXX-A
  XXX-A-B
  XXX-A-B-C
  XXX-A-C
  XXX-B
  XXX-B-C
  XXX-C
  </code></pre>
  
  <p>Because the attributes are in a fixed order, it is never possible to have <code>XXX-C-B</code> for example.</p>
  
  <p>What is the best way to calculate these SKU's?</p>
  
  <p>Edit: I should have told these attributes are dynamically created. So it is not possible to have attA + "-" + attB. I need a way to dynamically generate the list of possible SKU's</p>