Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

chris23

Archived
  • Posts

    399
  • Joined

  • Last visited

Everything posted by chris23

  1. UPDATE ON EMAIL ATTACHMENT ISSUE I don't want anyone thinking I've quietly forgotten about the problems some people are having with emailing the PDF as an attachment. From some helpful posts, I've narrowed the problem down to what's probably not causing it: - mail server - email client - linefeed settings There are users getting failures using the same server environments as me (where mine are succeeding), the only difference being the PHP version running on the remote linux server - PHP5 being fine, PHP4 failing. I'm going to "retrofit" a linux box with PHP4 and see if I can break things :-" In the meantime, those who are getting failures of the PDF attachment, please post the message source and server environments (or PM them to me). This is being a sod to nail as I don't have a broken configuration to try and fix ... Chris
  2. Gina, You'll need to install a contribution that allows you to generate an invoice number independently of oscommerce, something like: http://addons.oscommerce.com/info/4731 Once you've done this, you'll need to make some changes to includes/classes/order.php and pdfinvoice.php to display the new invoice number. Someone else tried this before - have a look on the first couple of pages on this thread - we got it working eventually ... HTH Chris
  3. You've too much text for the available cell space. To fix this, you either need to: 1. Increase the size of the cell and move all other cells down the page 2. Reduce the amount of text 3. Reduce the font size The area of pdfinvoice.php you need to modify is: // Company name $this->SetX(0); $this->SetY(12); $this->SetFont(PDF_INV_CORE_FONT, 'B', 12); $this->SetTextColor($highlight_color[0], $highlight_color[1], $highlight_color[2]); $this->Ln(0); $this->Cell(150); $this->MultiCell(100, 3.5, tep_html_entity_decode(STORE_NAME), 0, 'L'); // Company Address $this->SetX(0); $this->SetY(16); $this->SetFont(PDF_INV_CORE_FONT, 'B', 10); $this->SetTextColor($highlight_color[0], $highlight_color[1], $highlight_color[2]); $this->Ln(0); $this->Cell(150); $this->MultiCell(100, 3.5, tep_html_entity_decode(STORE_NAME_ADDRESS), 0, 'L'); //Email $this->SetX(0); $this->SetY(43); $this->SetFont(PDF_INV_CORE_FONT, 'B', 10); $this->SetTextColor($highlight_color[0], $highlight_color[1], $highlight_color[2]); $this->Ln(0); $this->Cell(100); $this->MultiCell(100, 6, tep_html_entity_decode(PDF_INV_EMAIL) . STORE_OWNER_EMAIL_ADDRESS, 0, 'R'); //Website $this->SetX(0); $this->SetY(48); $this->SetFont(PDF_INV_CORE_FONT, 'B', 10); $this->SetTextColor($highlight_color[0], $highlight_color[1], $highlight_color[2]); $this->Ln(0); $this->Cell(100); $this->MultiCell(100, 6, tep_html_entity_decode(PDF_INV_WEB) . HTTP_SERVER, 0, 'R'); // VAT / Tax number (if enabled) if (DISPLAY_PDF_TAX_NUMBER == 'true') { $this->SetX(0); $this->SetY(53); $this->SetFont(PDF_INV_CORE_FONT, 'B', 10); $this->SetTextColor($highlight_color[0], $highlight_color[1], $highlight_color[2]); $this->Ln(0); $this->Cell(88); $this->MultiCell(100, 6, tep_html_entity_decode(PDF_TAX_NAME) . " " . PDF_TAX_NUMBER, 0, 'R'); } HTH
  4. If you mean emailing the packingslip from checkout_process as the order is placed then this won't work. pdfpackingslip resides in admin so can't be accessed. It would be possible to add an "email packingslip" link in admin but I don't suppose you gain much over generating and attaching manually. Chris
  5. The most likely cause is not having the passthru hash set the same in admin/orders.php and pdfinvoice.php Try copy and pasting the hash from one to the other again Chris
  6. No idea why you should be getting this extra space but the following will get rid of it EDIT pdfinvoice.php FIND both: $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->customer['format_id'], $order->customer, '', '', "\n")), 0, 'L'); $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->delivery['format_id'], $order->delivery, '', '', "\n")), 0, 'L'); REPLACE each with $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->customer['format_id'], ltrim($order->customer), '', '', "\n")), 0, 'L'); $pdf->MultiCell(70, 3.3, tep_html_entity_decode(tep_address_format($order->delivery['format_id'], ltrim($order->delivery), '', '', "\n")), 0, 'L'); HTH
  7. Ivan, If your order totals are returning html tags, these must be stripped out (fpdf doesn't translate html). See post #92 here for details Your second issue, you could: - First try dropping the font size - this may allow you to get the text in without truncating it. - Increase the cell size of the order total cells, moving the cell left. - If these dont work, you could do a simple str_replace around the order total and take out the word(s) you don't want (e.g. why do you need "[1 box(es) to be shipped]" when [1 box(es)] would do?) HTH Chris
  8. You can remove the duplicate entries from the configuration table using phpMyAdmin - but backup your database first
  9. Did you put: define('FILENAME_CUSTOMER_PDF','pdfinvoice.php'); in catalog/includes/filenames.php? Chris
  10. If the define is in admin/includes/filenames.php, I can't see why your url is admin/FILENAME_CATEGORIES_EXTRA You haven't put it in catalog/includes/filenames.php? (I'm forever doing this ......) HTH Chris
  11. You've forgotten to add the entry define('FILENAME_CATEGORIES_EXTRA','products_extra_category.php'); to admin/includes/filenames.php
  12. John, You should have: define ('PDF_INV_CUSTOMER_REF','Customer reference: '); in includes/languages/english/pdfinvoice.php Pls check your copy to see you have this defined HTH Chris
  13. Have you tried setting "HTML emails" to false? Chris
  14. chris23

    Protx Direct v2.22

    Tom - I'd like to second Rob's comments. I've been using v3 on several client's sites and it's been great. Just installed v4.4 on a new site. Took 30mins including testing - now pending going live. Many thanks for your hard work. Chris
  15. Thanks for the helpful post Toni. You have an almost identical setup to mine, both local and remote. I'd love to know what's causing the "html enabled" to cause the attachment to fail. Can you tell me what carriage return you have set under e-mail options (I'm using LF not LF/CR on both servers)? Rgds Chris
  16. No this code is correct. All this does is send an extra e-mail to the store owner if you have set your store up to do this in configuration
  17. Nancy, Have you definitely uploaded catalog/admin/products_extra_category.php? If you have, what page is your browser trying to display when it returns the 404? Chris
  18. From memory, I think there's a rogue whitespace after the closing ?> in catalog/languages/your_language/pdfinvoice.php HTH
  19. Hi, Packing slip is not dependent at all on "Email PDF as attachment". You can pretty much install whichever add-ons you want to the base PDF Invoice contribution. The only must is for a fully working PDF Invoice before installing any of the add-ons I have all the add-ons working fine on v2.2 RC2a. Something's definitely gone wrong during the install somewhere. I know you've checked it but please have another look - have a coffee first ;) HTH Chris
  20. Hi Tony, $%£"! Royal Mail! The first one isn't working as there is a bad alt tag in the HTML alt='it's on its way' - note the single quote within single quotes. This is causing strip_tags to choke. The second one works as it's been delivered and doesn't have the offending alt tag. To fix this, edit rm_tracking.php AFTER // Grab delivery status information and POD data. $text = preg_match('/<div class="track-right-box">(.*)<div class="FlexiList( default| null)">/i', $grab_data, $content); ADD: $content[1] = addslashes($content[1]); This tidies up the HTML sufficiently for strip_tags to clean the rest. I get the feeling I'm going to be chasing my tail with RM .... HTH Chris
  21. @FOD @ihatedeskjets Are you guys still having issues? My existing tracking numbers are working fine (so was wondering if there was a RM networking issue around the time you had a problem.) It would help if you could post or PM tracking IDs that are failing so I can see the returned HTML Interesting question. The paranoid in me says `probably` but thinking about it more rationally, RM would really need to be studying their server logs closely. The cURL script sends a dummy Firefox user agent string so provided your website (or server if on shared hosting) isn't hitting RMs site at some insane rate, I can't see them picking up anything suspicious in their logs.. Chris
  22. New rm_tracking.php uploaded to contrib area: Just upload the new rm_tracking.php, overwriting your existing version. Please let me know if your RM module ceases to function - RM seem to be messing with their tracking page and I'm not convinced they've finished. Nothing can be done in advance of this and is the main drawback of any screen scrape. Chris
  23. The Royal Mail script tries to fix this issue - it's caused by RMs UTF encoding clashing with osC's ISO encoding. Your server doesn't have multibyte support so your html can't be converted. Try this EDIT rm_tracking.php FIND: if(function_exists(mb_convert_encoding)){ echo mb_convert_encoding($content, "UTF-8", "ISO-8859-1"); } else { echo $content; } REPLACE WITH // the following functions will prevent 'UTF garbled' returned data. We try to use iconv (may be missing on Win32) or mb_convert_encoding (may not be compiled in to PHP) if(function_exists(mb_convert_encoding)){ echo mb_convert_encoding($content, "UTF-8", "ISO-8859-1"); } elseif(function_exists(iconv)){ echo iconv("UTF-8", "ISO-8859-1", $content); } else { echo $content; } If your server doesn't have the iconv library installed (it should), then I'm afraid you're out of luck. HTH Chris
  24. I'm going to have to modify the RM code to accept either "FlexiList null" or "FlexiList default" as both get returned, depending on the type of tracking ID. Helpful RM! I'll post something when it's done HTH Chris
  25. Looks like Royal Mail have changed their returned HTML! EDIT rm_tracking.php FIND: $EndGrab = '<div class="FlexiList">'; REPLACE with $EndGrab = '<div class="FlexiList default">'; Let's hope they leave things alone ... HTH Chris
×
×
  • Create New...