- Not sure what you mean, here. Are you referring the Google Chrome "print dialog?" - not much you can do about that one. As for preventing the printable order contents from appearing in a popup/new tab, you'd can take one approach that comes to mind.
Print Dialog Override, AJAX Method
Extend app/design/frontend/base/default/template/checkout/success.phtml
-- may be different depending on your theme. Change this line:
<?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
To this:
<?php echo $this->__('Click <a href="javascript:;" onclick="new Ajax.Request('%s', {onSuccess:function(){ ... }});">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
The above is more like pseudo-code, and I do not advise to write it like that, but you can get the idea that you'd make an AJAX request for the printable contents, and upon its return, you can write it directly to the success page in a modal or something nice -- then prompt to print.
See the template referenced in #1.
"That page" -- The checkout success page? See below.
Changing the Checkout Success Template
Extend the app/design/frontend/base/default/layout/checkout.xml
-- or else add the following to your local.xml
<checkout_onepage_success translate="label">
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</checkout_onepage_success>
You can add your custom css to print layout handle in a custom layout.xml or the sales.xml for example:
<sales_order_print>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/custom_print.css</name></action>
</reference>
</sales_order_print>
Best Answer
There is a built in
print
button on the order page within the backend, as far as I'm aware it uses the same template in both admin and the front-end however I haven't researched this.I know customising the invoice in Magento's in a pain in the arse quite frankly, we always recommend Fooman Pdf Customiser.
http://store.fooman.co.nz/magento-extension-pdf-customiser.html
Let me know if I haven't understood the problem properly.