Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Batch Order Center Update 1.1


defender39

Recommended Posts

  • Replies 200
  • Created
  • Last Reply

Top Posters In This Topic

Just wondering if you knew of why i'm getting these numbers without tax calculating?

 

Products Model Tax Price (ex) Price (inc) Total (ex) Total (inc)

1 x Die Hard With A Vengeance DVD-DHWV 8.2500 $39.99 $39.99 $39.99 $39.99

 

Subtotal: $39.99

Customer Discount $-2.00

Tax 3.30

Shipping 0.00

Total 41.29

 

The price (inc) and total(inc) aren't including tax calculating for some reason =(

 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Just a few questions, i am really new to this software but find it great to use, i installed your contribution and managed to play with the template to get it to fit our integrated labels we use.

1. What php command would I use to add a graphic somewhere in the template?

2. Would there be anyway to have some kind of script running using your template so at a given time, say every 2 hours it was to check for orders and print the orders out?

3. How can i add a line at the bottom on the invoice like there is under the company name and a footer there with some comments or contact details

4. Is there anyway to increment the number of the pdf file so it does not keep over writing the same file

 

Thanks

Link to comment
Share on other sites

Hi Talon,

It's probably down to the changes I made. ;) I may have reused a variable (possible an array) name. I don't have tax turned on or use any of the settings so I didn't check those things.

 

Gavhot,

I dont know the answers but if want your page to auto-refresh every two hours then you put this html meta tag:

<META HTTP-EQUIV=Refresh CONTENT="7200">

 

between the HEAD tags of your page. Hope that gets you part of the way there.

Link to comment
Share on other sites

I get these errors when I try to generate a batch order PDF...

 

Warning: fopen(includes/modules/batch_print/temp_pdf/batch_orders.pdf): failed to open stream: Permission denied in /hsphere/local/home/myuserid/mysite.com/catalog/admin/batch_print.php on line 268

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/myuserid/mysite.com/catalog/admin/batch_print.php:268) in /hsphere/local/home/myuserid/mysite.com/catalog/admin/batch_print.php on line 300

 

I have no idea what to do. I looked at these lines and I see nothing that needs changes. Hope someone understands how to get this to work.

 

Here are lines 267-271...

 

$fname = BATCH_PDF_DIR . BATCH_PDF_FILE;
if ($fp = fopen($fname,'w')) {
fwrite($fp,$pdf_code);
fclose($fp);
} else { message_handler('FAILED_TO_OPEN'); }

 

and lines 299-305...

 

if ($message) {
header("Location: " . tep_href_link(BATCH_PRINT_FILE, 'mkey=' . $message));
} else {
header("Location: " . tep_href_link(BATCH_PRINT_FILE));
}
exit(0);
}

 

Hope someone can help. I will post the whole file at your request.

 

By the way, it has nothing to do with setting chmod for the temp_pdf folder to 777. It is set at 777 already.

 

Thanks.

Link to comment
Share on other sites

Hi

 

Looks like a bloody useful module, but...

 

I've installed everything and when I click on 'batch order center' in Tools, I get the following error:

 

Fatal error: Failed opening required 'BATCH_PRINT_INCbatch_print_header.php' (include_path='.:/usr/share/pear') in /home/hardware/web/Merchant2/catalog/admin/batch_print.php on line 284

 

Anyone know what I can do?

 

Cheers

I've the same problem, anyone knows what can I do ?

Link to comment
Share on other sites

First of all...LOVE THIS CONTRIBUTION! Great work guys (and gals). It looks like it took a lot of time and effort. One question I have not been able to answer myself, though, is how to change which button graphic is used as the submit image for the form on admin/batch_print.php. If anyone could let me know I would greatly appreciate it, as I would prefer to use a different button. Thanks!!!!!!

 

-Aaron

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
Hi Talon,

It's probably down to the changes I made. ;) I may have reused a variable (possible an array) name. I don't have tax turned on or use any of the settings so I didn't check those things.

Actually I think it's standard osc bug error, since admin/invoice.php or admin/orders.php doesn't show it correctly either.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
Does anyone know how to sort the product rows by model number in the batch print contribution?

 

It would make it much easier for my pickers if the items were sorted by model numbers.

 

Thanks,

 

Donna Gordon

UKGoods.com

 

You could try changing the $orders_products_query in admin/classes/order.php so that you sort by products_model every time an order is retrieved. To do this, just put "ORDER BY products_model" at the end of the query. So, it would read:

 

$orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_model");

 

If you are going to mess with this, make sure you back up the file first. Also keep in mind, this will effect more then just this contribution.

