SHAWN YUMI Posted September 28, 2016 Share Posted September 28, 2016 I am trying to change some layout for the "order invoice print sheet", but it seems not working even after I replace the "print.css" file (..shop/admin/skins/default/styles/print.css), I also try to clear the cache in the maintenance place and no luck, is anyone have same issue or give any advise? appreciate any helps Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 28, 2016 Share Posted September 28, 2016 Welcome to the forums, @SHAWN YUMI. I made all my changes to the packing slip in the template file, not the css file. What change are you trying to make in the print.css file? I'll try it on my test store and see what happens for me. Quote Link to comment Share on other sites More sharing options...
SHAWN YUMI Posted September 28, 2016 Author Share Posted September 28, 2016 Thanks, Dirt Butter, I changed some code as below because I added billing address under the shipping address and I need more space to move down: #printLabel { width:80mm; height:80mm; float:left; padding:4mm; z-index:100 } .sender { border-top:1px solid #ccc; margin-top:20px; padding-top:4px; font-size:.7em } #storeLabel { width:80mm; height:80mm; padding-top:4mm; overflow:hidden; z-index:-1 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 28, 2016 Share Posted September 28, 2016 I tried your changes and saw nothing different. So I made some outlandishly obvious changes to print.css and STILL did not see any change in the Packing slip. So lets be sure we are talking about the same thing. I make my own store changes in the template file orders.print.php for the Packing Slip. But there IS a print.receipt.php template in the skins that has its own css file. Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 28, 2016 Share Posted September 28, 2016 Please keep in mind that a web browser will, by default, keep copies of page resources (javascript, CSS, images) in its internal cache. But there are ways to force the browser to re-fetch the resources. One is to clear the browser's cache. Another is to use the keyboard shortcut to Force Reload (typically, CTRL-F5). This is the preferable way when making changes to page resources. However, CubeCart's method of creating the printable order page is to instantaneously create a PHP file and tell the browser to fetch it (the file is: www.example.com/files/print.hash.php and also automatically deletes this file after having been output to the browser. So, CTRL-F5 won't work as this also attempts to reload the page itself. Another way, when making development work, is to use the browser's development tools which may include a way to have the browser re-fetch individual and specific page resources. Finally, we can edit the URL that references the page resource. If a URL has a querystring attached, then the browser knows not to use its cached copy, and instead will always request this file. A querystring is used to inform the server that some sort of customization is requested. So, in the file: admin/skins/default/templates/orders.print.php Near line 17, Was: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css" media="screen,print"> Now: <link rel="stylesheet" href="../{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/styles/print.css?1" media="screen,print"> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted September 28, 2016 Share Posted September 28, 2016 I changed the size of the font, using Bsmither's code, and after clearing CC caches, it worked. I tried going back to the stock code in orders.print.php WITH the changes SHAWN YUMI wanted, and I do get a different look to the printout using stock orders.print.php. (I think my edited packing slip was just too different to make the changes obvious.) Quote Link to comment Share on other sites More sharing options...
SHAWN YUMI Posted September 28, 2016 Author Share Posted September 28, 2016 Thanks Dirty Butter, Bsmither for advise, I just create my own css file as print.css2 and changed the css link on "orders.print.php", now is working. Again thanks for all helps ! 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.