r4nonE Posted December 12, 2013 Share Posted December 12, 2013 Hi, a strange thing happens to me and I would understand if you are the only one. After following the directions of how to edit a PDF file (link below), I copy the file original file "invoice.tpl" from "/pdf/" directory in "/themes/myTheme/pdf/" for init my custom graphics. http://doc.prestashop.com/display/PS15/Translations+in+PrestaShop+1.5#TranslationsinPrestaShop1.5-PDFfilestranslations Before that I'm edit the "invoice.tpl" file, I see that in "BO > Localizations > Translations" in "Translation Front Office > myTheme" there are more string ready for translation like this: "Billing Address' pdf='true". These strings are not wrong? I should not find these strings only in "Translation PDF > myTheme"? I hope someone help me know, thanks, Daniel. Link to comment Share on other sites More sharing options...
tuk66 Posted December 12, 2013 Share Posted December 12, 2013 These strings are wrong. It must be a bug. Alternatively, the invoice.tpl template is changed in a wrong way. Link to comment Share on other sites More sharing options...
r4nonE Posted December 12, 2013 Author Share Posted December 12, 2013 How can I fix? I have Prestashop 1.5.6.1 installed. Someone is working on this issue or can help me? Thanks, Daniel. Link to comment Share on other sites More sharing options...
r4nonE Posted December 16, 2013 Author Share Posted December 16, 2013 These strings are wrong. It must be a bug. Alternatively, the invoice.tpl template is changed in a wrong way. Thanks tuk for your reply. I have put the original invoice.tpl file in my theme and I retrieve the same errors... Anyone with my same problem? Link to comment Share on other sites More sharing options...
tuk66 Posted December 23, 2013 Share Posted December 23, 2013 Can you share the invoice.tpl file? Maybe we can see the problem there. Link to comment Share on other sites More sharing options...
r4nonE Posted December 23, 2013 Author Share Posted December 23, 2013 Can you share the invoice.tpl file? Maybe we can see the problem there. The original "invoice.tpl" file that I've in the "/pdf/" is: {* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <div style="font-size: 8pt; color: #444"> <table> <tr><td> </td></tr> </table> <!-- ADDRESSES --> <table style="width: 100%"> <tr> <td style="width: 17%"></td> <td style="width: 83%"> {if !empty($delivery_address)} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br /> {$delivery_address} </td> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing Address' pdf='true'}</span><br /> {$invoice_address} </td> </tr> </table> {else} <table style="width: 100%"> <tr> <td style="width: 50%"> <span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Billing & Delivery Address.' pdf='true'}</span><br /> {$invoice_address} </td> <td style="width: 50%"> </td> </tr> </table> {/if} </td> </tr> </table> <!-- / ADDRESSES --> <div style="line-height: 1pt"> </div> <!-- PRODUCTS TAB --> <table style="width: 100%"> <tr> <td style="width: 17%; padding-right: 7px; text-align: right; vertical-align: top; font-size: 7pt;"> <!-- CUSTOMER INFORMATION --> <b>{l s='Order Number:' pdf='true'}</b><br /> {$order->getUniqReference()}<br /> <br /> <b>{l s='Order Date:' pdf='true'}</b><br /> {dateFormat date=$order->date_add full=0}<br /> <br /> <b>{l s='Payment Method:' pdf='true'}</b><br /> <table style="width: 100%;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} </table> <br /> {if isset($carrier)} <b>{l s='Carrier:' pdf='true'}</b><br /> {$carrier->name}<br /> <br /> {/if} <!-- / CUSTOMER INFORMATION --> </td> <td style="width: 83%; text-align: right"> <table style="width: 100%; font-size: 8pt;"> <tr style="line-height:4px;"> <td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: {if !$tax_excluded_display}35%{else}45%{/if}">{l s='Product / Reference' pdf='true'}</td> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 20%">{l s='Unit Price' pdf='true'} <br />{l s='(Tax Excl.)' pdf='true'}</td> {/if} <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%"> {l s='Unit Price' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: 10%; white-space: nowrap;">{l s='Discount' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: center; font-weight: bold; width: 10%">{l s='Qty' pdf='true'}</td> <td style="background-color: #4D4D4D; color: #FFF; text-align: right; font-weight: bold; width: {if !$tax_excluded_display}15%{else}25%{/if}"> {l s='Total' pdf='true'} {if $tax_excluded_display} {l s='(Tax Excl.)' pdf='true'} {else} {l s='(Tax Incl.)' pdf='true'} {/if} </td> </tr> <!-- PRODUCTS --> {foreach $order_details as $order_detail} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};"> <td style="text-align: left; width: {if !$tax_excluded_display}35%{else}45%{/if}">{$order_detail.product_name}</td> <!-- unit price tax excluded is mandatory --> {if !$tax_excluded_display} <td style="text-align: right; width: 20%; white-space: nowrap;"> {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} </td> {/if} <td style="text-align: right; width: 10%; white-space: nowrap;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.unit_price_tax_incl} {/if} </td> <td style="text-align: right; width: 10%"> {if (isset($order_detail.reduction_amount) && $order_detail.reduction_amount > 0)} -{displayPrice currency=$order->id_currency price=$order_detail.reduction_amount} {elseif (isset($order_detail.reduction_percent) && $order_detail.reduction_percent > 0)} -{$order_detail.reduction_percent}% {else} -- {/if} </td> <td style="text-align: center; width: 10%">{$order_detail.product_quantity}</td> <td style="text-align: right; width: {if !$tax_excluded_display}15%{else}25%{/if}; white-space: nowrap;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_detail.total_price_tax_incl} {/if} </td> </tr> {foreach $order_detail.customizedDatas as $customizationPerAddress} {foreach $customizationPerAddress as $customizationId => $customization} <tr style="line-height:6px;background-color:{$bgcolor};"> <td style="line-height:3px; text-align: left; width: 45%; vertical-align: top"> <blockquote> {if isset($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) && count($customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_]) > 0} {foreach $customization.datas[$smarty.const._CUSTOMIZE_TEXTFIELD_] as $customization_infos} {$customization_infos.name}: {$customization_infos.value} {if !$smarty.foreach.custo_foreach.last}<br /> {else} <div style="line-height:0.4pt"> </div> {/if} {/foreach} {/if} {if isset($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) && count($customization.datas[$smarty.const._CUSTOMIZE_FILE_]) > 0} {count($customization.datas[$smarty.const._CUSTOMIZE_FILE_])} {l s='image(s)' pdf='true'} {/if} </blockquote> </td> {if !$tax_excluded_display} <td style="text-align: right;"></td> {/if} <td style="text-align: right; width: 10%"></td> <td style="text-align: center; width: 10%; vertical-align: top">({$customization.quantity})</td> <td style="width: 15%; text-align: right;"></td> </tr> {/foreach} {/foreach} {/foreach} <!-- END PRODUCTS --> <!-- CART RULES --> {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};text-align:left;"> <td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td> <td> {if $tax_excluded_display} - {$cart_rule.value_tax_excl} {else} - {$cart_rule.value} {/if} </td> </tr> {/foreach} <!-- END CART RULES --> </table> <table style="width: 100%"> {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} <tr style="line-height:5px;"> <td style="width: 83%; text-align: right; font-weight: bold">{l s='Product Total (Tax Excl.)' pdf='true'}</td> <td style="width: 17%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> <tr style="line-height:5px;"> <td style="width: 83%; text-align: right; font-weight: bold">{l s='Product Total (Tax Incl.)' pdf='true'}</td> <td style="width: 17%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products_wt}</td> </tr> {else} <tr style="line-height:5px;"> <td style="width: 83%; text-align: right; font-weight: bold">{l s='Product Total' pdf='true'}</td> <td style="width: 17%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {/if} {if $order_invoice->total_discount_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Vouchers' pdf='true'}</td> <td style="width: 17%; text-align: right;">-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl)}</td> </tr> {/if} {if $order_invoice->total_wrapping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Wrapping Cost' pdf='true'}</td> <td style="width: 17%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} {/if} </td> </tr> {/if} {if $order_invoice->total_shipping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td> <td style="width: 17%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} {/if} </td> </tr> {/if} {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Tax' pdf='true'}</td> <td style="width: 17%; text-align: right;">{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}</td> </tr> {/if} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total' pdf='true'}</td> <td style="width: 17%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td> </tr> </table> </td> </tr> </table> <!-- / PRODUCTS TAB --> <div style="line-height: 1pt"> </div> {$tax_tab} {if isset($order_invoice->note) && $order_invoice->note} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 17%"></td> <td style="width: 83%">{$order_invoice->note|nl2br}</td> </tr> </table> {/if} {if isset($HOOK_DISPLAY_PDF)} <div style="line-height: 1pt"> </div> <table style="width: 100%"> <tr> <td style="width: 17%"></td> <td style="width: 83%">{$HOOK_DISPLAY_PDF}</td> </tr> </table> {/if} </div> Link to comment Share on other sites More sharing options...
r4nonE Posted December 23, 2013 Author Share Posted December 23, 2013 Can you share the invoice.tpl file? Maybe we can see the problem there. The original "invoice.tpl" file that I've in the "/pdf/" directory is attached. invoice.tpl.zip Link to comment Share on other sites More sharing options...
tuk66 Posted December 25, 2013 Share Posted December 25, 2013 The invoice.tpl file is almost the same as the original one. No syntax error. The problem have to be elsewhere. Link to comment Share on other sites More sharing options...
Recommended Posts