Jump to content

chris23

Members
  • Content count

    399
  • Joined

  • Last visited

Everything posted by chris23

  1. Support for PDF Customer Invoice contribution This contribution will add a link to a customer's order history detail page (account_history_info.php). When clicked, this link will generate a PDF copy invoice for the order. This contribution is based on PDF Invoice (http://www.oscommerce.com/community/contributions,3027) Apart from recoding PDF Invoice to work client side, I have added the following features, configurable from within admin: 1. Font can be chosen - arial, times, courier, helvetica. 2. Colours for the invoice elements can be chosen. Hex values supplied are automatically converted to RGB as needed by FPDF so you can easily match up your stylesheet.css colours to the invoice colours for a consistent look. 3. An optional watermark (text of your choice e.g. "Copy Invoice") can be added to the invoice. 4. An optional VAT tax reference can be added to the invoice. 5. Choice of displaying generated PDF inline or by forcing a download - set within admin configuration. 6. PDF Metadata (Store owner, Invoice number etc) is automatically added to the PDF. 7. Choice of store logos - png, gif, jpg. 8. Custom footer splash (marketing text) can be added. 9. Store logo size can be easily 'tweaked'. The invoice will also display product attributes, if applicable (something which is missing from PDF Invoice) Download contribution at http://www.oscommerce.com/community/contributions,5321
  2. Support forum for tracking module http://addons.oscommerce.com/info/5535 Note: this forum is for support for the tracking module framework. For support on a particular courier module, visit the support forum for that module.
  3. Support for "Subcategory textboxes" contribution This contribution will allow you to add a text information box to the top of a subcategory page. This allows you to give general information about a product range, rather than duplicating information within the product page. See enclosed screeshot.jpg for an example of its use. This contribution is based in part on the excellent and simple contribution "Sub Category Description on Selected Categories": http://www.oscommerce.com/community/contributions,4608 Whilst this offered the functionality required by a recent client, the client wanted to support multiple subcategories and didn't like the idea of editing the index.php source file to add / amend entries. This contribution builds on "Sub Category Description on Selected Categories": 1. Textbox descriptions stored in database table. 2. Full admin control to allow adding / editing / deleting textbox contents. 3. Ability to switch off textboxes globally - allows you to add your copy before going 'live' 4. Ability to customise amount of textbox text previewed on the admin page. 5. Protection against overwriting existing textbox contents.
  4. chris23

    [CONTRIBUTION] PDF Customer Invoice

    Google or forum search on "Fatal error: Call to a member function add_current_page() on a non-object". This is not an error specific to this contribution. You'll find lots of fixes e.g. http://forums.oscommerce.com/index.php?showtopic=28405
  5. chris23

    [contribution] Tracking Module

    Jonathan, This is caused by an extra whitespace character after the closing ?> php tag in includes/languages/english/tracking_module.php This is a common problem - edit the file above and make sure there are no characters, spaces or newlines after the closing ?>
  6. chris23

    [contribution] Tracking Module

    Rolf, Could you please PM me with one of the new tracking IDs so I can come up with a new regexp? Thanks, Chris
  7. chris23

    [contribution] Tracking Module

    This is nothing to do with the URL changes. The International page return contains invalid HTML which chokes the script. A fix for this is here - post #148: I should have added this to the last updated module but forgot. Sorry!
  8. chris23

    [CONTRIBUTION] PDF Customer Invoice

    EDIT pdfinvoice.php FIND: $this->MultiCell(100, 6, tep_html_entity_decode(PDF_INV_WEB) . HTTP_SERVER, 0, 'R'); REPLACE with: $this->MultiCell(100, 6, tep_html_entity_decode(PDF_INV_WEB) . str_replace("http://" , "", HTTP_SERVER), 0, 'R');
  9. chris23

    [contribution] Tracking Module

    Martyn, The Royal Mail description text is not part of the tracking module - this is the text for a shipping module you have installed. Have a look in catalog/includes/languages/english/modules/shipping/whatever_shipping_you_use.php Would this other contribution happen to be PDF Customer Invoice by any chance? Chris
  10. chris23

    [contribution] Tracking Module

    Hi Rolf, I'm assuming the error message is occurring when you try and add the tracking ID on admin/orders.php? If so, this will not be affected by the change in tracking url (although this may break the module in other ways!) Doubtful your PHP version will have affected anything. Most likely cause: 1. Swisspost have different format tracking IDs - is the ID causing the error the same format as those that were working? 2. You've made changes to admin/orders.php (?) HTH Chris
  11. chris23

    [CONTRIBUTION] PDF Customer Invoice

    Now I've given this more than 10 seconds thought, there was an obvious step missing from my last post. The file pdfinvoice.php has security checks in place to make sure that either: 1) The customer is logged in and can therefore only view invoices belonging to their customer id or 2) The admin add-on is place and a security bypass hash is sent to pdfinvoice.php to bypass the requirement in 1) This is where dealing with a payment module that uses a callback (eg PayPal, Chronopay etc) causes problems. Harald's (hpdl) offical standard PayPal module replaces the checkout_process.php flow and pre-saves the order using code in the payment module. The ipn.php callback then updates the order status. For this module, adding the PDF code to the payment module email block should work as the customer is logged in. If you're using a different PayPal IPN that moves the email sending to the callback function, then the customer will not be logged in. In this case, I suppose the easiest solution would be to set the passthru id in the IPN page, e.g. $HTTP_GET_VARS['passthruID'] = "your secrethashhere"; Note: all the above is based on my limited knowledge of the PayPal modules floating around the contribution area.. HTH Chris
  12. chris23

    [CONTRIBUTION] PDF Customer Invoice

    Hi, I don't use PayPal IPN but you're right in what you say. You need to duplicate the PDF code in ipn.php I *think* from a brief look (and I haven't tested this), that you'll need to change the reference $HTTP_GET_VARS['order_id'] = $insert_id; to $HTTP_GET_VARS['order_id'] = $HTTP_POST_VARS['invoice']; to ensure the order_id gets passed to pdfinvoice.php HTH
  13. chris23

    [CONTRIBUTION] PDF Customer Invoice

    You can't have any html or html entities in your PDF. If your payment module is inserting these characters, edit pdfinvoice.php FIND $pdf->MultiCell(94, 6, $order->totals[$i]['title'] . ' ' . $order->totals[$i]['text'], 0, 'R'); and add the tep_html_entity_decode function around $order->totals[$i]['title'] and $order->totals[$i]['text'] e.g $pdf->MultiCell(94, 6, tep_html_entity_decode($order->totals[$i]['title']) . ' ' . tep_html_entity_decode($order->totals[$i]['text']), 0, 'R'); HTH
  14. chris23

    [CONTRIBUTION] PDF Customer Invoice

    David, Hardcoding, while not ideal, should work fine. Are you sure you're not getting browser caching issues? I occasionally have problems trying to get changes to "stick" when regenerating the PDF. Often clearing the browser cache or a CTRL +F5 fixes this. Rather than hardcode, try adding a constructor to the PDF class (this is something I need to add as a config option as the A4/letter issue has been discussed before). EDIT pdfinvoice.php FIND: class PDF extends FPDF { and ADD immediately after: function PDF($orientation='P',$unit='mm',$format='letter'){ parent::FPDF($orientation,$unit,$format); } I've not tested this but it should create a FPDF object with the canvas set to letter, not A4 size HTH Chris
  15. chris23

    [CONTRIBUTION] PDF Customer Invoice

    No I didn't - did you PM it?
  16. chris23

    [contribution] Tracking Module

    To confirm, did you have Google Checkout (GCO) installed with v1.3 and working or have you upgraded to v1.4 and installed GCO simultaneously? If my memory serves me, there was an issue with GCO and the tracking module but this was on an install on an popular OSC fork. I don't use GCO so can't comment on this. HTH Chris
  17. chris23

    [contribution] Tracking Module

    Chris, The quickest way to see if this is a problem with the parcelforce module or an issue with the installation of the tracking module itself is to install a second module e.g royal mail and test this. Installing a second module is very quick and it can be easily removed/disabled after testing. If you get the same problem with royal mail, please check over your installation carefully, esp. admin/orders.php HTH Chris
  18. chris23

    [contribution] Tracking Module

    Tested v1.4 and it's accepting this code fine on my test box. Have you made any other code changes, specifically admin/orders.php? Chris
  19. chris23

    [contribution] Tracking Module

    Andy, I'll have a look at this. There should be no reason at all why 1.4 should stop accepting IDs if v1.3 was working correctly. The only change to the royal mail module was the updating of the URLs used. I didn't alter the regexp used to validate the IDs or make any changes to the tracking class. Chris
  20. chris23

    [CONTRIBUTION] PDF Customer Invoice

    Kevin, There are two separate issues here. There is no copy of the attachment in the customer's account history. In the account page, there is a link to generate a PDF copy of the invoice. This is generated each time the customer clicks the link. It is streamed directly to the browser and is not stored or attached. Do you get a link in the account history which when clicked, displays an invoice? Second issue with emailing. Assuming you have installed the "email as an attachment" addon, do you get any errors when proceeding through checkout when you enable the email pdf attachment option? Rgds, Chris
  21. chris23

    [contribution] Tracking Module

    Not yet unfortunately - nobody has stepped up to write a module for USPS (or they have but haven't uploaded it as a module). This is one that certainly needs looking into. Chris
  22. chris23

    [contribution] Tracking Module

    Matt, Forum rules don't allow discussions of a commercial nature. If you wish to discuss help with finishing a module, please contact me by PM Thanks Chris
  23. chris23

    [CONTRIBUTION] PDF Customer Invoice

    Sorry Jonathan - missed your post (my email notifications appear not to be working) I have various pdfinvoices.php. modified to try and fix the page break issue. I'll dig them out over the weekend and send them over (PM me your email address) Chris
  24. chris23

    [CONTRIBUTION] PDF Customer Invoice

    It would be a good place to start - at least I'l know what I'm debugging. Chris
×