title: PrestaShop: add javascript array elements using smarty
body: <p>I am trying to figure out way to add array elements from *.tpl files in PrestaShop.</p>
  
  <p>What I have is js variable:</p>
  
  <pre><code>var combinations = [];
  </code></pre>
  
  <p>What I need is to add elements to this array, from *.tpl file.
  I have available $combinations array of items, arrays, arrays of arrays etc., with keys assigned - so imploding makes no point.</p>
  
  <p>I am trying something like:</p>
  
  <pre><code>{addJsDef combinations[]=$combinations} but it of course won't work.
  </code></pre>
  
  <p>Since PS documentation is worse than poor, I guess it's just guessing day, but maybe someone has experienced similar problems...</p>