Siadou Posted June 9, 2013 Share Posted June 9, 2013 Hi, I'm setting up my prestashop online boutique (I use the 1.5.4 version of it) and I have trouble with packs. When a customer orders a pack, I need to appear on the final order, on the invoice and on my delivery slips, the exact list of products that are in this pack, along with the reference, name and quantity of each product. I suppose something has to be added to the invoice.tpl file (for the invoices), but have no idea whatsoever about what to add or how to proceed. Could you please help me? Thanks Julien Link to comment Share on other sites More sharing options...
mtporter Posted June 11, 2013 Share Posted June 11, 2013 I'm just surprised that this wasn't already built in. I also have several products that are packs and need the pack contents listed on the invoices. I hope this gets resolved soon. Link to comment Share on other sites More sharing options...
tuk66 Posted June 13, 2013 Share Posted June 13, 2013 Data of all pack items for PDF invoices are available in the M4 PDF Extensions module. It should be quite easy to get pack items in your desired form with this module. Link to comment Share on other sites More sharing options...
Timerider Posted March 31, 2016 Share Posted March 31, 2016 Hi, I've bought M4 PDF and am very impressed with the functionality! Great product, especially the PDF "print whole catalog"! Just one issue: I need to show the warehouse location for each item (regular and in packs). I've found an invoice PDF template which details the pack item names and the delivery slip showing the location of regular items but am unable to combine the two to show locations of pack items. Can anyone help? Most grateful for any help as I can't completely switch to prestashop until the warehouse gets locations per product! Thanks, Barry Link to comment Share on other sites More sharing options...
tuk66 Posted April 1, 2016 Share Posted April 1, 2016 Hi Barry, Thank you for using the M4 PDF Extensions module. There is not enough data to get the warehouse location of pack items in all cases. Even so, if you only use one warehouse or pack items are stored in the same warehouse as the pack itself, you can use this snippet: {foreach from=$order[orders].order_detail[detail].pack item=pack} <tr> <td class="zero" style="border: none; width: 4mm;"> </td> <td class="zero" style="border: none; padding: 0 3mm 0.3mm 0;"> <span class="smaller">{l s='Qty' mod='m4pdf'} {$pack.pack_quantity}</span> </td> <td class="zero" style="border: none; padding: 0 3mm 0.3mm 0;"> <span class="smaller"> {* {if $pack.reference != ''}{$pack.reference|escape:'htmlall':'UTF-8'}{else}---{/if}: *} {$pack.name|escape:'htmlall':'UTF-8'} </span> </td> <!-- this part is new --> <td class="zero" style="border: none; padding: 0 3mm 0.3mm 0;"> <span class="smaller"> {assign var="location" value=WarehouseProductLocation::getProductLocation($pack.id_product, $pack.id_product_attribute, $order[orders].order_detail[detail].id_warehouse)} {if !empty($location)}{$location|escape:'htmlall':'UTF-8'}{/if} </span> </td> </tr> {/foreach} in the Invoices - packs itemized template (m4_invoice_pack.tpl). 1 Link to comment Share on other sites More sharing options...
Timerider Posted April 2, 2016 Share Posted April 2, 2016 Thanks very much for your very quick reply and solution - it works perfectly in the delivery note tpl! ISSUE SOLVED Link to comment Share on other sites More sharing options...
Recommended Posts