karlosman Posted February 12, 2017 Share Posted February 12, 2017 Hello, please, give me an advice. Where and how can I reduce the length of the text in PDF products in order? I use Prestashop 1.6.1.6 Thank you for your help Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 12, 2017 Share Posted February 12, 2017 Can you give us some screenshots to figure out better how can we help you? Link to comment Share on other sites More sharing options...
karlosman Posted February 12, 2017 Author Share Posted February 12, 2017 Here I enclose a sample. Thank you Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 12, 2017 Share Posted February 12, 2017 Put this code in admin_folder/themes/default/css/overrides.css @media print { .product-line-row .productName { max-width: 300px; overflow: hidden; white-space: nowrap; display: inline-block; text-overflow: ellipsis; } } You can play with the max-width property to fit better your requirments.PS: Do not forget to clear the browser cache, and when doins so, at "Time range", select "everything", and only tick "Cache". 1 Link to comment Share on other sites More sharing options...
karlosman Posted February 12, 2017 Author Share Posted February 12, 2017 great, amazing!!! :-) Thank you very much Can I ask for more advice? Usually the items are moved to the next page. Can I do something to avoid? Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 12, 2017 Share Posted February 12, 2017 Yup, add this inside "@media print" block: #main #content.bootstrap #start_products .panel { page-break-inside: auto !important; } so it becomes something like: @media print { .product-line-row .productName { max-width: 300px; overflow: hidden; white-space: nowrap; display: inline-block; text-overflow: ellipsis; } #main #content.bootstrap #start_products .panel { page-break-inside: auto !important; } } 1 Link to comment Share on other sites More sharing options...
karlosman Posted February 12, 2017 Author Share Posted February 12, 2017 Works 100% !!! Thank you I would like to ask you about the last 2 things. I need to add a number of orders in the name of the saving. Add a shipping method, and payments under the picture. Could you give me an advice please? Thank you so much Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 12, 2017 Share Posted February 12, 2017 (edited) Works 100% !!! Thank you I would like to ask you about the last 2 things. I need to add a number of orders in the name of the saving. Add a shipping method, and payments under the picture. Could you give me an advice please? Thank you so much About the order ID in the name of the saving, I am pretty sure that you can enter the name before saving the file. If you want something automatically, you can rename the title of the page when you click on the "Print order" button and then rename it back to original (using javascript). For shipping method and payment method written where you want: <tr id="carrier_override"> <td class="text-right">{l s='Carrier'}</td> <td class="carrier-name text-right nowrap"> {$carriers_array = array()} {foreach from=$order->getShipping() item=line} {$carriers_array[] = $line.carrier_name} {/foreach} {implode(', ', $carriers_array)} </td> </tr> <tr id="payment_override"> <td class="text-right">{l s='Payment'}</td> <td class="payment_method-name text-right nowrap"> {$payments_array = array()} {foreach from=$order->getOrderPaymentCollection() item=line} {$payments_array[] = $line->payment_method} {/foreach} {implode(', ', $payments_array)} </td> </tr> You have to put this in file "admin_folder/themes/default/template/controllers/orders/helpers/view/view.tpl", search for '<tr id="total_order">' and put it right after it's end tag ( '</tr>' ) PS: Don't forget to REP+ if I've been useful. Edited February 12, 2017 by Goe Burlibasa (see edit history) 1 Link to comment Share on other sites More sharing options...
karlosman Posted February 12, 2017 Author Share Posted February 12, 2017 It works great. Thank you :-) But it shows the payment only in the state as the order is settled. Would it be possible to display every time? Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 13, 2017 Share Posted February 13, 2017 (edited) It works great. Thank you :-) But it shows the payment only in the state as the order is settled. Would it be possible to display every time? I didn't understood what you meant, could you be more specific? Edited February 13, 2017 by Geo Burlibasa (see edit history) Link to comment Share on other sites More sharing options...
karlosman Posted February 13, 2017 Author Share Posted February 13, 2017 Transport's okay always displayed. Payment only if the order is finished. I attach image. Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 13, 2017 Share Posted February 13, 2017 (edited) Transport's okay always displayed. Payment only if the order is finished. I attach image. Got it Replace this: {$payments_array = array()} {foreach from=$order->getOrderPaymentCollection() item=line} {$payments_array[] = $line->payment_method} {/foreach} {implode(', ', $payments_array)} with this: {$order->payment} So it becomes: <tr id="carrier_override"> <td class="text-right">{l s='Carrier'}</td> <td class="carrier-name text-right nowrap"> {$carriers_array = array()} {foreach from=$order->getShipping() item=line} {$carriers_array[] = $line.carrier_name} {/foreach} {implode(', ', $carriers_array)} </td> </tr> <tr id="payment_override"> <td class="text-right">{l s='Payment'}</td> <td class="payment_method-name text-right nowrap"> {$order->payment} </td> </tr> Edited February 13, 2017 by Geo Burlibasa (see edit history) 1 Link to comment Share on other sites More sharing options...
karlosman Posted February 13, 2017 Author Share Posted February 13, 2017 absolutely great! Thank you Link to comment Share on other sites More sharing options...
Geo Burlibasa Posted February 13, 2017 Share Posted February 13, 2017 absolutely great! Thank you You welcome, glad I could help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now