Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Batch print orders with original invoice ...


gregy

Recommended Posts

Hi, i have updated this contribution on my oscommerce, and depending on how people think this would work, i will upload it here. Basically, i didn't like the box for ticking orders being at the bottom, so i included it into each line of the order, look at the image for a bit more of a clue as to how it works.

 

I fixed the rollover state on the tables as well, so that clicking into the last column doesn't take you to the edit order page, or select the specific order.

 

View Image Here

Link to comment
Share on other sites

  • Replies 67
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 months later...
Can anyone please give me some idea as to why I'm receiving the following error:

Warning: main(BATCH_PRINT_INCbatch_print_header.php): failed to open stream: No such file or directory in /homepages/7/d114718265/htdocs/catalog/admin/includes/application_top.php on line 209

 

Fatal error: main(): Failed opening required 'BATCH_PRINT_INCbatch_print_header.php' (include_path='.:/usr/local/lib/php') in /homepages/7/d114718265/htdocs/catalog/admin/includes/application_top.php on line 209

 

The url's: http://www.healthandholistics.com/catalog/...batch_print.php

 

Any idea would be gratefully accepted...

I just installed this contribution and got the ssame error message. What am I missing? I checked the filenames file and it's correct. What did I do wrong

 

jailaxmi

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

I just installed this contribution and got the ssame error message. What am I missing? I checked the filenames file and it's correct. What did I do wrong

 

jailaxmi

 

OK, never mind... I re-installed it and it's working fine. I must have missed something in the first install.

 

jailaxmi :blush:

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

I have another problem...

 

If I want to get a batch of orders by orner numbers (say, 1-25), it generates pdfs without any problem, but if I want to get a batch using a date from, I get this error message:

 

Invalid date, Please enter a valid date in Year-Month-Day (0000-00-00) format.

 

Strange thing is, the date is that format, it shows up that way if I click on the menu with the calendar thingy.

 

Any suggestions to fix this?

 

Thanks!

 

jailaxmi

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

 

first of all, great contribution, thank you.

 

Do you know how to include same comments to be printed on invoice as are on detailed order page? I presume it would mean touching print_batch_invoice.php file but so far, no luck.

Absinthe Original Liquor Store

Link to comment
Share on other sites

  • 7 months later...
Do you know how to include same comments to be printed on invoice as are on detailed order page? I presume it would mean touching print_batch_invoice.php file but so far, no luck.

 

I found this in the contrib section, but can't remember where and now cant find it again, so i'll show it all here.

 

I just added the section for comments to invoice.php and used this contrib by PandA.nl

 

