I try this
<div id="_desktop_cart"> <div class="blockcart cart-preview {if $cart.products_count > 0}active{else}inactive{/if}" data-refresh-url="{$refresh_url}"> <div class="header"> {if $cart.products_count > 0} <a rel="nofollow" href="{$cart_url}"> {/if} <i class="material-icons shopping-cart">shopping_cart</i> <span class="hidden-sm-down">{l s='Cart' d='Shop.Theme.Checkout'}</span> <span class="cart-products-count">({$cart.products_count})</span> <div id="panier"> {$cart nofilter} </div> <script src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script> <script>console.log(cart)</script> <script> var pdf = new jsPDF('p', 'pt', 'letter'); pdf.html(document.getElementById('panier'), { callback: function (pdf) { var iframe = document.createElement('iframe'); iframe.setAttribute('style', 'position:absolute;right:0; top:0; bottom:0; height:100%; width:500px'); document.body.appendChild(iframe); iframe.src = pdf.output('datauristring'); } }); </script> <!-- {$cart|dump} --> {if $cart.products_count > 0} </a> {/if} </div> </div> </div>
I have a pdf but the $car is array, how cant easy to have html deploy array ?
is use this lib: