Ok, I' think I've got it all together.
DOWNLOAD, as reference, the following VqMod, my option is based on it. You will not need it, exept if you choose to use it as designed, for another Print-Job ( I forget wich one, but I use it's Content somewhere...), ur use it as Sample to create one to do this/your 'Job'!
http://www.opencart.com/index.php?route ... _license=0
ADD TO File:
URL >> /catalog/language/english/english.php <<
WIN >> \catalog\language\english\english.php <<
AFTER the Sub Section Title Line:
this Line:
if you use another Language,
add the same Line into the same place in your other Language File and
rename the Keyword to your Language.
Code: Select all
URL >> /catalog/language/german/german.php <<
WIN >> \catalog\language\german\german.php <<
In german, this keyword would be 'Drucken':
and therefore look like:
--
OPEN FILE:
URL >> /catalog/view/theme/default/template/checkout/cart.tpl >>
WIN >> \catalog\view\theme\default\template\checkout\cart.tpl >>
LINE 22-26 (STOCK FILE OC v.1.5.6.1) FIND:
Code: Select all
</h1>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div class="cart-info">
<table>
<thead>
REPLACE WITH:
Code: Select all
</h1>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div id="skrivut">
<script type="text/javascript">function printDiv(skrivut){var dd=document.getElementById(skrivut).innerHTML,ee=document.body.innerHTML;document.body.innerHTML=dd,window.print(),document.body.innerHTML=ee}</script>
<div class="cart-info">
<table>
<thead>
LINE 193-197 (STOCK FILE OC v.1.5.6.1) FIND:
Code: Select all
</div>
<div class="buttons">
<div class="right"><a href="<?php echo $checkout; ?>" class="button"><?php echo $button_checkout; ?></a></div>
<div class="center"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_shopping; ?></a></div>
</div>
REPLACE WITH:
Code: Select all
</div></div>
<div class="buttons">
<div class="center"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_shopping; ?></a></div>
<div class="right"><a href="javascript:printDiv('skrivut');" class="button" />Print Page</a></div>
</div>
Then, it should work, if I did not forget anything, you have not longer a button to proceed to checkout as well.
------
Technical Detail, if some specific Template Set's are used, also for Checkout Pages with activated Banner-, Top-, Footer- and/or Side Sections displayed on Screen.
Positioning this thing here:
Code: Select all
<div id="skrivut">
<script type="text/javascript">function printDiv(skrivut)........................
will have an effect on HOW a Page is printed out, if you put it up higher, more of the Page Header Part, possibly even some left/right side Sections, will be printed. The visibly 'effective' Cart-View will be affected to a large extend.
So, make sure, it does not print the whole page, but only the CART Section containing important stuff to the Order.
To close the Printout Page Section correctly, it's upmost important to PLACE the >>skrivut<< Section Close MARKER at the right Point.
It's located HERE!
This:
Code: Select all
</div></div>
<div class="buttons">
would then eventually be required to be changed (back to default) to this:
and the left over
would be placed in order to close the 'still open'
Section, possibly further down in the File. Just to mention this (Option) as well...
As you see in the Original .xml-file (if you understand how they 'function'), it's placed higher up there, near where the Header starts, used originally, compared with my mod.
I hope I did not forget anything important, it's some time since I made that for you, and beeing such an old fellow already, I have my limits...
Good Luck!
Ernie
PS. A VqMod would do it as well, I know. Anyone is free to do it, I just don't like to, I want to help 'Shopmasters' to 'understand'...