This mod adds all order comments (customer's and yours) to the bottom of the invoice. It is a very easy install, and makes it easier to use the invoice as a packing slip without missing the special requests customers leave in the comments area. It is also a professional looking way to send a comment or reply back with the order, since the comments you add to the order will display here also. I honestly have no idea how this mess works, as I reverse-engineered it out of the orders.php file. It looks good though, and thats what counts. :-)



INSTALLATION:

OPEN:

catalog/admin/invoice.php

AT LINE 137, AFTER:

?>
	</table></td>
  </tr>


BUT BEFORE: 

</table></td>


ADD:

<tr>
  <td class="smallText" align="center" colspan="8"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
</tr>
<?php
$orders_history_query = tep_db_query("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . tep_db_input($oID) . "' order by date_added");
if (tep_db_num_rows($orders_history_query)) {
  while ($orders_history = tep_db_fetch_array($orders_history_query)) {
	echo '		  <tr>' . "\n" .
	 '			<td class="smallText" align="center" colspan="8"><table width=50% border="1" cellpadding="0" cellspacing="0"><tr><td class="smallText" align="center">' . nl2br(tep_db_output($orders_history['comments'])) . ' </td></tr></table></td>' . "\n" .
		 '		  </tr>' . "\n";
  }
} else {
	echo '		  <tr>' . "\n" .
		 '			<td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" .
		 '		  </tr>' . "\n";
}
?>



OTHER SUGGESTIONS:

I include the invoice in the package instead of the packing slip (I just like the prices on the page) and I take advantage of this by placing a generic message to the customers underneath the comments. To do this:

AFTER:

 </tr></table>

BUT BEFORE:

<!-- body_text_eof //-->

ADD:

<center><br><br><br><br>
Thank you for shopping at the YOUR STORE HERE!<br>
Your message to the customer<br>
More reasons to come back<br>
(I include a coupon code for their next visit)<br><br>
YOUR NAME</center>


Thanks to everyone who has contributed to the community!
Jeff Stein 4/24/05
www.xboxchopshop.com

 

A bit late late with my reply to this question , but it might help others who want to do the same. Just place the code for the comments wherever you want them to appear on your invoice.

Link to comment
Share on other sites

:blink: column 'o.orders_prefix ? You are talking about another contribution than this thread is about I am afraid :(

 

No, I've got the same error:

 

1054 - Unknown column 'o.orders_prefix' in 'field list'

select o.orders_id,o.orders_prefix,h.comments,MIN(h.date_added) from orders o, orders_status_history h where o.orders_id in (14) and h.orders_id = o.orders_id group by o.orders_id

 

it's an error in "batch_print.php" on line 76 and when you enter no orders number in line 78

 

The problem perhaps occours when many other contributions are installed.

Only delete "o.orders_prefix" from both lines, and the contribution is working.

 

 

regards christian

Link to comment
Share on other sites

  • 1 month later...

hi there, im installing this contribution on creloaded 6.2b2b and all seems to work except when i press confirm to generate the frames it doesnt show the orders...instead it shows the login screen for the admin section in each frame. is there no way to continue the sesion or pull a cookie so it doesnt require a relogin?? ive tested it on 6.15 and it works 100% fine, now im using 6.208 and its a pain....help please

 

Sean

Link to comment
Share on other sites

  • 7 months later...
hi there, im installing this contribution on creloaded 6.2b2b and all seems to work except when i press confirm to generate the frames it doesnt show the orders...instead it shows the login screen for the admin section in each frame. is there no way to continue the sesion or pull a cookie so it doesnt require a relogin?? ive tested it on 6.15 and it works 100% fine, now im using 6.208 and its a pain....help please

 

Sean

 

Hi everyone, this is a great contribution! I am a CRE Loaded user so will hack this up for visual looks. Regards to getting it to work in CRE, open up the print_batch.php file in the admin folder, find line 52 and replace with:

 

$frames .= "\t" . '<frame src="' . $target_file . '?oID=' . $order_number . '&osCAdminID=' . $osCAdminID . '">' . "\n";

 

All we are doing is adding the following in:

 

'?oID=' . $order_number . '&osCAdminID=' . $osCAdminID .

 

 

CRE requires that the session is loaded otherwise it forces you to login.

 

At this point in time, I have installed a seperate mod for quick status updates, however, i will be attempting to mod it with this contrib :P

 

 

Alimul

 

www.theshishashop.com

Edited by vsonline
Link to comment
Share on other sites

I have installed this contrib and it prints the orders fine. I even edited it so it prints 2 copies, 1 for the records and one for the customer.

 

THe only problem I am having is the mouse over code.

 

When I copy the code from the install, I can check the check boxes, but I can not select other orders to view edits. Any idea of what I am doing wrong? I have reinstalled about 150 times now!

still in orders.php, find on line 371:

if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
 echo '			  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n";
} else {
 echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n";
}

and replace with:

// Copy here

if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
 echo '			  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" >' . "\n";
 $link = 'onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'"';
} else {
 echo '			  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
 $link = 'onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'"';
}

// To Here

Link to comment
Share on other sites

Found the problem,

 

Had to edit the lines below:

 

 <td <?php echo $link; ?> class="dataTableContent">

 

To have this in front of them, then it all worked great!

 

No I have it modified so you can select to print an invoice, and update, update with no invoice printed!

 

Mark

Link to comment
Share on other sites

Now I am working on when you edit it, it auctomatically refreshes the page you are on instead of popping up in a new window..

 

Any help on this would be great!

 

Mark

Link to comment
Share on other sites

header('Refresh: 0; url= "url of orders page"');

 

Now when I click to update them it updates all the orders, and refreshes the page...the only problem is that it opens another window! Can anyone help me with the code that is opening the other window?

 

Also,

The check box for customer notified is being checked, but the email is not being sent.

 

mark

Edited by 2dogrc
Link to comment
Share on other sites

  • 6 years later...

Hi guys I am using an addon called "Order Controller 5898" which is fantastic for printing multiple orders. I have modified it a fair bit for my use. Today I have changed to a new PC and I noticed that when I printed out multiple orders that there was no PAGE BREAK between each order. I can modify the code myself but does anyone know what the HTML call is for a PAGE BREAK or NEW page ??? I have googled for 30 mins with no luck but after this post will search again.Troy

Link to comment
Share on other sites

Hmmm so a quick google and I find the following. Add the style class under head <STYLE TYPE='text/css'> P.pagebreakhere {page-break-before: always} </STYLE> and then when we want a page break enter <P CLASS="pagebreakhere">. The almost works. Now when I have say 7 orders which I select to print, it has 8 pages, 7 orders and then the last page is a blank page. What I am thinking is maybe in the packingslip.php code I can check to see the number of orders and if say $order_total = 7 and I am on order number 7 then don't put an end pagebreak. However I am wondering what the sequence is. Does oc_batch_process.php call packingslip.php multiple times ?????

Link to comment
Share on other sites

OK solution was simple. The file oc_batch_process.php file calls oc_batch_packingslip.php which loops through the orders calling packingslip.php. Inside oc_batch_packingslip.php was the code echo '<br style="page-break-before:always;">'; All we needed to do was to change the BR to P ie echo '<p style="page-break-before:always;">'; Hope this helps someone :) Troy

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...