HarryCom Posted March 29, 2014 Share Posted March 29, 2014 Hi to all! I would like to print a message (a message of the law applied) on the invoice only if issued by certain country, with certain ISO code, how do this? In essence they are all the country, except for those that are in the list "IT Standard Rate (22%)" of the Tax Rules. Please help! Link to comment Share on other sites More sharing options...
tuk66 Posted March 31, 2014 Share Posted March 31, 2014 I think, you could add some condition to /classes/pdf/HTMLTemplateInvoice.php, getContent() function, where both addresses are fetched. You have very little changes to do it right in the invocie.tpl template. Link to comment Share on other sites More sharing options...
HarryCom Posted March 31, 2014 Author Share Posted March 31, 2014 I think, you could add some condition to /classes/pdf/HTMLTemplateInvoice.php, getContent() function, where both addresses are fetched. You have very little changes to do it right in the invocie.tpl template. Thanks tuk66! I'm new to PrestaShop, you can suggest me how to do? Link to comment Share on other sites More sharing options...
HarryCom Posted March 31, 2014 Author Share Posted March 31, 2014 No one can help me? Link to comment Share on other sites More sharing options...
tuk66 Posted April 1, 2014 Share Posted April 1, 2014 I know how to adapt a M4 PDF Extensions template. It would be quite easy because information about customer's country is available in templates. Link to comment Share on other sites More sharing options...
HarryCom Posted April 1, 2014 Author Share Posted April 1, 2014 OK... if there is no alternative, I would be willing even to buy M4 PDF Extensions, but for sure just what interests me is not possible to make some changes on the code PrestaShop? Link to comment Share on other sites More sharing options...
connectcase Posted May 20, 2014 Share Posted May 20, 2014 You need to know at least a little HTML and PHP to do this. Files to edit are: 1) /classes/pdf/HTMLTemplateInvoice.php (define a variable) 2) /pdf/invoice.tpl (call the variable) Link to comment Share on other sites More sharing options...
tuk66 Posted May 20, 2014 Share Posted May 20, 2014 I'm sure you can patch PrestaShop core code. The question is if it would be faster, cheaper and resistant after upgrade. In M4PDF it could work like this: {assign var="iso" value="`$order[orders].address_invoice.country.iso_code`"} {if $iso == 'IT' || $iso == 'OTHER_ISO'} {l s='Message no. 1' mod='m4pdf'} {else} {l s='Message no. 2' mod='m4pdf'} {/if} Link to comment Share on other sites More sharing options...
HarryCom Posted June 1, 2014 Author Share Posted June 1, 2014 You need to know at least a little HTML and PHP to do this. Files to edit are: 1) /classes/pdf/HTMLTemplateInvoice.php (define a variable) 2) /pdf/invoice.tpl (call the variable) I know a bit of HTML and PHP, however, you'd know give me some clear indication on how to do? Link to comment Share on other sites More sharing options...
Recommended Posts