tuk66 Posted August 28, 2013 Posted August 28, 2013 (edited) Quote Continued from previous post Work with PDF in PrestaShop on a higher level. Get more options for creating PDF documents in PrestaShop. Using templates, you can create your own look for PDF invoices, mailing labels, product catalogs, price lists, and even more. 10 reasons you should use this module 1) Customize PDFs quickly and easily 2) Online template editor 3) More than 70 templates to choose from 4) Wide range of customisable options available 5) Consistently high quality PDF output 6) More options, more accuracy 7) No restrictions for fonts and languages 😎 Seamless integration with your shop 9) Investment protection 10) More than 1000 satisfied customers HOW TO summary (last updated 2020-12-08) HOW TO incorporate a CMS page in invoice - for example Terms and conditions (Hamon Law) HOW TO show messages in invoice HOW TO show product features in invoice (using static functions) HOW TO show all product images in invoice (creating object instances) HOW TO use own fonts HOW TO disable the "Update it!" option in List of modules HOW TO fix font problem after updating Adobe Reader DC (Cannot extract the embedded font...) HOW TO show current year in invoice HOW TO print product names in two languages at once in invoice HOW TO create database query directly in template HOW have the templates changed in v3.0.0 Some problems this module solves https://www.prestashop.com/forums/topic/166816-pdf-invoice-in-different-prestashop-versions-wrong-amounts-updated/ https://www.prestashop.com/forums/topic/398872-inaccurate-credit-slip-in-16011/ https://www.prestashop.com/forums/topic/429621-inaccurate-credit-slip-in-16014/ https://www.prestashop.com/forums/topic/469142-inaccurate-credit-slip-in-1611/ More information on http://www.presta-ad...extensions.html Edited December 8, 2020 by tuk66 (see edit history) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted September 2, 2013 Posted September 2, 2013 There are 2 videos available: Trailer (1 min) Quick Guide (15 min) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted September 3, 2013 Posted September 3, 2013 Now the module is available even at PrestaShop Addons. 1 Share this post Link to post Share on other sites More sharing options...
skeemr Posted September 9, 2013 Posted September 9, 2013 Is this compatible with 1.5.5? Thanks Share this post Link to post Share on other sites More sharing options...
tuk66 Posted September 9, 2013 Posted September 9, 2013 (edited) Yes, it is. There is only a little issue with translations of texts in templates. This issue will be fixed in the next version (1.9.1). How to fix it myself Find all {l s='text to translate'} blocks in your template and add mod='m4pdf' like in this example to all of them: {l s='no orders' mod='m4pdf'} Edited September 9, 2013 by tuk66 (see edit history) Share this post Link to post Share on other sites More sharing options...
mfedorets Posted September 9, 2013 Posted September 9, 2013 (edited) . Edited September 9, 2013 by mfedorets (see edit history) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted September 10, 2013 Posted September 10, 2013 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOG v1.9.1 (2013-09-10)- Fixed missing texts for translation from templates in PrestaShop v1.5.5.0 (all templates improved) Add mod='m4pdf' to all Smarty tags for translation in your own templates, for example like this: {l s='no orders' mod='m4pdf'}- Added German translation (thanks to Mischa Spörer)- Added Dutch translation (thanks to SD-Webdesign)- Fixed displaying images in invoices in some cases (PrestaShop v1.4) 1 Share this post Link to post Share on other sites More sharing options...
Totti Posted September 19, 2013 Posted September 19, 2013 I would like to propose an amendment.Select the state to send the invoice via e-mail. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted September 27, 2013 Posted September 27, 2013 You can set behaviour of e-mails in "Order statuses". Sending of e-mails depend on core PrestaShop functionality and every single payment module. The module just replaces the built-in invoice by the own one. The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOGv1.9.2 (2013-09-27)- New data about the customer or employee logged for all templates ($user)- Fixed switching between templates and hidden templates- Fixed product customization in case when more than one customization exist- Changed displaying of image product customization- Fixed duplicated items in supply orders (only PrestaShop v1.5 with multi-shop feature) Share this post Link to post Share on other sites More sharing options...
logz05 Posted September 27, 2013 Posted September 27, 2013 I don't often write reviews, but this module is a must for anyone trying to format any of the PDF's that Prestashop can produce which frankly often do not meet the requirements of various EU countries. It works straight out of the box with very many examples and if you need to customize it isn't that difficult using the examples. I needed some help with customer message and the help was great quality and quick.....can't ask for much more! Share this post Link to post Share on other sites More sharing options...
ManfredMOD Posted October 5, 2013 Posted October 5, 2013 (edited) I have a little problem, see screenshot.Thanks for the help.Best regards Manfred Ich habe ein kleines Problem, siehe Screenshot.Danke für die Hilfe. Beste Grüsse Manfred P.S. PS Version 1.5.5.0 m4_pdf_extension_test.pdf Edited October 5, 2013 by ManfredMOD (see edit history) Share this post Link to post Share on other sites More sharing options...
Guest Posted October 5, 2013 Posted October 5, 2013 Tuk66 Did you get anywhere with the thought of customer statements? Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 6, 2013 Posted October 6, 2013 I have a little problem, see screenshot. Thanks for the help. Best regards Manfred Ich habe ein kleines Problem, siehe Screenshot. Danke für die Hilfe. Beste Grüsse Manfred P.S. PS Version 1.5.5.0 The footer content is located between the <htmlpagefooter> and </htmlpagefooter> tags. Some information is obtained from the $conf array and you can change it or insert your own one as a plain text. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 6, 2013 Posted October 6, 2013 Tuk66 Did you get anywhere with the thought of customer statements? To revive the memory: So select a customer and produce a statement detailing all their orders in a certain time frame. We are starting to take orders via purchase order so it would be useful to be ale to send a statement at the end of the month for payment I think that a tuned templated could do it with Orders data. To select from-to dates and group orders by the customers. With some filtering and selecting the customer statement could be done. It will depend on your exact requirements. Share this post Link to post Share on other sites More sharing options...
xchriz Posted October 8, 2013 Posted October 8, 2013 (edited) Hi, I've just installed the 1.9.2 version, all installation is ok, but when i try do modify a template the modules give me always this error: Admin login required Better : i have just " 2 click action" then it start to give the error. I think the problem is about the check after this line code in pdf.php: $myCookie = new Cookie('psAdminM4'); But I don't know if it's a my fault on configuration.. Obviously I'm superadmin in BO. Can you help me? Thanks chris Edited October 8, 2013 by xchriz (see edit history) Share this post Link to post Share on other sites More sharing options...
moparmaniac Posted October 8, 2013 Posted October 8, 2013 Hello, This module is very helpful! But I lack the skills to fix a small problem. I would like to be able to display the prices with VAT, in the catalog section. Could someone please help me with this line? <span class="bold">{l s='Price:' mod='m4pdf'}</span> {displayPrice price=$products.price currency=$conf.currency_current} Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 9, 2013 Posted October 9, 2013 Hi, I've just installed the 1.9.2 version, all installation is ok, but when i try do modify a template the modules give me always this error: Admin login required Better : i have just " 2 click action" then it start to give the error. I think the problem is about the check after this line code in pdf.php: $myCookie = new Cookie('psAdminM4'); But I don't know if it's a my fault on configuration.. Obviously I'm superadmin in BO. Can you help me? Thanks chris I found that the behavior of cookies is strange since version 1.5.5.0. Simply cookies lose parts of values. I tried my best, thanks to the use of own cookies. Anyway, send me (PM) please your Advanced Parameters > Configuration Information and the most exact process how the error occurs. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 9, 2013 Posted October 9, 2013 Hello, This module is very helpful! But I lack the skills to fix a small problem. I would like to be able to display the prices with VAT, in the catalog section. Could someone please help me with this line? <span class="bold">{l s='Price:' mod='m4pdf'}</span> {displayPrice price=$products.price currency=$conf.currency_current} Try {displayPrice price=$product[products].price_final currency=$conf.currency_current} There is also second options to calculate the price using tax rate ($product[products].default_country_tax.rate). 1 Share this post Link to post Share on other sites More sharing options...
moparmaniac Posted October 9, 2013 Posted October 9, 2013 Try {displayPrice price=$product[products].price_final currency=$conf.currency_current} There is also second options to calculate the price using tax rate ($product[products].default_country_tax.rate). The first one worked out great! Thank you! Share this post Link to post Share on other sites More sharing options...
way1 Posted October 13, 2013 Posted October 13, 2013 Dear Vladimir! It is fantastic module. But I have a problem with it. I am using Prestashop 1.5.6 and the module version 1.9.2. I turn on option in "Payment module" to send a PDF invoice to a customer. But customer already got ugly Prestashop version of invoice instead generated by M4PDF. In order history a customer can see invoice generated by M4PDF, i.e. all is OK here. I also compared: \modules\m4pdf\override\classes\pdf\PDF.php override\classes\pdf\PDF.php both are identical. Cannot understand why PDF invoice in E-mail still is Prestashop version. Please help! 1 Share this post Link to post Share on other sites More sharing options...
scorpiusthegreat Posted October 13, 2013 Posted October 13, 2013 Hi, first of all kudos for your wonderful module. I created two new templates (attached) to print invoices and delivery slips listed by reference (pdf examples attached), now I need to add two more features to those templates: 1) in the invoce template I need partial sums to be calculated for each reference group in addition to the grand total at the end of the document 2) in the delivery slip template I need to print each reference group on a single separate page repeating headers and footers on each page Hope someone can help me ! thx Andrea m4_invoice_pack_reference_final.zip delivery.pdf invoice.pdf Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 14, 2013 Posted October 14, 2013 Dear Vladimir! It is fantastic module. But I have a problem with it. I am using Prestashop 1.5.6 and the module version 1.9.2. I turn on option in "Payment module" to send a PDF invoice to a customer. But customer already got ugly Prestashop version of invoice instead generated by M4PDF. In order history a customer can see invoice generated by M4PDF, i.e. all is OK here. I also compared: \modules\m4pdf\override\classes\pdf\PDF.php override\classes\pdf\PDF.php both are identical. Cannot understand why PDF invoice in E-mail still is Prestashop version. Please help! I have seen something similar in PrestaShop 1.5.2.0 where the /override/classes/pdf/PDF.php file has been there but never really overrided. An autoload bug. Anyway, I tested the module v1.9.2 in Prestashop v1.5.6 and it works fine for me. So I think it can be something wrong in your installation. I can only inspect this directly on your server - PM me if you wish. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 14, 2013 Posted October 14, 2013 Hi, first of all kudos for your wonderful module.....Hope someone can help me ! thx Andrea PM sent. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 15, 2013 Posted October 15, 2013 Hi, I've just installed the 1.9.2 version, all installation is ok, but when i try do modify a template the modules give me always this error: Admin login required .... This cookie issue, which occurs in Chrome only, is going to fix in the 1.9.3 version today. 1 Share this post Link to post Share on other sites More sharing options...
xchriz Posted October 15, 2013 Posted October 15, 2013 Hi, I've a question about translations of texts in templates.I've added some new label to translate in a template, with new rules, ex: {l s='CE1334' mod='m4pdf'} They're translated/compiled correctly if i display the pdf within the module itself, but if I click the delivery/invoice button in the order-list page of BO this does not happen.I don't know if this module can create problems, but i've installed this : http://addons.prestashop.com/en/bulk-update-prestashop-modules/8137-massive-customer-orders-management.html Thnx Chris Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 15, 2013 Posted October 15, 2013 Do you have the language settings feature in Back Office activated? Can you change the language of the printed invoice there? What will happen? Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 15, 2013 Posted October 15, 2013 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOGv1.9.3 (2013-10-15)- Added "customer_message" data in orders/invoices (PrestaShop v1.4 and later)- Added the link to the Quick Video Guide on YouTube in the administration of the module- Fixed a display problem when no order history was saved within the order process- Fixed missed icons in the administration of the module in PrestaShop v1.5.5.0- Fixed an cookies issue in the administration of the module in Chrome Share this post Link to post Share on other sites More sharing options...
xchriz Posted October 15, 2013 Posted October 15, 2013 Do you have the language settings feature in Back Office activated? Can you change the language of the printed invoice there? What will happen? I've the language settings feature activated, i can change the language, but with no difference in the output. this is the href for delivery button (current BO language : English) index.php?controller=AdminPdf&token=xxx&submitAction=generateDeliverySlipPDF&id_order=21&id_lang=1 I've translated the labels in all places : (Language: English (United States), Theme: None) (Language: English (United States), Theme: default) (Language: English (United States), Theme: newatch) Chris Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 15, 2013 Posted October 15, 2013 Look at these folders:/modules/m4pdf/translations /themes/default/modules/m4pdf/translations /themes/newatch/modules/m4pdf/translations Where is the latest translation? Your translation done under (Language: English (United States), Theme: None) should apply. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted October 18, 2013 Posted October 18, 2013 I've the language settings feature activated, i can change the language, but with no difference in the output. this is the href for delivery button (current BO language : English) index.php?controller=AdminPdf&token=xxx&submitAction=generateDeliverySlipPDF&id_order=21&id_lang=1 I've translated the labels in all places : (Language: English (United States), Theme: None) (Language: English (United States), Theme: default) (Language: English (United States), Theme: newatch) Chris I have found the problem with English translations in Back Office > Orders (only). It will be fixed in the next version soon. 1 Share this post Link to post Share on other sites More sharing options...
korni Posted November 5, 2013 Posted November 5, 2013 Hi, I have a problem. I turned on "PDF Catalog Page" in settings, and when I press in front office to get information "invalid call type" sorry for my english Share this post Link to post Share on other sites More sharing options...
tuk66 Posted November 5, 2013 Posted November 5, 2013 Where can I test it? Share this post Link to post Share on other sites More sharing options...
korni Posted November 5, 2013 Posted November 5, 2013 @tuk66 I sent private message Share this post Link to post Share on other sites More sharing options...
tuk66 Posted November 6, 2013 Posted November 6, 2013 Hi, I have a problem. I turned on "PDF Catalog Page" in settings, and when I press in front office to get information "invalid call type" m4pdf.jpg sorry for my english For all. Fixed. Nested forms in the custom theme. Moving the original closing </form> tag up fixed that. Share this post Link to post Share on other sites More sharing options...
the hat lady Posted November 11, 2013 Posted November 11, 2013 I purchased this module based on what it advertised it could do. To find when I downloaded the version being sold was not the latest. My module tells me there is a newer version but I am unable to locate where to download an update. Can you please advise where to locate the up dates. Regards Share this post Link to post Share on other sites More sharing options...
tuk66 Posted November 12, 2013 Posted November 12, 2013 You probably purchased the module at PrestaShop Addons. List of versions to download is a bit confusing. Search always for the latest version. For now, Full version compatibility v1.9.3. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted November 12, 2013 Posted November 12, 2013 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOGv1.9.4 (2013-11-12)- Added a link to the page for translation in the administration of the module- Fixed a problem with the translation of English texts in some cases- Fixed proper displaying of product images in the administration of the module (Catalog, PrestaShop v1.5) 1 Share this post Link to post Share on other sites More sharing options...
the hat lady Posted November 12, 2013 Posted November 12, 2013 I purchased from http://www.presta-addons.com and for the life of me can not see where I can download the up dates. Share this post Link to post Share on other sites More sharing options...
Guest Posted November 12, 2013 Posted November 12, 2013 I purchased from http://www.presta-addons.com and for the life of me can not see where I can download the up dates. Log in to your account on that site, then go to Order history. Then click on the order for the module The click on the name of the product and it will download the latest version Share this post Link to post Share on other sites More sharing options...
tuk66 Posted December 5, 2013 Posted December 5, 2013 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOG v1.9.5 (2013-12-05)- Added support for creating catalogs for independent shops in multishop- New templates "Catalog, multishop" and "Catalog page, multishop"- Fixed a problem with the translation in some cases (PrestaShop v1.4) Share this post Link to post Share on other sites More sharing options...
cong2013 Posted December 11, 2013 Posted December 11, 2013 Hi, I just bought your Module and have a problem concerning the language of the created pdfs. I switched on the lang_selector in your module, translated the invoice I use to test to German, then translated ALL "INVOICE #" I found in every template to "Rechnung #". However no chance to print invoice in German. Translation was done in BO using your link. The lang_selector in the BO ignores both /customers lang/individual setting/. Using PS 15.6.0 + "Warehouse" theme from themeforest on XAMMP testserver, BO lang=German, customer languages both german and english. I'm pretty shure im missing something realy stupid ;-) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted December 12, 2013 Posted December 12, 2013 Be sure that you are using the latest version of the module (1.9.5). PDF translations has nothing to do with Front Office themes so be also sure you have translated text strings under Localization > Installed modules translations > Core (no theme selected). Share this post Link to post Share on other sites More sharing options...
cong2013 Posted December 12, 2013 Posted December 12, 2013 Be sure that you are using the latest version of the module (1.9.5). PDF translations has nothing to do with Front Office themes so be also sure you have translated text strings under Localization > Installed modules translations > Core (no theme selected). Hi, I set up a complete clean 1.5.6.0 with your module. Languages: German (default BO),en_US, Czech Translated M4_invoice.tpl in the core to german (czech already exists) - I checked /modules/m4pdf/translations/de.php and its fine. BO m4_invoice.tpl and a deliveryslip are assigned to your module In your Module where I can modify the templates everything works fine - the m4_invoice is printed in en,de,cz. In the BO of Prestashop, in the overview of the orders the widget where I can switch languages is shown. However, the m4_invoice does not print in German - (english and czech is working) ....confused.... why is this working in the module and not in the Prestashop BO .... Share this post Link to post Share on other sites More sharing options...
tuk66 Posted December 12, 2013 Posted December 12, 2013 (edited) Fixed. This issue was caused by German as the default language (1: German, 2: English). Usually the default language is English. Now the module works correctly with all common and less common combinations of installed languages. Edited December 20, 2013 by tuk66 (see edit history) Share this post Link to post Share on other sites More sharing options...
markus25 Posted January 8, 2014 Posted January 8, 2014 Dear Vladimir How can I display the discount prices on " catalog sorted by catagory organized in grid" Thanks Share this post Link to post Share on other sites More sharing options...
tuk66 Posted January 13, 2014 Posted January 13, 2014 The solution depends on the structure of specific prices and the desired form of view. Basically, it is about combining of the "Catalog with specific prices, filtered" and "Catalog sorted by category organized in grid" templates. Answered also at "Addons Messages". Share this post Link to post Share on other sites More sharing options...
tuk66 Posted January 23, 2014 Posted January 23, 2014 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOG v1.9.6 (2014-01-23)- New feature for creating PDF catalogs in the category detail page as well as any shop page (m4PDFCategory and m4PDFCatalog hooks) Use at a CMS page specified in the "Catalog" template- New template "Category page", use specified in the template- New template "Category page, multishop", use specified in the template- New template "Catalog sorted by category organized in grid, price with tax"- New template "Orders with Tax v2" for Orders (lists)- Added feature to set invoice and credit slip file names in different languages (Front Office)- Renamed templates from "Catalog page" to "Product page" and from "Catalog page, multishop" to "Product page, multishop"- Added tooltips near the template settings in the administration of the module- Added ability to enforce http/https protocol in image URL (force_protocol option in imageLink and productCoverImageLink)- Dates are now formatted according to settings under the language administration (PrestaShop v1.4.5.0 and later)- Fixed Pre-Tax product amounts in VAT breakdown (rare combination of amount, tax rate and PrestaShop version)- Fixed the catalog for one product in the administration of the module in some cases (PrestaShop v1.5)- Fixed "Function displayDate() is deprecated" warning (PrestaShop v1.5) 1 Share this post Link to post Share on other sites More sharing options...
Totti Posted January 23, 2014 Posted January 23, 2014 The look in addons Prestashop. Share this post Link to post Share on other sites More sharing options...
bartbh Posted January 24, 2014 Posted January 24, 2014 Is there a way to display alterings row (gray and white) like the default pdf invoice from Prestashop? (odd/even rows) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted January 24, 2014 Posted January 24, 2014 No problem. Just change the style of odd and even rows. 1 Share this post Link to post Share on other sites More sharing options...
bartbh Posted January 26, 2014 Posted January 26, 2014 And where can I change it? It can't find it in the template editor (I've used invoice V2 as a base for my template). Share this post Link to post Share on other sites More sharing options...
tuk66 Posted January 27, 2014 Posted January 27, 2014 Just a hint: Create two CSS styles, for odd and even rows (background color etc.). Then apply the odd style to the odd rows, and the even style to the even rows. {assign var='odd' value=0} {foreach ...} {assign var='odd' value=($odd+1)%2} <td class="{if $odd}odd{else}even{/if}">.... Share this post Link to post Share on other sites More sharing options...
way1 Posted January 27, 2014 Posted January 27, 2014 Dear author, could you add the template of delivery slip that can be helpful for courier services that ship to door. The template should contain: 1. The field "other" of table ps_address that usually used as admin's comments for shipping address. We describe here notes for couier. 2. As the second page of delivery slip - print of the Google map with shipping address. Could you add such template in next version of your module or explain here how we can do it ourselves. Thank you. Share this post Link to post Share on other sites More sharing options...
way1 Posted January 27, 2014 Posted January 27, 2014 (edited) Also could you add, if it possible at all, custom fields something like in MS Access. This fields are fields that popped out before generating an PDF and filled manually by admin. I think i will be very helpful for eny purposess. For example when printing an delivery slip the module ask user shipping time suitable for customr. After filling the pop-up field by, for example, 10am-4pm, the delivery slip wii be printed with that information in appropriate place of the slip. Also in such manner we can add hot information regarding an order before it's shipping, or onetime comment for an order etc. How it should work? 1. In M4PDF configuration panel admin adds fields and give the a name, for example, time_period_for_shipping other_notes etc. 2. After that admin place that pop-up custom field in appropriate places of an template. 3. When starting generation of an PDF the module checks avaliability in template such custom fields and pop-up them. After manual filling the fields by admin the module generates final PDF. Edited January 27, 2014 by Lion1 (see edit history) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted January 28, 2014 Posted January 28, 2014 Thank you for the ideas. I'm sure that some will appear in future versions. Stay tuned. Share this post Link to post Share on other sites More sharing options...
way1 Posted January 28, 2014 Posted January 28, 2014 (edited) Thank you for the ideas. I'm sure that some will appear in future versions. Stay tuned. Fine! You are very friendly programmer. By the Way non attaching of invoice to order confirmation e-mail was my problem, not your module's bug. Also one more idea maybe mad as i am not programmer at all. I don't know, have ony or some kind of modules such thing like "output". I mean some infromation that displayed to customer or to admin by a module. For example Order IP Address Verification module of PrestoChangeo shows the order IP information to administrators. And I mean this as "output" of this module. For blocks with advertising - "output" is advertising text or image or both. So if it possible and there is a way to catch this output of some kind of modules, you can add to your module a way to put such outputs in documents. For example, it will be very good to place at the bottom of each invoice image and text of advertising of current sales from a module of he site. And this can boost sales as the customer will see these sales on his printed invoice. Or you can add at the bottom of invoce the row of related products from crosselling module. Or maybe print at the bottom of invoice reminder that the customer can get additional discounts at his bithday - the "output" of appropriate module. and many other possibilities. Edited January 28, 2014 by Lion1 (see edit history) Share this post Link to post Share on other sites More sharing options...
Tuszu Posted February 5, 2014 Posted February 5, 2014 I'm sorry if this question show earlier. Can I change manually the number of invoice with this extension? Share this post Link to post Share on other sites More sharing options...
tuk66 Posted February 10, 2014 Posted February 10, 2014 This feature is new in v1.9.6 - for Front Office (customer's view) only. Share this post Link to post Share on other sites More sharing options...
Tuszu Posted February 10, 2014 Posted February 10, 2014 How can I do this? I mean how can I change the number of invoice? Share this post Link to post Share on other sites More sharing options...
tuk66 Posted February 10, 2014 Posted February 10, 2014 OK. I think I misunderstood. You can change the file name of downloaded invoice. There is option to set that in module administration. You cannot change the number of invoice, for example from 12 to 56, in the content of the invoice. You can only display the number in different way (from 12 to 20140012). 1 Share this post Link to post Share on other sites More sharing options...
tuk66 Posted February 22, 2014 Posted February 22, 2014 2. As the second page of delivery slip - print of the Google map with shipping address. To add Google map use this snippet: <div class="clear zero"> <br /> {* Google Maps Image APIs: https://developers.google.com/maps/documentation/staticmaps *} <img src="http://maps.googleapis.com/maps/api/staticmap?zoom=14&size=500x320&scale=2&sensor=false¢er={$order[orders].address_delivery.address1|escape:'url'},{$order[orders].address_delivery.city|escape:'url'},{if $order[orders].address_delivery.state.name}{$order[orders].address_delivery.state.name|escape:'url'}{/if}{$order[orders].address_delivery.country.name|escape:'url'}&markers=color:red|label:D|{$order[orders].address_delivery.address1|escape:'url'},{$order[orders].address_delivery.city|escape:'url'},{if $order[orders].address_delivery.state.name}{$order[orders].address_delivery.state.name|escape:'url'}{/if}{$order[orders].address_delivery.country.name|escape:'url'}" /> </div> To break a page use this code: <pagebreak /> The new template "Delivery slips with map" using described code will be in the next version of the module. 1 Share this post Link to post Share on other sites More sharing options...
JaivyDaam Posted February 28, 2014 Posted February 28, 2014 (edited) Hello tuk66, Good job on the module, this will save me tons of time to hand code this. However, i just installed your module and i am unable to edit any templates. (this includes ALL the templates) This is the error displayed: {"error":false,"msg":"\n\n{literal}\n Now i don't want to mess with your child, so i will await your response... I have a VPS so settings and chmod changes are not a problem. Thank you again! Edit: Duh, usefull info: I am using Prestashop 1.5.5, m4 pdf extensions 1.9.6, Apache 2.2, PHP 5.3.3 Edited February 28, 2014 by JaivyDaam (see edit history) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted February 28, 2014 Posted February 28, 2014 Send me PM. There is something wrong on your server and we will see more after exploring. Share this post Link to post Share on other sites More sharing options...
marios858 Posted March 18, 2014 Posted March 18, 2014 Dear's I order and install yesterday this module , really looks great , but i have some questions , i use Agile multiple vendor / seller and i want to add this information in template but i don't know where because the don't event appears For the standard template they use : in /pdf/header.tpl {$seller_name} {$seller_logo_path} {$seller_logo_url} and /pdf/footer.tpl {$seller_name} {$seller_address} {$seller_fax} {$seller_phone} also i want to add my logo (of the main store now its not appears) inside on the left corner up and the seller on the right corner. Sorry for my bad English. Thanks in advance. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 18, 2014 Posted March 18, 2014 Send me PM. There is something wrong on your server and we will see more after exploring. Fixed. New Relic monitoring added some Javascript code to loaded data for editor. Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 18, 2014 Posted March 18, 2014 Dear's I order and install yesterday this module , really looks great , but i have some questions , i use Agile multiple vendor / seller and i want to add this information in template but i don't know where because the don't event appears For the standard template they use : in /pdf/header.tpl {$seller_name} {$seller_logo_path} {$seller_logo_url} and /pdf/footer.tpl {$seller_name} {$seller_address} {$seller_fax} {$seller_phone} also i want to add my logo (of the main store now its not appears) inside on the left corner up and the seller on the right corner. Sorry for my bad English. Thanks in advance. I don't know this Agile module. You need to find if there is extra data available. Use the Debug template to see it. If yes, use this data in your template. If not, you would patch the module to get that extra data. Set the invoice logo in Back Office first if the logo doesn't appear on the invoice. Share this post Link to post Share on other sites More sharing options...
marios858 Posted March 18, 2014 Posted March 18, 2014 (edited) Here is my header and footer tpl , how is possible to add this informatio in invoices ? Also my stores logo its not appear , its appear an X only. in same cases its apper (in products pages) but its too big and its not good quality , can i fix that ? Thanks in advance. And sorry for many questions and bad English. Header.tpl {* *} <table style="width: 100%"> <tr> <td style="width: 50%"> {if $logo_path} <img src="{$logo_path}" style="width:{$width_logo}px; height:{$height_logo}px;" />{/if}{if isset($seller_logo_path) && !empty($seller_logo_path)}<img src="{$seller_logo_path}" style="width:60px; height:60px;" />{/if} </td> <td style="width: 50%; text-align: right;"> <table style="width: 100%"> <tr> <td style="font-weight: bold; font-size: 14pt; color: #444; width: 100%">{$shop_name|escape:'htmlall':'UTF-8'}{if isset($seller_name) && !empty($seller_name)} - {$seller_name}{/if}</td> </tr> <tr> <td style="font-size: 14pt; color: #9E9F9E">{$date|escape:'htmlall':'UTF-8'}</td> </tr> <tr> <td style="font-size: 14pt; color: #9E9F9E">{$title|escape:'htmlall':'UTF-8'}</td> </tr> </table> </td> </tr> </table> Footer.tpl {* *} <table> <tr> <td style="text-align: center; font-size: 6pt; color: #444"> {if $available_in_your_account} {l s='An electronic version of this invoice is available in your account. To access it, log in to our website using your e-mail address and password (which you created when placing your first order).' pdf='true'} <br /> {/if} {$shop_address|escape:'htmlall':'UTF-8'}<br /> {if !empty($shop_phone) OR !empty($shop_fax)} {l s='For more assistance, contact Support:' pdf='true'}<br /> {if !empty($shop_phone)} Tel: {$shop_phone|escape:'htmlall':'UTF-8'} {/if} {if !empty($shop_fax)} Fax: {$shop_fax|escape:'htmlall':'UTF-8'} {/if} <br /> {/if} {if isset($shop_details)} {$shop_details|escape:'htmlall':'UTF-8'}<br /> {/if} {if isset($free_text)} {$free_text|escape:'htmlall':'UTF-8'}<br /> {/if} {if isset($seller_name) && !empty($seller_name)} {* === from here Seller info === *} {$seller_name} - {$seller_address|escape:'htmlall':'UTF-8'}<br /> {if !empty($seller_phone) OR !empty($seller_fax)} {if !empty($seller_phone)} Tel: {$seller_phone|escape:'htmlall':'UTF-8'} {/if} {if !empty($seller_fax)} Fax: {$seller_fax|escape:'htmlall':'UTF-8'} {/if} <br /> {/if} {/if} {* === end seller info === *} </td> </tr> </table> I don't know this Agile module. You need to find if there is extra data available. Use the Debug template to see it. If yes, use this data in your template. If not, you would patch the module to get that extra data. Set the invoice logo in Back Office first if the logo doesn't appear on the invoice. Edited March 18, 2014 by marios858 (see edit history) Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 18, 2014 Posted March 18, 2014 Look at m4_invoice_3.tpl template. There are <htmlpageheader> and <htmlpagefooter> tags for the header and footer. Use preferably tables (if you need more compley layout) within these tags because divs don't work too well here. 1 Share this post Link to post Share on other sites More sharing options...
marios858 Posted March 19, 2014 Posted March 19, 2014 Unfortunately i cannot accomplish nothing. Is that module support the new prestashop version 1.6 ? Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 19, 2014 Posted March 19, 2014 marios858: If you need help, contact me by PM or email. The major upgrade compatible with v1.6 will be available in several days. 1 Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 28, 2014 Posted March 28, 2014 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOG v2.0.0 (2014-03-27)- Compatible with v1.6, rewritten for Bootstrap Read the upgrade instructions in README.TXT first Changes in folder structure, images and JavaScript files moved into /img and /js subfolders- New template "Delivery slips with map"- Added the invoice number and date to the list of orders in the administration of the module- Images of "Invoices with images" and "Delivery slips with images" templates correspond with product combination- Fixed displaying combinations in "Catalog with attributes" and "Catalog with attributes and features" templates 1 Share this post Link to post Share on other sites More sharing options...
alex1957 Posted March 28, 2014 Posted March 28, 2014 Hi, buy today this module, but not work. PrestaShop 1.6.0.5, italian Language, theme from theme forest Each create pdf button i press Always ... there was an error enable debug mode enabling debbug i get ... there was an error downloading font ... there was en error Is this the right forum or you other support forum or email Best regards Alex Share this post Link to post Share on other sites More sharing options...
tuk66 Posted March 28, 2014 Posted March 28, 2014 Hi Alex, can I test it? Send me PM or a message at www.presta-addons.com. Share this post Link to post Share on other sites More sharing options...
alex1957 Posted March 28, 2014 Posted March 28, 2014 Hi, buy today this module, but not work. PrestaShop 1.6.0.5, italian Language, theme from theme forest Each create pdf button i press Always ... there was an error enable debug mode enabling debbug i get ... there was an error downloading font ... there was en error Is this the right forum or you other support forum or email Best regards Alex Hi here again, problem SOLVED How write before i own a PrestaShop 1.6.0.5 installed in Italian and english, with a lot of module (keyclient, customfield, maxquantity) and a theme from themeforest. Last module installed was M4pdf To solve the problem i went to localization and reimported italian Language that solved all problem, and no more error from M4pdf Thank's a lot for fast support probleme is close Bye Alex 1 Share this post Link to post Share on other sites More sharing options...
tuk66 Posted April 8, 2014 Posted April 8, 2014 The new version of the module is immediately available at www.presta-addons.com. All upgrades are FREE for life.CHANGELOG v2.0.1 (2014-04-08)- Added conditional calling get_called_class() PHP function (PHP older than v5.3.0)- Fixed "PHP Fatal error: Class 'M4Object' not found in /modules/m4pdf/m4pdf.php on line 2835" error- Fixed "Notice: Undefined index: template in /modules/m4pdf/pdf.php on line 168" notice 1 Share this post Link to post Share on other sites More sharing options...
vodovo Posted April 16, 2014 Posted April 16, 2014 Hello everybody, I've recently bought this module and it has helped me advance a lot. I have 2 issues that I can't seem to solve. 1. How do I show the unique order reference in my invoices? In the original Prestashop invoice.tpl it is done with: {$order->getUniqReference()} In the M4PDF templates I have only found examples of the order ID wich I don't want to use: {$order[orders].id_order|string_format:"%06d"} 2. I can't seem to get Google fonts to work in my invoices. I've followed the instructions on Google's website but no luck so far. <link href='http://fonts.googleapis.com/css?family=Lato:400italic' rel='stylesheet' type='text/css'> is the first line below the <head> element and all fonts are set as font-family: 'Lato', sans-serif; Can anybody help me with these issues? Thank you very much in advance. Best regards Share this post Link to post Share on other sites More sharing options...
tuk66 Posted April 17, 2014 Posted April 17, 2014 1. {$order[orders].reference} 2. Download the Lato fonts as TTF file(s) and save to /modules/m4pdf/mpdf/ttfonts folder. Then go to /modules/m4pdf/mpdf/config_fonts.php file and add your font definition to $this->fontdata array. "lato" => array( 'R' => "Lato.ttf", ), Use the font in your CSS style: .custom_style { font-family: lato; } 1 Share this post Link to post Share on other sites More sharing options...
Recommended Posts