GallusMax / open-source-self-check

An OpenSource Selfcheck system that is FAST, intuitive and - Free Software! Enhancements against the code from code.google.com/p/open-source-self-check
GNU General Public License v3.0
6 stars 4 forks source link

Changing item information printed on receipts #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Receipt printing
2.
3.

What is the expected output? What do you see instead?
We would like to change some information on the receipt.

What version of the product are you using? On what operating system?
We are using version 1.043 on Windows XP.

Please provide any additional information below.
Eric,

Town & Country PL loves your self-check software. Now that they have been using 
it for awhile, they are interested in tweaking the receipt content. Is it 
possible to change the content of the receipt to print the following lines in 
the following order:

Line 1: Self-Checkout Receipt
Line 2: Town & Country Public Library
Line 3: [title of checkout]
Line 4: [item ID]
Line 5: [due date of checkout]
Line 6: Renew your items online:
Line 7: [OPAC URL]

I see that the print.js file defines receipt content but it is unclear to me 
where each of the above item elements reside. Can these elements be changed? 
Thank you for your help; have a good day.

Eric at Town & Country PL

Original issue reported on code.google.com by amendic...@gmail.com on 22 Apr 2011 at 12:43

GoogleCodeExporter commented 8 years ago
In config.php fill in the variables listed below and you should see the results 
you want...
$online_catalog_url
$library_name

Let me know if it works out (or not).

Original comment by ericmelton1@gmail.com on 22 Apr 2011 at 1:26

GoogleCodeExporter commented 8 years ago
Eric,

Thank you for your reply. We have defined the library name and OPAC
URL in config.php. We were hoping to rearrange the order of this, and
other, text as it appears on the receipt in the following line order:

Line 1: Self-Checkout Receipt
Line 2: Town & Country Public Library
Line 3: [title of checkout]
Line 4: [item ID]
Line 5: [due date of checkout]
Line 6: Renew your items online:
Line 7: [OPAC URL]

Is it possible to edit the receipt content to that extent?

Thank you for your continued help.

Original comment by amendic...@gmail.com on 29 Apr 2011 at 12:46

GoogleCodeExporter commented 8 years ago
In pages/checkout.php change...

<div id="print_item_list_div">
                <table cellpadding="0" cellspacing="0" width="100%" id="print_item_list_table">
                        <tbody>
                                <tr>
                                        <td>Checkout Receipt</td>
                                </tr>
                                <tr>
                                        <td><?php echo $library_name;?></td>
                                </tr>
                                <tr>
                                        <td style="font-style:italic">Renew your items online:</td>
                                </tr>
                                <tr>
                                        <td style="font-style:italic;"><?php echo $online_catalog_url;?></td>
                                </tr>
                                <tr>
                                        <td> </td>
                                </tr>
                        </tbody>
                </table>
        </div>

to...

<div id="print_item_list_div">
                <table cellpadding="0" cellspacing="0" width="100%" id="print_item_list_table">
                        <tbody>
                                <tr>
                                        <td>Checkout Receipt</td>
                                </tr>
                                <tr>
                                        <td><?php echo $library_name;?></td>
                                </tr>
                                <tr>
                                        <td> </td>
                                </tr>
                        </tbody>
                </table>
        </div>

then in the same file find the line...

$( "#print_item_list_div" ).print();

and put this on the line before it...

$( "#print_item_list_div tbody").append('<tr><td 
style="font-style:italic">Renew your items online:</td></tr><tr><td 
style="font-style:italic;"><?php echo 
str_replace("'","\'",$online_catalog_url);?></td></tr><tr><td> </td></tr>');

Let me know how it works out.

Original comment by ericmelton1@gmail.com on 29 Apr 2011 at 1:00

GoogleCodeExporter commented 8 years ago
Eric,

The ...pages/checkout.php file was changed so that its relevant
section displays as follows. Unfortunately, this results in a receipt
that only includes the text "Checkout Receipt" and and library name.

However, you have given me the information I was missing. The
"print_item_list_div" part of the ...pages/checkout.php file includes
most of the rows we wanted to rearrange. I changed ours so that the
"Renew your items online" and "online_catalog_url" rows are the last
in the table. That will work for us.

Thank you for your continued help; have a great weekend.

Eric at Town & Country PL

<!--  ============= form for submitting items ============= -->
<div style="position: absolute;left:-1500px;">
    <form name="item" action="">
        <input name="barcode" type="text" id="barcode"  value="" autocomplete="off" />
    </form>

    <div id="print_item_list_div">
               <table cellpadding="0" cellspacing="0" width="100%"
id="print_item_list_table">
                       <tbody>
                               <tr>
                                       <td>Checkout Receipt</td>
                               </tr>
                               <tr>
                                       <td><?php echo $library_name;?></td>
                               </tr>
                               <tr>
                                       <td> </td>
                               </tr>
                       </tbody>
               </table>
        </div>

<script type="text/javascript">
$(document).ready(function() {
$('#print,#print_inner,#print_thanks,#print_thanks_inner,#email,#email_inner,#em
ail_thanks,#email_inner_thanks,#no_print,#no_print_inner,#no_print_thanks,#no_pr
int_inner_thanks,#cancel,#cancel_inner,#cancel_thanks').corners();

$(".tab").corners("top transparent");
$("#cko_wrapper").corners("left bottom transparent");

//////////////////receipts
$( "#print" ).click( //receipt print function
    function(){
    $('#no_print,#email').css('visibility','hidden');
    $('#print').hide();
    $("#print_thanks").show();
    $( "#print_item_list_div tbody").append('<tr><td
style="font-style:italic">Renew your items online:</td></tr><tr><td
style="font-style:italic;"><?php echo
str_replace("'","\'",$online_catalog_url);?></td></tr><tr><td> </td></tr>');
    $( "#print_item_list_div" ).print();
    return( false );
});

Original comment by amendic...@gmail.com on 29 Apr 2011 at 11:40

GoogleCodeExporter commented 8 years ago
I made a mistake in the original message The part that says...

$( "#print_item_list_div tbody")

should be...

$( "#print_item_list_div table tbody")

If you got it working that's great. Let me know if you need any more help.

Original comment by ericmelton1@gmail.com on 30 Apr 2011 at 12:22

GoogleCodeExporter commented 8 years ago

Original comment by ericmelton1@gmail.com on 2 May 2011 at 9:05