Link to comment
Share on other sites

Hi there,

 

I was wondering if anyone is having any problems with this contribution sending emails??

 

It all seems to work fine except for the email notifications.

 

What method of sending mail is used on the sites that have installed this contribution?

 

we normally used sendmail but I have installed the SMTP Contribution as well, if I set it to sendmail in admin then this contribution does not send email notifications at all but if I switch it to SMTP then it works but I have found with the SMTP Contribution it will only send one message at a time so if you do somthing in a batch such as this or even send a newsletter to all subscribed customers for instance then it produces an error so I can't use that.

 

Are others having any problems with the email notifications??

 

 

Cheers!!

Link to comment
Share on other sites

  • 1 month later...

You can get the line to wrap instead of being cropped.

$pdf->addTextWrap

It isn't totally straightforward to use but you can see an example in batch_print.php

Alternatively using a smaller font might just do it.

 

Once you get Blurb's forthcoming contribution you will find it easier to make layout changes. For instance I have created an integrated packing slip/invoice with built-in sticky labels at the top using the preview version of this contribution.

Link to comment
Share on other sites

You can get the line to wrap instead of being cropped.

$pdf->addTextWrap

It isn't totally straightforward to use but you can see an example in batch_print.php

Alternatively using a smaller font might just do it.

 

Once you get Blurb's forthcoming contribution you will find it easier to make layout changes. For instance I have created an integrated packing slip/invoice with built-in sticky labels at the top using the preview version of this contribution.

 

 

How would text wrapping help the last ten lines being cropped?? It is cropping the bottom of products. I have tried changing fonts it does not work.

Edited by Ehydo
Link to comment
Share on other sites

I didn't know that the last ten lines were being cropped.! I've been using this contribution for a year now without coming across that problem.

 

Perhaps you could explain what you mean in a bit more detail.

Thanks.

Edited by radders
Link to comment
Share on other sites

I do not know how to be much more specific. When I look at the pdf on large orders that should take 2 or more pdf pages the Products section cuts off at the end of the first page. It never continues to another page.

 

I have plenty of examples if you like.

Link to comment
Share on other sites

Ah, now I understand what the problem is. A picture is worth a thousand words.

 

You are asking why you can only fit around 30 items on the invoice.

If there are more than that then you would like it to go on to another page.

 

Seems like a very sensible idea to me. So far I haven't sold more than this number of items in one order so have never come across the issue.

 

Let's put this on the list of suggestions for when new templates are being developed. Actually I wouldn't have thought it would be that hard to do. Not high on my own list of priorities for obvious reasons but it seems to make sense to gereralize the templates if it is reasonably straightforward to do.

Link to comment
Share on other sites

Ah, now I understand what the problem is. A picture is worth a thousand words.

 

You are asking why you can only fit around 30 items on the invoice.

If there are more than that then you would like it to go on to another page.

 

Seems like a very sensible idea to me.  So far I haven't sold more than this number of items in one order so have never come across the issue.

 

Let's put this on the list of suggestions for when new templates are being developed.  Actually I wouldn't have thought it would be that hard to do.  Not high on my own list of priorities for obvious reasons but it seems to make sense to gereralize the templates if it is reasonably straightforward to do.

 

I guess that means that you do not have an answer.

 

 

I will wait.

Link to comment
Share on other sites

Well not a particularly elegant solution but this should work:

 

Find this line in your template or admin/batch_print.php:

$pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN;

Immediately after it add this:

 

//page feed
if ($pos <= 30) {
$pdf->ezNewPage();
$pos =800;
}
// end page feed

Link to comment
Share on other sites

Well not a particularly elegant solution but this should work:

 

Find this line in your template or admin/batch_print.php:

$pos = ($pos-PRODUCT_TABLE_ROW_HEIGHT) + PRODUCT_TABLE_BOTTOM_MARGIN;

Immediately after it add this:

 

//page feed
if ($pos <= 30) {
$pdf->ezNewPage();
$pos =800;
}
// end page feed

 

It did nothing for me. I even tried changing if ($pos <= 30) { to 20, 10, 15, -15 and nothing happened.

Link to comment
Share on other sites

There are several instances of the code I gave you. You need the occurance of that code in the particular section that is causing the problem. The line number will probably be in the vicinity of 150.

 

First find

or ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {

Then go down until you reach the line I gave you. Works for me!

 

The meaning of the '30' and '800' is this:

0 is the bottom of the page, so 30 wioll give you a margin from the bottom.

800 is near the top of the page (for an A4 sheet).

 

hth

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...