sailing123 Posted March 17, 2017 Share Posted March 17, 2017 Hi, I have spent many hours improving my "print invoice", the one you can print from admin, not the one the customer can print from the website. However, I am facing a constant headache. The header does not stop changing height depending on the number of product listed below into the "info" div, so none of my invoices are identical from a header point of view. The 2 files concerned are: /admin/skins/default/templates/orders.print.php with the css file /admin/skins/default/styles/print.css I have tried all sorts in the css to add a height for the header but nothing I actually modified in that css seems to have an impact on the print.php file which I found very strange. I ended up making style modifications into the php file, not all good practice, like div spacer, etc ... So does anyone know how to fix that issue or maybe there is another css file that actually overpowers the print.css which would explain why none of my changes are working ? Thanks S. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 17, 2017 Share Posted March 17, 2017 Please keep in mind that the browser that receives the order.print.php rendered file will likely have cached the print.css file. So, no matter if edited, unless the browser is 'tricked' into loading this file all the time (as opposed to using the copy in its cache), nothing changes. Feel free to post copies of those files here, or ZIP them up and make them available for download from some site. We can take a look. If the browser using the copy in its cache is the problem, try: In orders.print.php, find: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css" media="screen,print"> Change to: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css?v={$smarty.now}" media="screen,print"> This adds the current epoch timestamp to a querystring. It's guaranteed to be unique, (supposedly causes all caching mechanisms from your browser to CubeCart inclusive to to be bypassed, and is completely ignored. That is, will not affect what the web server sends back. Quote Link to comment Share on other sites More sharing options...
sailing123 Posted March 18, 2017 Author Share Posted March 18, 2017 (edited) Thanks bmither. Tried the above coding, was not working with firefox but chrome OK only once per page. After that, the page was constantly trying to refresh rending only a blank page so I had to remove the code and I kept clear the browser cache instead, working fine. Also different browsers, different behaviours. Has been a little stressful but now I can see my changes by amending the css file which is the main thing and my header is finally fixed so super happy. I put the customers' comments into fieldset as well to look consistent but noticed that the order "Public Note Content" notes coding is missing on the print invoice so off I go looking for that now .... never stops :-) S. Edited March 18, 2017 by sailing123 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 18, 2017 Share Posted March 18, 2017 Put this wherever you want it in your print invoice: {if !empty($order.note_to_customer)} <p align="left"> <div id=" "> {$order.note_to_customer|nl2br}</div></p> <br> {/if} My orders.print.php is totally non-stock, but it fits our product and customer needs. 1 Quote Link to comment Share on other sites More sharing options...
sailing123 Posted March 18, 2017 Author Share Posted March 18, 2017 ALL RESOLVED. Fab, thanks to both of you once more :-) S. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.