{CT}Rodent Posted April 25, 2008 Posted April 25, 2008 Order Controller v1.0 This contribution allows you to: Batch Print InvoicesUtilising your current 'invoice.php' file (as you may have edited it with logo and other information) for each invoice. This contribution uses CSS page breaks to create seperate pages for printing. Batch Print Packing SlipsUtilising your current 'packingslip.php' file for each. Batch Deleting Orders Batch Status ChangeIncluding the ability to notify the customer. Default Status CommentsInclude default comments per status added via the admin 'Order Status' menu. Comments / Order Details MergeAllows you to include certain order details in a comment automatically. e.g. "Your order number is: <OC:orders_id:OC>." will be "Your order number is: 407". This can include any field within the 'orders' table. This links with both the Default Status Comments and the Batch Status Change. This contribution is partially based on the Batch Printing Without Frames, last edited by web-junkies, but is largely enhanced and modified. Quote
tankdotcom Posted May 5, 2008 Posted May 5, 2008 hi i install this in a clean copy of osCommerce Online Merchant v2.2 Release Candidate 2a and i'm getting these error messages when i try to:- batch inivice Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_invoice.php on line 4 batch packing slip Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_packingslip.php on line 4 batch delete Forbidden You don't have permission to access /oscommerce-2.2rc2a/oscommerce-2.2rc2a/catalog/admin/< on this server. Change Status: Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_status_change.php on line 35 can you please help. thanks Quote
rmany2k Posted May 7, 2008 Posted May 7, 2008 hi i install this in a clean copy of osCommerce Online Merchant v2.2 Release Candidate 2a and i'm getting these error messages when i try to:- batch inivice Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_invoice.php on line 4 batch packing slip Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_packingslip.php on line 4 batch delete Forbidden You don't have permission to access /oscommerce-2.2rc2a/oscommerce-2.2rc2a/catalog/admin/< on this server. Change Status: Warning: Invalid argument supplied for foreach() in D:\wamp\www\oscommerce-2.2rc2a\oscommerce-2.2rc2a\catalog\admin\oc_batch_status_change.php on line 35 can you please help. thanks In oc_batch_process.php on Lines 5 and 7 change $batch_order_nums to $batch_order_numbers. I'm not really sure how this ever worked in the first place but the contribution does not allow others to post fixes, so there it is. Quote
go2pub Posted July 4, 2008 Posted July 4, 2008 Installed this superb contribution on a pretty clean version of RC2a and after a bit of tweeking everything's working great except the batch delete function, to be honest I doubt very much if I'll ever us this feature but would like to get it working just incase. The following is the error generated on oc_batch_process.php when I try to delete. Warning: Invalid argument supplied for foreach() in /home/*****/public_html/****/admin/oc_batch_delete_confirm.php on line 35 any help much appreciated. Just one other little note I had to disable the admin login routine to get the automatic comments to work when updating an order, this wasn't really a problem though as I found several admin side modules wouldn't work with the login feature enabled and I have just protected the admin in .htaccess as before. Nigel Quote
Guest Posted July 14, 2008 Posted July 14, 2008 In oc_batch_delete_confirm.php foreach($batch_order_nums as $oID) { Needs to be foreach ($batch_order_numbers as $oID) { Quote
{CT}Rodent Posted September 16, 2008 Author Posted September 16, 2008 Sorry for the delay, but new package now uploaded fixing the $batch_order_nums / $batch_order_numbers inconsistency. Quote
irvi Posted September 18, 2008 Posted September 18, 2008 (edited) Great contri, installing was even for me not so difficicult. Only have one problem now: in email status change, the orderdate is not shown anymore. Code seems fine, but probably isn't. Anyone an idea how this might come? Edited September 18, 2008 by irvi Quote
pedro.antunes Posted September 28, 2008 Posted September 28, 2008 There's a problem with coments that have accents in it. For example if the comment is "Comentário", when I update the status in the detail view the comment text will be "Coment?o". The "ári" part is missing and has a ? instead... Can someone fix this problem? Quote
pedro.antunes Posted September 28, 2008 Posted September 28, 2008 There's a problem with coments that have accents in it. For example if the comment is "Comentário", when I update the status in the detail view the comment text will be "Coment?o". The "ári" part is missing and has a ? instead... Can someone fix this problem? After updating with the comment wrong, the next time i enter the detailed view the text in the comment box is correct, but is wrong in the order history box. I guess the problem is on the function displayDefaultComments in general.js. I'm no expert in Javascript, can someone help? Quote
pedro.antunes Posted October 19, 2008 Posted October 19, 2008 Batch delete still doesn't work. I get the following address: http://localhost/loja/admin/<?=$_SERVER['PHP_SELF']?> And the error: Forbidden You don't have permission to access /loja/admin/< on this server. Quote
{CT}Rodent Posted October 22, 2008 Author Posted October 22, 2008 The issue above relates to PHP short_tags. Now fixed and new package uploaded, however only 1 file needed changing. OPEN /catalog/admin/oc_batch_delete_confirm.php FIND <form name="delete" action="<?=$_SERVER['PHP_SELF']?>" method="post"> REPLACE WITH <form name="delete" action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> Accentuations! This problem also now solved and 1 file to change. OPEN /catalog/admin/oc_status_default_comments.php FIND echo $result['orders_status_default_comments']; ADD BEFORE header("Content-Type: text/html; charset=iso-8859-1"); Quote
pedro.antunes Posted October 23, 2008 Posted October 23, 2008 Hi, thanks for your help. Accentuation is now fixed! But the batch delete still doesn't work, but now with a different behaviour. After the confirmation to delete those orders, it says that they were deleted but when I go back to the Orders page they are still there, even after refrenshing the page. I have Register Globals disabled, don't know if it's related... Br Pedro Quote
LED-Store Posted October 30, 2008 Posted October 30, 2008 Thanks for this great contrib, I waited years for something like this! Very time-saving contribution!! But is it possible to open the oc_batch_status_change.php instead of in a new window, to open it in a popup window? It gets a little bit annoying me when it opens always a new window, a popup would be much better. I tried several things, the popup also gets opened, but there are no data redirected from the order.php, so nothing happens in the popup. <script type="text/javascript"> var attribWithoutAll="location=no,menubar=no,toolbar=no,status=no"; attribWithoutAll+=",resizable=no,scrollbars=no,width=450,height=200"; var subwindow=0; function box() { subwindow=window.open("oc_batch_process.php","popup",attribWithoutAll); subwindow.moveTo(10,50); } </script> <?php echo tep_draw_form('batch_orders', 'oc_batch_process.php', '', 'post', 'onsubmit="box();"'). "\n"; ?> Here is my ineffective attemp, does someone know how this can be realised that it works? Thx a lot, Luke Quote
pedro.antunes Posted November 9, 2008 Posted November 9, 2008 Hi, thanks for your help. Accentuation is now fixed! But the batch delete still doesn't work, but now with a different behaviour. After the confirmation to delete those orders, it says that they were deleted but when I go back to the Orders page they are still there, even after refrenshing the page. I have Register Globals disabled, don't know if it's related... Br Pedro I finnaly found the problem!! For people that don't use short tags must also change another line in oc_batch_delete_confirm.php: find: <td class="dataTableContent"><input type="hidden" name="order_nums[]" value="<?=$oID?>"><?php echo $oID; ?></td> replace with: <td class="dataTableContent"><input type="hidden" name="order_nums[]" value="<?php echo $oID ?>"><?php echo $oID; ?></td> Regards Quote
pedro.antunes Posted November 9, 2008 Posted November 9, 2008 Thanks for this great contrib, I waited years for something like this! Very time-saving contribution!! But is it possible to open the oc_batch_status_change.php instead of in a new window, to open it in a popup window? It gets a little bit annoying me when it opens always a new window, a popup would be much better. I tried several things, the popup also gets opened, but there are no data redirected from the order.php, so nothing happens in the popup. <script type="text/javascript"> var attribWithoutAll="location=no,menubar=no,toolbar=no,status=no"; attribWithoutAll+=",resizable=no,scrollbars=no,width=450,height=200"; var subwindow=0; function box() { subwindow=window.open("oc_batch_process.php","popup",attribWithoutAll); subwindow.moveTo(10,50); } </script> <?php echo tep_draw_form('batch_orders', 'oc_batch_process.php', '', 'post', 'onsubmit="box();"'). "\n"; ?> Here is my ineffective attemp, does someone know how this can be realised that it works? Thx a lot, Luke Hi Luke, I'm not an expert on PHP and HTML, but have you tried to do the popup window like the one from the products image? Insert in the header: <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=100, height=100, screenX=150, screenY=150, top=150, left=150') } //--></script> And then where you want to open the popup: <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' TYPE THE LINK TO THE WINDOW HERE ">' . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' TYPE THE LINK TO THE WINDOW HERE '" target="_blank">' . '</a>'; ?> </noscript> It's just an idea, don't know if it works... Regards. Quote
JrrSIN Posted February 11, 2009 Posted February 11, 2009 Thanks for the contribution. The Export button does not show. Quote
JrrSIN Posted February 11, 2009 Posted February 11, 2009 One more thing, The 'Date Ordered' in the e-mail that notifies the customer, does not come up, it is empty Thanks Quote
quickfoxz Posted February 12, 2009 Posted February 12, 2009 Thanx for this nice contribution. There's only one problem, while i edit an order and changing the orderstatus, the commenttext disappears. If i change status first and then type some comments then the comments doesn't disappear. Is there a simple way to fix this. Greetz. Quickfoxz Quote
dr_lucas Posted August 2, 2009 Posted August 2, 2009 Thanks for your wonderful contribution! I currently can not use it myself because I am printing every invoice/slip 4 pages per sheet on a duplex printer (ie. 4 pages per side of the paper x 2 sides = 8 pages per sheet) so it prints several customers' orders on each sheet (if the orders are small). Is there any way to make it force sheet break (so it will print a new sheet at the end of each invoice), rather than a page break? or is there any other solution? I really would love to use this contribution if it works for me, any help would be most appreciated! Thanks in advance! Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags
Guest Posted December 7, 2009 Posted December 7, 2009 Great contribution, that worked without any adjustments, I only found one problem that I cant solve. When batch printing invoices the first one looks great, with full width on the page, the second page hasn´t the same width as the first and so on, so once printing five or more pages the last ones are quite small and narrow. Anyone who has a solution to the problem? Quote
keeno79 Posted April 6, 2010 Posted April 6, 2010 Hi there, this looks to be the perfect contribution for me. I've managed to get almost everything working however when I run the packing slips. It almost finishes the first one and then gives me the following message Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp) in /home/site/public_html/admin/includes/functions/sessions.php on line 100 I am including a separate file onto the packing slip showing our latest special offers. Quote
brad.bulger Posted October 23, 2011 Posted October 23, 2011 i installed this on a 2.3.1 site and it's working fine so far. i had to make one change to get the CSS page breaks to work, at least with Chrome on a Mac - i changed the BR tag to an empty DIV: oc_batch_invoice.php: echo '<div style="page-break-before:always;" clear="all"></div>'; oc_batch_packingslip.php: echo '<div style="page-break-before:always;" clear="all"></div>'; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.