Jump to content

[Resolved] print.css cant' be edited?


SHAWN YUMI

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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">

 

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...