The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Feature Request: Print CSS for default template

bwentebwente Member
in Bugs & Feature Requests edited January 2008
Can you add a css for printing on the default template? I haven't had time to make a custom layout and yours looks really nice. But the printout is very plain and spans two pages.
Comments
  • lukeluke FoxyCart Team
    hmmm... good idea. Yeah, I don't think that would be to difficult.
  • Is there anything stopping us adding an external print.css to the checkout template?
  • brettbrett FoxyCart Team
    Not at all. That's actually our recommendation until we create one on our end for you to use if you'd like.

    Search the forums though, as this came up recently and I think somebody else might have a head start, and possibly code they could share.
  • @brett I searched the forums and couldn't come up with anything... have you guys had any progress on creating one? do you know of anyone else that has used their own that I could "borrow?"
  • jasonhunterjasonhunter Member
    edited August 2009
    @brett and anyone else curious... i found a fix!

    first, i went into the receipts admin (under templates) and copied the location of the standard foxycart css file.
    <link rel="stylesheet" href="https://your_foxycart_store_domain/themes/standard/styles.css"; type="text/css" media="screen" charset="utf-8" />
    

    i pasted it in a browser window and copied the css into my own file.

    i wrapped everything i pasted in the following and then i named print.css and uploaded to my server.
    @media print{
    ...
    }
    

    i then went back into my receipt template admin and pasted the following right beneath where foxycart's is called.
    <link rel="stylesheet" href="http://your_domain_here.com/print.css"; type="text/css" media="print" charset="utf-8" />
    

    notice in the code i just pasted that i changed media from screen to print.

    that's it... it works beautifully!
  • brettbrett FoxyCart Team
    Fantastic! I've added this post to our wiki:
    http://wiki.foxycart.com/docs:advanced:forum
  • Hi,
    I'm sorry but I'm a real novice when it comes to css coding - but in the section where you say that you:

    "'first, i went into the receipts admin (under templates) and copied the location of the standard foxycart css file.

    <link rel="stylesheet" href="https://your_foxycart_store_domain/themes/standard/styles.css"; type="text/css" media="screen" charset="utf-8" />

    i pasted it in a browser window and copied the css into my own file.

    i wrapped everything i pasted in the following and then i named print.css and uploaded to my server."

    What exactly did you paste into the file?? Because when I go to my store section https://your_foxycart_store_domain/themes/standard/styles.css - there is heaps of different lines of code. Which do I paste into:
    @media print{
    ...
    }
    ???
  • fc_adamfc_adam FoxyCart Team
    Hey madsy,

    So once you have the standard/style.css file loaded up, you select all of that file and copy it to your clipboard.

    Then create a new file in your text editor of choice. Then type in the following:
    @media print {
    }
    

    Add a new line in the middle of curly brackets, and paste in the stylesheet you have in your clipboard. So it will be something like:
    @media print {
    body {
    font-size:1em;
    }
    ...
    }
    

    Note: I just made up that body style. I don't know if its in the styles.css file.

    Once you've pasted that in there, save the file as print.css, upload to your server and link to as @jasonhunter mentioned.
Sign In or Register to comment.